CPE2_3_WFN class

class cpe.cpe2_3_wfn.CPE2_3_WFN(cpe_str, *args, **kwargs)

Implementation of WFN of version 2.3 of CPE specification.

A CPE Name is a percent-encoded WFN with each name starting with the prefix ‘wfn:’.

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: wfn:[a1=v1, a2=v2, …, an=vn]

Only the following attributes SHALL be permitted in a WFN attribute-value pair:

  1. part
  2. vendor
  3. product
  4. version
  5. update
  6. edition
  7. language
  8. sw_edition
  9. target_sw
  10. target_hw
  11. other
static __new__(cls, cpe_str, *args, **kwargs)

Create a new CPE Name of version 2.3 with WFN style.

Parameters:cpe_str (string) – CPE Name string
Returns:CPE object of version 2.3 of CPE specification with WFN style.
Return type:CPE2_3_WFN
get_attribute_values(att_name)

Returns the values of attribute “att_name” of CPE Name. By default a only element in each part.

Parameters:att_name (string) – Attribute name to get
Returns:List of attribute values
Return type:list
Exception:ValueError - invalid attribute name