Class: Scanner

Scanner(options)

Starts, stops and queues scan requests

Constructor

new Scanner(options)

Parameters:
Name Type Description
options Object Class options
Source:

Extends

Members

(readonly) isBusy :Boolean

Indicates if a scan is currently running
Type:
  • Boolean
Source:

lastScanData :Object

Most recent scan object
Type:
  • Object
Source:

options :Object

Merge default options with given options
Type:
  • Object
Source:

parser :Parser

Main scan log parser
Type:
Source:

(readonly) profile :String

Current profile getter
Type:
  • String
Source:

profile :String

Current profile getter
Type:
  • String
Source:

scanQueue :Array

Scans waiting to be preformed
Type:
  • Array
Source:

worker :NmapWorker

Main Nmap process handler
Type:
Source:

Methods

addProfile(name, args)

Add custom scan profile
Parameters:
Name Type Description
name String Scan profile name
args String Nmap arguments
Source:

killScan() → {Boolean}

Force quit current scan
Source:
Returns:
true if kill succeeds, and false otherwise
Type
Boolean

startScan(target) → {Boolean}

Immediately starts a scan or queues the scan if one is currently running
Parameters:
Name Type Description
target string Target hostname(s), IP address(es), network(s), etc.
Source:
Returns:
True if immediate start, false if queued
Type
Boolean

throwDebug(debugText)

Emits a debug message to any listeners, calls the `onDebug` function if set
Parameters:
Name Type Description
debugText String Debug message text value
Overrides:
Source:

throwError(errText) → {Boolean}

Emits an error to any listeners, calls the `onError` function if set
Parameters:
Name Type Description
errText String Error message text value
Overrides:
Source:
Returns:
Type
Boolean

throwWarning(warnText)

Emits a warning to any listeners, calls the `onWarning` function if set
Parameters:
Name Type Description
warnText String Warning message text value
Overrides:
Source:

Events

nmapOut

Nmap live std output
Source:

ready

We are ready to scan
Source:

scanAborted

A scan has been canceled
Source:

scanComplete

A scan has completed
Source:

scanQueued

Requested scan has been queued
Source:

scanStarted

A scan has begun
Source: