jessica1231 has asked for the wisdom of the Perl Monks concerning the following question:
Now it works fine.. BUT I would like it multi-threaded so i can scan quicker and larger ranges. i have tried everything but nothing has worked, either the program did not work, or i was getting duplicates of everything. any help is appreciated.use IO::Socket; my $in_file2 = 'rang.txt'; open DAT,$in_file2; my @ip=<DAT>; close DAT; chomp(@ip); foreach my $ip(@ip) { $host = IO::Socket::INET->new( PeerAddr => $ip, PeerPort => 80, proto => 'tcp', Timeout=> 1 ) and open(OUT, ">>port.txt"); print OUT $ip."\n"; close(OUT); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Making a multi-threaded port scanner in perl?
by Corion (Patriarch) on Jan 13, 2014 at 08:34 UTC | |
|
Re: Making a multi-threaded port scanner in perl?
by Anonymous Monk on Jan 13, 2014 at 08:30 UTC | |
|
Re: Making a multi-threaded port scanner in perl?
by Preceptor (Deacon) on Jan 13, 2014 at 21:38 UTC |