in reply to Re: How to convert the domain name format data into hexadecimal format?
in thread How to convert the domain name format data into hexadecimal format?
Hi
Thanks for your reply. But the problem is that.
Suppose i have declared My $domain_Name="www.google.com". When i am sending the above domain name with other
parameters of the dns message like type as A and class as IN. The wireshark decoded the above domain name as 7777772e676F6F676C652e636F6D.
So it shows it as malformed data. When the above domain name decoded as 0377777706676F6F676C6503636F6D00, at that time the wireshark recognise it fine. SO is there any function in perl to convert the above domain name into the above hexa value so that the wireshark recognise it well.
The problem in the hexa value is that the data "www" is decoded as 777777 then the "." is decoded as 2e(as 2e is the ascii value for "." char, here it should be 06 which is the ascii value for ACknowledge).
Actually what i want is that i have fetch the Domain name from a database where it is stored in the format www.google.com. Then i store that domain name in a variable called my $Domain_Name. When i will send that Domain Name along with other data in a dns message,at time the wireshark should decoded it as
0377777706676F6F676C6503636F6D00 instead of 7777772e676F6F676C652e636F6D. Plz suggest me is there any function for it in perl? So that before sending the
Domain_Name to the wireshrk it converts it into(For example) the 0377777706676F6F676C6503636F6D00 for the case of www.google.com
Regd's
Sanjay
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to convert the domain name format data into hexadecimal format?
by shmem (Chancellor) on Jul 22, 2008 at 08:28 UTC |