33
44class CPE (object ):
55 """
6- CPE class offers an API for basic CPE objects.
7- These objects could be found in NmapService or in <os> tag
8- within NmapHost.
6+ CPE class offers an API for basic CPE objects.
7+ These objects could be found in NmapService or in <os> tag
8+ within NmapHost.
99
10- :todo: interpret CPE string and provide appropriate API
10+ :todo: interpret CPE string and provide appropriate API
1111 """
1212
1313 def __init__ (self , cpestring ):
@@ -29,14 +29,14 @@ def __init__(self, cpestring):
2929 @property
3030 def cpestring (self ):
3131 """
32- Accessor for the full CPE string.
32+ Accessor for the full CPE string.
3333 """
3434 return self ._cpestring
3535
3636 @property
3737 def cpedict (self ):
3838 """
39- Accessor for _cpedict
39+ Accessor for _cpedict
4040 """
4141 return self ._cpedict
4242
@@ -45,60 +45,60 @@ def __repr__(self):
4545
4646 def get_part (self ):
4747 """
48- Returns the cpe part (/o, /h, /a)
48+ Returns the cpe part (/o, /h, /a)
4949 """
5050 return self ._cpedict ["part" ]
5151
5252 def get_vendor (self ):
5353 """
54- Returns the vendor name
54+ Returns the vendor name
5555 """
5656 return self ._cpedict ["vendor" ]
5757
5858 def get_product (self ):
5959 """
60- Returns the product name
60+ Returns the product name
6161 """
6262 return self ._cpedict ["product" ]
6363
6464 def get_version (self ):
6565 """
66- Returns the version of the cpe
66+ Returns the version of the cpe
6767 """
6868 return self ._cpedict ["version" ]
6969
7070 def get_update (self ):
7171 """
72- Returns the update version
72+ Returns the update version
7373 """
7474 return self ._cpedict ["update" ]
7575
7676 def get_edition (self ):
7777 """
78- Returns the cpe edition
78+ Returns the cpe edition
7979 """
8080 return self ._cpedict ["edition" ]
8181
8282 def get_language (self ):
8383 """
84- Returns the cpe language
84+ Returns the cpe language
8585 """
8686 return self ._cpedict ["language" ]
8787
8888 def is_application (self ):
8989 """
90- Returns True if cpe describes an application
90+ Returns True if cpe describes an application
9191 """
9292 return self .get_part () == "/a"
9393
9494 def is_hardware (self ):
9595 """
96- Returns True if cpe describes a hardware
96+ Returns True if cpe describes a hardware
9797 """
9898 return self .get_part () == "/h"
9999
100100 def is_operating_system (self ):
101101 """
102- Returns True if cpe describes an operating system
102+ Returns True if cpe describes an operating system
103103 """
104104 return self .get_part () == "/o"
0 commit comments