Quote:
|
Originally Posted by Franck
I guess in php.
The program grabs ips from a text file and does this:
12.108.24.0 12.108.24.255
12.106.223.0 12.106.223.255
12.104.79.0 12.104.79.255
etc. It makes a range from 0 to 255 for each ip on a new line.
Is this simple to do?
Anybody can do it for some paypal or epass $?
|
#!/usr/bin/perl
use strict ;
open (FILE, "NAMEOFFILE") ;
my @buf = <FILE> ;
close (FILE) ;
foreach my $item (@buf) {
chomp $item ;
my ($one,$two,$three) = split (/\./, $item) ;
for my $i (0 .. 255) {
print "$one.$two.$three.$i\n" ;
}
}
Change NAMEOFFILE to whatever the file is that has your IP's listed.
IP's should be in the form of:
1.1.1.1
2.2.2.2
3.3.3.3
Etc. If you have a question let me know.