[Trilug-ontopic] nmap::scanner, perl and os matching
Greg Brown
gwbrown1 at gmail.com
Wed Apr 4 15:04:37 EDT 2012
I'm scratching my head on this one. Is anyone using perl and nmap::scanner
along with guess_os() (a supposed built-in function)? Here is a code
snippet:
my $scan = Nmap::Scanner->new();
$scan->tcp_syn_scan();
$scan->add_scan_port('1-1024');
# $scan->guess_os();
$scan->add_target($address);
my $results = $scan->scan();
my $hosts = $results->get_host_list();
# $os = $results->guess_os();
If I uncomment just $scan->guess_os() the script breaks about 3/4 of the
time with errors such as:
<nmap-error>
<pid="29819"/>
<cmdline="'/usr/bin/nmap' -v -v -v -sS -p 1-1024 -O -oX -
10.239.237.135"/>
<nmap-err>WARNING: OS didn't match until try #2
</nmap-msg>
</nmap-error>
On the times it does work the BEST I'm able to do is get some kind of
binary returned instead of the OS matches.
Any ideas?
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.trilug.org/pipermail/trilug-ontopic/attachments/20120404/4b843623/attachment.html>
More information about the Trilug-ontopic
mailing list