NmapReport is the usual interface for the end user to read scans output. A NmapReport as the following structure: - Scan headers data - A list of scanned hosts (NmapReport.hosts) - Scan footer data It is to note that each NmapHost comprised in NmapReport.hosts array contains also a list of scanned services (NmapService object). This means that if NmapParser.parse*() is the input interface for the end user of the lib. NmapReport is certainly the output interface for the end user of the lib.
Method | __eq__ |
Compare eq NmapReport based on : |
Method | __init__ |
Constructor for NmapReport object. |
Method | __ne__ |
Compare ne NmapReport based on: |
Method | __repr__ |
Returns a string-based representation of the report |
Method | diff |
Calls NmapDiff to check the difference between self and another NmapReport object. |
Method | get |
Return a python dict representation of the NmapReport object. This is used to diff() NmapReport objects via NmapDiff. |
Method | get |
Gets a NmapHost object directly from the host array by looking it up by id. |
Method | get |
Returns a dict representing the NmapReport object. |
Method | is |
Checks if the report is consistent and can be diffed(). |
Method | save |
This method gets a NmapBackendPlugin representing the backend. |
Property | commandline |
Accessor returning the full nmap command line fired. |
Property | elapsed |
Accessor returning the number of seconds the scan took |
Property | endtime |
Accessor returning a unix timestamp of when the scan ended. |
Property | endtimestr |
Accessor returning a human readable time string of when the scan ended. |
Property | hosts |
Accessor returning an array of scanned hosts. |
Property | hosts |
Accessor returning the number of host detected as 'down' during the scan. |
Property | hosts |
Accessor returning the number of hosts scanned in total. |
Property | hosts |
Accessor returning the number of host detected as 'up' during the scan. |
Property | id |
Dummy id() defined for reports. |
Property | numservices |
Accessor returning the number of services the scan attempted to enumerate. |
Property | scan |
Accessor returning a string which identifies what type of scan was launched (syn, ack, tcp,...). |
Property | started |
Accessor returning a unix timestamp of when the scan was started. |
Property | startedstr |
Accessor returning a human readable string of when the scan was started |
Property | summary |
Accessor returning a string describing and summarizing the scan. |
Property | version |
Accessor returning the version of the nmap binary used to perform the scan. |
Property | xmlversion |
Accessor returning the XML output version of the nmap report. |
Method | __set |
Undocumented |
Instance Variable | _hosts |
Undocumented |
Instance Variable | _nmaprun |
Undocumented |
Instance Variable | _runstats |
Undocumented |
Instance Variable | _scaninfo |
Undocumented |
Compare eq NmapReport based on : - create a diff obj and check the result report are equal if added&changed&removed are empty :return: boolean
Compare ne NmapReport based on: - create a diff obj and check the result report are ne if added|changed|removed are not empty :return: boolean
Calls NmapDiff to check the difference between self and another NmapReport object. Will return a NmapDiff object. :return: NmapDiff object :todo: remove is_consistent approach, diff() should be generic.
Return a python dict representation of the NmapReport object. This is used to diff() NmapReport objects via NmapDiff. :return: dict
Gets a NmapHost object directly from the host array by looking it up by id. :param ip_addr: ip address of the host to lookup :type ip_addr: string :return: NmapHost
Returns a dict representing the NmapReport object. :return: dict :todo: deprecate. get rid of this ugliness.
Checks if the report is consistent and can be diffed(). This needs to be rewritten and removed: diff() should be generic. :return: boolean
This method gets a NmapBackendPlugin representing the backend. :param backend: libnmap.plugins.PluginBackend object. Object created by BackendPluginFactory and enabling nmap reports to be saved/stored in any type of backend implemented in plugins. The primary key of the stored object is returned. :return: str
Accessor returning an array of scanned hosts. Scanned hosts are NmapHost objects. :return: array of NmapHost
Accessor returning the number of host detected as 'down' during the scan. :return: integer (0 >= or -1)
Accessor returning the number of host detected as 'up' during the scan. :return: integer (0 >= or -1)
Accessor returning a string which identifies what type of scan was launched (syn, ack, tcp,...). :return: string