I want to talk to DNS directly

Brad Knowles brad.knowles at skynet.be
Thu Jul 5 09:13:19 UTC 2001


At 6:12 PM +0000 7/4/01, M. Richardson wrote:

>  I'm just working on something here for a friend of mine (how suspicious does
>  that sound ? :) and I'm wondering how I can directly talk to a DNS server ?

	You can use tools like dig, which make use of the resolver 
library.  Alternatively, you can write programs in C, or Perl, or 
some other language that will give you direct access to the resolver 
library.

>  To elaborate, I want to be able to do something like :
>
>      telnet ns1.nameserver.com 53
>          query="nameserver.com"

	Sorry, it doesn't work like this.

>  Any light anybody can shed on this would be REALLY appreciated ?

	Read the _DNS and BIND_ book.  It will give you more information 
on the DNS packet format.  However, I would like to meet the wizard 
that can generate UDP and TCP packets that would use this protocol, 
directly from the command-line.

-- 
Brad Knowles, <brad.knowles at skynet.be>

/*        efdtt.c  Author:  Charles M. Hannum <root at ihack.net>          */
/*       Represented as 1045 digit prime number by Phil Carmody         */
/*     Prime as DNS cname chain by Roy Arends and Walter Belgers        */
/*                                                                      */
/*     Usage is:  cat title-key scrambled.vob | efdtt >clear.vob        */
/*   where title-key = "153 2 8 105 225" or other similar 5-byte key    */

dig decss.friet.org|perl -ne'if(/^x/){s/[x.]//g;print pack(H124,$_)}'


More information about the bind-users mailing list