NmapOSMatch is an internal class used for offering results from an nmap os fingerprint. This common interfaces makes a compatibility between old nmap xml (<1.04) and new nmap xml versions (used in nmapv6 for instance). In previous xml version, osclass tags from nmap fingerprints were not directly mapped to a osmatch. In new xml version, osclass could be embedded in osmatch tag. The approach to solve this is to create a common class which will, for older xml version, match based on the accuracy osclass to an osmatch. If no match, an osmatch will be made up from a concat of os class attributes: vendor and osfamily. Unmatched osclass will have a line attribute of -1. More info, see issue #26 or http://seclists.org/nmap-dev/2012/q2/252
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | add |
Add a NmapOSClass object to the OSMatch object. This method is useful to implement compatibility with older versions of NMAP by providing a common interface to access os fingerprint data. |
Method | get |
This method return a list of cpe stings and not CPE objects as the NmapOSClass.cpelist property. This method is a helper to simplify data management. |
Property | accuracy |
Accessor for accuracy |
Property | line |
Accessor for line attribute as integer. value equals -1 if this osmatch holds orphans NmapOSClass objects. This could happen with older version of nmap xml engine (<1.04 (e.g: nmapv6)). |
Property | name |
Accessor for name attribute (e.g.: Linux 2.4.26 (Slackware 10.0.0)) |
Property | osclasses |
Accessor for all NmapOSClass objects matching with this OS Match |
Instance Variable | _accuracy |
Undocumented |
Instance Variable | _line |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _osclasses |
Undocumented |
Add a NmapOSClass object to the OSMatch object. This method is useful to implement compatibility with older versions of NMAP by providing a common interface to access os fingerprint data.
This method return a list of cpe stings and not CPE objects as the NmapOSClass.cpelist property. This method is a helper to simplify data management. For more advanced handling of CPE data, use NmapOSClass.cpelist and use the methods from CPE class