title: Human readable form of DNS lookup
body: <p>I have got a very simple idea in mind that i want to try out. Say i have a browser, chrome for instance, and i want to search for the ip of the domain name, say <code>www.google.com</code>. I use windows 7 and i have set the dns lookup properties to manual and have given the address <code>127.0.0.1</code> where my server (written in Python is running). I started my server and i could see the dns query but it was very weird as in it is showing faces like this:</p>
  
  <pre><code>WAITING FOR CONNECTION.........
  
  .........recieved from :  ('127.0.0.1', 59339)
  
  'V"\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x06teredo\x04ipv6\tmicrosoft\x03com\x00\x00\x01\x00\x01'
  </code></pre>
  
  <p>The <code>waiting for connection</code> and the <code>received from</code> is from my server. How do i get a breakdown form(a human readable form) of this message??</p>
  
  <p>This is my server code(quiet elementary but still):</p>
  
  <p>Here is the code:</p>
  
  <pre><code>from time import sleep 
  import socket 
  host='' 
  port=53 
  addr_list=(host,port) 
  buf_siz=1024 
  udp=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) 
  udp.bind(addr_list) 
  while True: 
      print 'WAITING FOR CONNECTION.........' 
      data,addr = udp.recvfrom(buf_siz) print '.........recieved from : ',addr 
      sleep(3) 
      print data
  </code></pre>