DNSのメモ

>>> dnsquery
<IP  frag=0 proto=udp |<UDP  sport=<RandShort> dport=domain |<DNS  opcode=QUERY qdcount=1 |<DNSQR  qname='www.facebook.com' qtype=A qclass=IN |>>>>
>>> dnsquery.dst='129.250.35.250'
>>> dnsquery1=_
>>> sr1(dnsquery1)
Begin emission:
.Finished to send 1 packets.
*
Received 2 packets, got 1 answers, remaining 0 packets
<IP  version=4L ihl=5L tos=0x0 len=102 id=39600 flags=DF frag=0L ttl=244 proto=udp chksum=0x8419 src=129.250.35.250 dst=192.168.1.32 options='' |<UDP  sport=domain dport=33745 len=82 chksum=0x680d |<DNS  id=0 qr=1L opcode=QUERY aa=0L tc=0L rd=0L ra=1L z=0L rcode=ok qdcount=1 ancount=2 nscount=0 arcount=0 qd=<DNSQR  qname='www.facebook.com.' qtype=A qclass=IN |> an=<DNSRR  rrname='www.facebook.com.' type=CNAME rclass=IN ttl=1473 rdata='star.c10r.facebook.com.' |<DNSRR  rrname='star.c10r.facebook.com.' type=A rclass=IN ttl=55 rdata='31.13.82.17' |>> ns=None ar=None |>>>
>>> dnsres=_
>>> dnsres.show()
###[ IP ]###
  version= 4L
  ihl= 5L
  tos= 0x0
  len= 102
  id= 39600
  flags= DF
  frag= 0L
  ttl= 244
  proto= udp
  chksum= 0x8419
  src= 129.250.35.250
  dst= 192.168.1.32
  options= ''
###[ UDP ]###
     sport= domain
     dport= 33745
     len= 82
     chksum= 0x680d
###[ DNS ]###
        id= 0
        qr= 1L
        opcode= QUERY
        aa= 0L
        tc= 0L
        rd= 0L
        ra= 1L
        z= 0L
        rcode= ok
        qdcount= 1
        ancount= 2
        nscount= 0
        arcount= 0
        \qd\
         |###[ DNS Question Record ]###
         |  qname= 'www.facebook.com.'
         |  qtype= A
         |  qclass= IN
        \an\
         |###[ DNS Resource Record ]###
         |  rrname= 'www.facebook.com.'
         |  type= CNAME
         |  rclass= IN
         |  ttl= 1473
         |  rdlen= 24
         |  rdata= 'star.c10r.facebook.com.'
         |###[ DNS Resource Record ]###
         |  rrname= 'star.c10r.facebook.com.'
         |  type= A
         |  rclass= IN
         |  ttl= 55
         |  rdlen= 4
         |  rdata= '31.13.82.17'
        ns= None
        ar= None
>>> 

>>> dnsquery.dst='8.8.8.8'
>>> sr1(dnsquery)
Begin emission:
Finished to send 1 packets.
*
Received 1 packets, got 1 answers, remaining 0 packets
<IP  version=4L ihl=5L tos=0x0 len=102 id=54023 flags= frag=0L ttl=44 proto=udp chksum=0xe9a7 src=8.8.8.8 dst=192.168.1.32 options='' |<UDP  sport=domain dport=46948 len=82 chksum=0xd7bc |<DNS  id=0 qr=1L opcode=QUERY aa=0L tc=0L rd=0L ra=1L z=0L rcode=ok qdcount=1 ancount=2 nscount=0 arcount=0 qd=<DNSQR  qname='www.facebook.com.' qtype=A qclass=IN |> an=<DNSRR  rrname='www.facebook.com.' type=CNAME rclass=IN ttl=1688 rdata='star.c10r.facebook.com.' |<DNSRR  rrname='star.c10r.facebook.com.' type=A rclass=IN ttl=3 rdata='31.13.68.16' |>> ns=None ar=None |>>>
>>> dnsres=_
>>> dnsres.show()
###[ IP ]###
  version= 4L
  ihl= 5L
  tos= 0x0
  len= 102
  id= 54023
  flags= 
  frag= 0L
  ttl= 44
  proto= udp
  chksum= 0xe9a7
  src= 8.8.8.8
  dst= 192.168.1.32
  options= ''
###[ UDP ]###
     sport= domain
     dport= 46948
     len= 82
     chksum= 0xd7bc
###[ DNS ]###
        id= 0
        qr= 1L
        opcode= QUERY
        aa= 0L
        tc= 0L
        rd= 0L
        ra= 1L
        z= 0L
        rcode= ok
        qdcount= 1
        ancount= 2
        nscount= 0
        arcount= 0
        \qd\
         |###[ DNS Question Record ]###
         |  qname= 'www.facebook.com.'
         |  qtype= A
         |  qclass= IN
        \an\
         |###[ DNS Resource Record ]###
         |  rrname= 'www.facebook.com.'
         |  type= CNAME
         |  rclass= IN
         |  ttl= 1688
         |  rdlen= 24
         |  rdata= 'star.c10r.facebook.com.'
         |###[ DNS Resource Record ]###
         |  rrname= 'star.c10r.facebook.com.'
         |  type= A
         |  rclass= IN
         |  ttl= 3
         |  rdlen= 4
         |  rdata= '31.13.68.16'
        ns= None
        ar= None


>>> dnsquery.dst='8.8.4.4'
>>> sr1(dnsquery)
Begin emission:
.Finished to send 1 packets.
*
Received 2 packets, got 1 answers, remaining 0 packets
<IP  version=4L ihl=5L tos=0x0 len=102 id=42349 flags= frag=0L ttl=44 proto=udp chksum=0x1b46 src=8.8.4.4 dst=192.168.1.32 options='' |<UDP  sport=domain dport=59755 len=82 chksum=0xa3a0 |<DNS  id=0 qr=1L opcode=QUERY aa=0L tc=0L rd=0L ra=1L z=0L rcode=ok qdcount=1 ancount=2 nscount=0 arcount=0 qd=<DNSQR  qname='www.facebook.com.' qtype=A qclass=IN |> an=<DNSRR  rrname='www.facebook.com.' type=CNAME rclass=IN ttl=3198 rdata='star.c10r.facebook.com.' |<DNSRR  rrname='star.c10r.facebook.com.' type=A rclass=IN ttl=21 rdata='31.13.68.49' |>> ns=None ar=None |>>>
>>> dnsres=_
>>> dnsres.show()
###[ IP ]###
  version= 4L
  ihl= 5L
  tos= 0x0
  len= 102
  id= 42349
  flags= 
  frag= 0L
  ttl= 44
  proto= udp
  chksum= 0x1b46
  src= 8.8.4.4
  dst= 192.168.1.32
  options= ''
###[ UDP ]###
     sport= domain
     dport= 59755
     len= 82
     chksum= 0xa3a0
###[ DNS ]###
        id= 0
        qr= 1L
        opcode= QUERY
        aa= 0L
        tc= 0L
        rd= 0L
        ra= 1L
        z= 0L
        rcode= ok
        qdcount= 1
        ancount= 2
        nscount= 0
        arcount= 0
        \qd\
         |###[ DNS Question Record ]###
         |  qname= 'www.facebook.com.'
         |  qtype= A
         |  qclass= IN
        \an\
         |###[ DNS Resource Record ]###
         |  rrname= 'www.facebook.com.'
         |  type= CNAME
         |  rclass= IN
         |  ttl= 3198
         |  rdlen= 24
         |  rdata= 'star.c10r.facebook.com.'
         |###[ DNS Resource Record ]###
         |  rrname= 'star.c10r.facebook.com.'
         |  type= A
         |  rclass= IN
         |  ttl= 21
         |  rdlen= 4
         |  rdata= '31.13.68.49'
        ns= None
        ar= None

ふぅーん

広告を非表示にする