NmapHost is a class representing a host object of NmapReport
Method | __eq__ |
Compare eq NmapHost based on : |
Method | __hash__ |
Hash is needed to be able to use our object in sets :return: hash |
Method | __init__ |
NmapHost constructor :param starttime: unix timestamp of when the scan against that host started :type starttime: string :param endtime: unix timestamp of when the scan against that host ended :type endtime: string :param address: dict ie :{'addr': '127... |
Method | __ne__ |
Compare ne NmapHost based on: |
Method | __repr__ |
String representing the object :return: string |
Method | address |
Setter for the address dictionnary. |
Method | changed |
return the number of attribute who have changed :param other: NmapHost object to compare :return int |
Method | diff |
Calls NmapDiff to check the difference between self and another NmapHost object. |
Method | get |
Return a dict representation of the object. |
Method | get |
Same as get_ports() but only for open ports |
Method | get |
Retrieve a list of the port used by each service of the NmapHost |
Method | get |
:param portno: int the portnumber :param protocol='tcp': string ('tcp','udp') |
Method | get |
Returns a NmapService by providing its id. |
Method | is |
method to determine if host is up or not |
Method | os |
Returns an array of possible OS class detected during the OS fingerprinting. |
Method | os |
Returns an array of possible OS match detected during the OS fingerprinting |
Method | os |
Returns an array of the ports used for OS fingerprinting |
Method | status |
Setter for the status dictionnary. |
Instance Variable | os |
Undocumented |
Property | address |
Accessor for the IP address of the scanned host |
Property | distance |
Number of hops to host |
Property | endtime |
Accessor for the unix timestamp of when the scan ended |
Property | extraports |
dictionnary containing reasons why extra ports scanned for which a common state, usually, closed was discovered. |
Property | extraports |
dictionnary containing state and amount of extra ports scanned for which a common state, usually, closed was discovered. |
Property | hostnames |
Accessor returning the list of hostnames (array of strings). |
Property | id |
id of the host. Used for diff()ing NmapObjects |
Property | ipsequence |
Return the class of ip sequence of the remote hosts. |
Property | ipv4 |
Accessor for the IPv4 address of the scanned host |
Property | ipv6 |
Accessor for the IPv6 address of the scanned host |
Property | lastboot |
Since when the host was booted. |
Property | mac |
Accessor for the MAC address of the scanned host |
Property | os |
Returns the fingerprint of the scanned system. |
Property | os |
Specify if the host has OS fingerprint data available |
Property | scripts |
Scripts results specific to the scanned host |
Property | services |
Accessor for the array of scanned services for that host. |
Property | starttime |
Accessor for the unix timestamp of when the scan was started |
Property | status |
Accessor for the host's status (up, down, unknown...) |
Property | tcpsequence |
Returns the difficulty to determine remotely predict the tcp sequencing. |
Property | uptime |
uptime of the remote host (if nmap was able to determine it) |
Property | vendor |
Accessor for the vendor attribute of the scanned host |
Instance Variable | _address |
Undocumented |
Instance Variable | _endtime |
Undocumented |
Instance Variable | _extras |
Undocumented |
Instance Variable | _hostnames |
Undocumented |
Instance Variable | _ipv4 |
Undocumented |
Instance Variable | _ipv6 |
Undocumented |
Instance Variable | _mac |
Undocumented |
Instance Variable | _main |
Undocumented |
Instance Variable | _osfingerprinted |
Undocumented |
Instance Variable | _services |
Undocumented |
Instance Variable | _starttime |
Undocumented |
Instance Variable | _status |
Undocumented |
Instance Variable | _vendor |
Undocumented |
Compare eq NmapHost based on : - hostnames - address - if an associated services has changed :return: boolean
NmapHost constructor :param starttime: unix timestamp of when the scan against that host started :type starttime: string :param endtime: unix timestamp of when the scan against that host ended :type endtime: string :param address: dict ie :{'addr': '127.0.0.1', 'addrtype': 'ipv4'} :param status: dict ie:{'reason': 'localhost-response', 'state': 'up'} :return: NmapHost:
Compare ne NmapHost based on: - hostnames - address - if an associated services has changed :return: boolean
Setter for the address dictionnary. :param addrdict: valid dict is {'addr': '1.1.1.1', 'addrtype': 'ipv4'}
return the number of attribute who have changed :param other: NmapHost object to compare :return int
Calls NmapDiff to check the difference between self and another NmapHost object. Will return a NmapDiff object. This objects return python set() of keys describing the elements which have changed, were added, removed or kept unchanged. :param other: NmapHost to diff with :return: NmapDiff object
Return a dict representation of the object. This is needed by NmapDiff to allow comparaison :return dict
Same as get_ports() but only for open ports :return: list: of tuples (port,'proto') ie:[(22,'tcp'),(25, 'tcp')]
Retrieve a list of the port used by each service of the NmapHost :return: list: of tuples (port,'proto') ie:[(22,'tcp'),(25, 'tcp')]
:param portno: int the portnumber :param protocol='tcp': string ('tcp','udp') :return: NmapService or None
Returns a NmapService by providing its id. The id of a nmap service is a python tupl made of (protocol, port)
Returns an array of possible OS class detected during the OS fingerprinting. :return: Array of NmapOSClass objects
Returns an array of possible OS match detected during the OS fingerprinting :return: array of NmapOSMatches objects
Returns an array of the ports used for OS fingerprinting :return: array of ports used: [{'portid': '22', 'proto': 'tcp', 'state': 'open'},]
Setter for the status dictionnary. :param statusdict: valid dict is {"state": "open", "reason": "syn-ack", "reason_ttl": "0"} 'state' is the only mandatory key.
dictionnary containing reasons why extra ports scanned for which a common state, usually, closed was discovered. :return: array of dict containing keys 'state' and 'count' or None
dictionnary containing state and amount of extra ports scanned for which a common state, usually, closed was discovered. :return: dict with keys 'state' and 'count' or None
Accessor for the array of scanned services for that host. An array of NmapService objects is returned. :return: array of NmapService