| View previous topic :: View next topic |
| Author |
Message |
briguy Contributor

Joined: 09 Aug 2007 Posts: 79
|
Posted: Wed Aug 20, 2008 6:21 pm Post subject: @binary() dns header query |
|
|
All,
I was wanting to use the internet pack extensions UDP to query a dns server.
I can get the dns server to respond to my query but I’m not formatting the header of the UDP packet right. It needs to be sent in binary to the dns server.
I can’t figure out how to send the query in a binary format. It must be simple I presume.
Does @binary function work like…
%%string = @BINARY(DWORD,test)
So the %%string would = the conversion of the test string?
[url]
http://www.codeproject.com/KB/IP/dnslookupdotnet.aspx
http://www.ietf.org/rfc/rfc1034
http://www.ietf.org/rfc/rfc1035
[/url] |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Aug 20, 2008 8:57 pm Post subject: Re: @binary() dns header query |
|
|
| briguy wrote: | Does @binary function work like…
%%string = @BINARY(DWORD,test)
So the %%string would = the conversion of the test string?
|
No, the @Binary() function does not work like that. However you can do this.
| Code: |
%A = test
%S = @Binary(DWORD,@Addr("%A"))
|
This stores the address of the pointer to a string in the variable %A and converts that address into a DWORD numeric value with the @Binary() function and assigns the binary form to the variable %S.
So basicly if you pass the @Addr("%S") to some function then you would have a pointer to a pointer of type string.
Also just so you know there is already a VDS DLL extension that does DNS lookups and I think it is free. As a matter of fact you have 2 DLL's to choose from http://www.vdsworld.com/search.php?keywords=DNS&match_type=%200 _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
briguy Contributor

Joined: 09 Aug 2007 Posts: 79
|
Posted: Thu Aug 21, 2008 12:28 pm Post subject: |
|
|
Thanks dragonsphere,
Also on the DNS. I wanted to try to make a dns resolver with options like looking up mx records, a records etc. just like the RFC. That way I would not have to reley on a 3 party app i.e. nslookup.exe. The RFC seams easy enuff to understand it just sending the right binary and translating that back to a readable format after it answers. |
|
| Back to top |
|
 |
|