This is the base class for output processors for Nmap::Scanner.
Use this to tell the backend processor you want to be notified when the scan of a HOST is complete.
Pass in a reference to a function that will receive two arguments when called: A reference to the calling object and a reference to an Nmap::Scanner::Host instance.
Use this to tell the backend processor you want to be notified when the scan of a HOST has started.
Use this to tell the backend processor you want to be notified when nmap has determined that the current host is not available (up).
Use this to tell the backend processor you want to be notified when an open port has been found on the current host being scanned.
Pass in a reference to a function that will receive three arguments when called: A reference to the calling object, a reference to an Nmap::Scanner::Host instance, and a reference to an Nmap::Scanner::Port containing information on the port.
Use this to tell the backend processor you want to be notified when the scan of a HOST has yielded NO open ports.
Pass in a reference to a function that will receive three arguments when called: A reference to the calling object, a reference to an Nmap::Scanner::Host instance, and a reference to an Nmap::Scanner::ExtraPorts instance with some information on the states of the non-open ports.
Return the Nmap::Scanner::Results instance created by the scan.
This method may be called by the user. It starts the nmap process using the options set by the user via the scan() method or setters of Nmap::Scanner::Scanner. The method returns the PID of the child nmap process, a reader handle to read from the nmap process, a write handle to write to nmap, and an error handle which will contain data if nmap throws an error.
Example code:
sub process {
my $self = shift; my $cmdline = shift; my ($pid, $in, $out, $err) = $self->SUPER::start_nmap($cmdline); # Process filehandles
}
This method is called by the sub-classed processor to start the nmap process using options set by the user via the scan() method or setters of Nmap::Scanner::Scanner. The sub-classed processor is returned the PID of the child nmap process and a reader handle to read from the nmap process.
my $self = shift; my $cmdline = shift; my ($pid, $in) = $self->SUPER::start_nmap2($cmdline); # Process filehandles
Notify the listener that a scan started event has occurred. Caller is passed a reference to the callers self reference (object instance) and an Nmap::Scanner::Host instance.
Notify the listener that a scan complete event has occurred. Caller is passed a reference to the callers self reference (object instance) and an Nmap::Scanner::Host instance.
Notify the listener that a port found event has occurred. Caller is passed a reference to the callers self reference (object instance), an Nmap::Scanner::Host instance, and an Nmap::Scanner::Port instance.
Notify the listener that a scan started event has occurred. Caller is passed a reference to the callers self reference (object instance), an Nmap::Scanner::Host instance, and an Nmap::Scanner::ExtraPorts instance.
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.