Im trying to send a DNS any request with Net::DNS::Packet.
For some reason when i do this in perl:
my $str = '8.8.8.8';
my $dnspacket = new Net::DNS::Packet('vmware.com'.". 86400 ANY" +$str);
my $dnsdata = $dnspacket->data;
Here is the request when using my script Captured with TCPDUMP:
03:34:25.238020 IP 94.102.49.168.59681 > 8.8.8.8.53: 59189+ PTR? 8.8.i
+n-addr.arpa. (34)
0x0000: 0021 1b82 5000 0025 90e0 10e3 0800 4500 .!..P..%......E.
0x0010: 003e 5969 4000 4011 4128 5e66 31a8 0808 .>Yi@.@.A(^f1...
0x0020: 0808 e921 0035 002a a059 e735 0100 0001 ...!.5.*.Y.5....
0x0030: 0000 0000 0000 0138 0138 0769 6e2d 6164 .......8.8.in-ad
0x0040: 6472 0461 7270 6100 000c 0001 dr.arpa.....
Here is the request when using Dig Captured with TCPDUMP:
03:32:27.263486 IP 94.102.49.168.38437 > 8.8.8.8.53: 17767+ [1au] ANY?
+ vmware.com. (39)
0x0000: 0021 1b82 5000 0025 90e0 10e3 0800 4500 .!..P..%......E.
0x0010: 0043 0000 4000 4011 9a8c 5e66 31a8 0808 .C..@.@...^f1...
0x0020: 0808 9625 0035 002f a05e 4567 0100 0001 ...%.5./.^Eg....
0x0030: 0000 0000 0001 0676 6d77 6172 6503 636f .......vmware.co
0x0040: 6d00 00ff 0001 0000 29ff ff00 0000 0000 m.......).......
0x0050: 00 .
How could i get the same type of request to be sent from my script?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.