in reply to Re^3: Nmap::Scanner breaks my while loop, I think
in thread Nmap::Scanner breaks my while loop, I think
Yes, I am pretty sure. This code:
print STDERR "\nNetwork $r[0], mask $r[1]\n"; my $scanner = new Nmap::Scanner; my $results; print STDERR "Start Scan\n"; eval{ $results = $scanner->scan("-v -sP $r[0]/$r[1]"); }; print STDERR "Error catched: $@\n" if($@); print STDERR "Scan complete\n";
Yeilds this output:
Network xx.xx.xx.xx, mask yy Start Scan Scan complete Network 10.8.165.160, mask 28 Start Scan <nmap-error> <pid="18142"/> <cmdline="'/usr/bin/nmap' -v -v -v -v -sP 10.8.165.160/28 -oX -"/> <nmap-err>RTTVAR has grown to over 2.3 seconds, decreasing to 2.0 </nmap-msg> </nmap-error>
ie the two last prints are not executed
|
|---|