in reply to Problem with Nmap::Scanner
#!/usr/bin/perl use warnings; use Nmap::Scanner; use Data::Dumper; my $scan = Nmap::Scanner->new(); $scan->add_target('localhost'); $scan->add_scan_port('16310-16316'); $scan->tcp_syn_scan(); my $results = $scan->scan(); print Dumper($results);
(I truncated the answer as it's rather too verbose, but rest assured it's showing the port status) This is using Nmap::Scanner 1.0~# ./test.pl $VAR1 = bless( { 'ALLHOSTS' => { 'Nmap::Scanner::Address=HASH(0x19a186 +0)' => bless( { + 'ports' => { ..snip... 'Nmap::Scanner::P +ort' ), ...
standard perl that comes with Ubuntu 11.10 (64bit)# perl -v This is perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-li +nux-gnu-thread-multi (with 45 registered patches, see perl -V for more detail)
# nmap -V Nmap version 5.21 ( http://nmap.org )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with Nmap::Scanner
by ashok.g (Beadle) on Jan 03, 2012 at 11:53 UTC |