The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

 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

SYNOPSIS

    parse live nmap output and do probes

    BUGS: need to handle multiple addresses per host?

REQUIREMENTS

  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

Subs

usage

mk_filename

        generate a timestamp for filenames

save scan

        save scan xml to file
        save_scan ( Nmap::Result );

do_node

    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)

log_run

dump probe output to file: ip.probetyp.lst

check_port

        run a probe if trigger matches

scan_complete

        Call the banner scanner

HOST Struct (complete)

    {
        '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

        Scan started Callback
        unused

no_ports

        No Ports Callback
        unused

port_found

        Port Found Callback
        unused

HOST Struct

PORT Struct

    {
        'STATE' => 'open',
        'SERVICE' => undef,
        'NUMBER' => '21',
        'OWNER' => '',
        'PROTO' => 'tcp'
    }, 'Nmap::Scanner::Port'