forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@binary() dns header query

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
briguy
Contributor
Contributor


Joined: 09 Aug 2007
Posts: 79

PostPosted: Wed Aug 20, 2008 6:21 pm    Post subject: @binary() dns header query Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Aug 20, 2008 8:57 pm    Post subject: Re: @binary() dns header query Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
briguy
Contributor
Contributor


Joined: 09 Aug 2007
Posts: 79

PostPosted: Thu Aug 21, 2008 12:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group