Without totally re-engineering nmap in Perl I can't think of a better way of doing it than:
You will need to run this as root and update the value of @hosts appropriately.#!/usr/bin/perl -w use strict; my @hosts = qw(localhost); HOST: foreach my $host (@hosts ) { open(NMAP, "nmap -O $host |") || next; while(<NMAP>) { chomp; if(/Remote operating system guess: (.*)/) { print "$host $1\n"; next HOST; } } }
/J\
In reply to Re: Remote server OS identification
by gellyfish
in thread Remote server OS identification
by aleatoric
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |