Version: $Id: bannerscan.pl,v 1.5 2004/08/31 13:42:55 mmanno Exp $ Date: 1.2004 Author: mm v0.2 getopt added v0.1 base, copied from Nmap::Scanner example/event_scan.pl
parse live nmap output and do probes BUGS: need to handle multiple addresses per host?
XML::Simple threads Nmap::Scanner of course The following directories need to exist: out/ probe output goes here probes/ probe scripts here results/ nmaps xml logs will be saved here
generate a timestamp for filenames
save scan xml to file save_scan ( Nmap::Result );
Probe deployer for every entry in config do argl decide if i am to call function on array of hashes or on a single hash (cause xml::simple output differs if only one node is found)
dump probe output to file: ip.probetyp.lst
run a probe if trigger matches
Call the banner scanner
{ 'PORTS' => { tcp' => { '25' => bless( { 'STATE' => 'open', 'SERVICE' => bless( { 'PRODUCT' => 'OpenSSH', 'SERVICE' => undef, 'EXTRAINFO' => 'protocol 2.0', 'HIGHVER' => undef, 'NAME' => 'smtp', 'RPCNUM' => undef, 'CONF' => '10', 'METHOD' => 'probed', 'LOWVER' => undef, 'PROTO' => undef }, 'Nmap::Scanner::Service' ), 'NUMBER' => '25', 'PROTO' => 'tcp' }, 'Nmap::Scanner::Port' ), }, } 'NAME' => ',ford.rainbow', 'OS' => bless {}, 'Nmap::Scanner::OS' 'STATUS' => 'up', 'ADDRESSES' => [ bless( { 'TYPE' => 'ipv4', 'ADDRESS' => '10.1.1.5' }, 'Nmap::Scanner::Address' ) ], EXTRA_PORTS => bless( { 'STATE' => 'unknown', 'COUNT' => '0' }, 'Nmap::Scanner::ExtraPorts' ), }, 'Nmap::Scanner::Host'
Scan started Callback unused
No Ports Callback unused
Port Found Callback unused
{ 'STATE' => 'open', 'SERVICE' => undef, 'NUMBER' => '21', 'OWNER' => '', 'PROTO' => 'tcp' }, 'Nmap::Scanner::Port'
To install Nmap::Scanner, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Nmap::Scanner
CPAN shell
perl -MCPAN -e shell install Nmap::Scanner
For more information on module installation, please visit the detailed CPAN module installation guide.