Login Register
The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


random ip generator perl filter_list
Author
Message
random ip generator perl #1
this is used to generate random ips to feed into a program like onesixty one have a ball

[code]
#!/usr/bin/perl
sub main {
open ($OUT, ">.ip.txt") or die "cannot open file";


print "This script will try to create a random ip list of 450,000 hosts\n";


for($i=0;$i<=450000;$i++){
$oct1 = int rand(254);
$oct2 = int rand(254);
$oct3 = int rand(254);
$oct4 = int rand(254);
$ip = join('.', $oct1, $oct2, $oct3, $oct4);

&trace_progress($ip);

}

}

sub trace_progress {
my $word_progress=shift;



print $OUT "$word_progress\n";
}






&main()



/[code]

========================================


Reply







Users browsing this thread: