CPE2_3_URI class¶
- class cpe.cpe2_3_uri.CPE2_3_URI(cpe_str, *args, **kwargs)[source]¶
Implementation of binding style URI of version 2.3 of CPE specification.
A CPE Name is a percent-encoded URI with each name starting with the prefix (the URI scheme name) ‘cpe:’.
Each platform can be broken down into many distinct parts. A CPE Name specifies a simple part and is used to identify any platform that matches the description of that part.
The distinct parts are:
- Hardware part: the physical platform supporting the IT system.
- Operating system part: the operating system controls and manages the IT hardware.
- Application part: software systems, services, servers, and packages installed on the system.
CPE Name syntax:
cpe:/{part}:{vendor}:{product}:{version}:{update}:{edition}:{language}- STYLE = 'URI'¶
Style of CPE Name
- __getitem__(i)[source]¶
Returns the i’th component name of CPE Name.
Parameters: i (int) – component index to find Returns: component string found Return type: CPEComponent Exception: IndexError - index not found in CPE Name
- __len__()[source]¶
Returns the number of components of CPE Name.
Returns: count of components of CPE Name Return type: int
- static __new__(cpe_str, *args, **kwargs)[source]¶
Create a new CPE Name of version 2.3 with URI style.
Parameters: cpe_str (string) – CPE Name string Returns: CPE object of version 2.3 of CPE specification with URI style. Return type: CPE2_3_URI