Skip to content

Common Platform Enumeration (CPE) token parser

Notifications You must be signed in to change notification settings

Christiaan-de-Wet/cpe-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cpe-parser

The cpe-parser libray is a parses for CPE value. This cpe value can be either uri biding cpe or formatted binding value.

🔨 Installation

 $ pip install cpeparser

Guide

from cpeparser import CpeParser
cpe = CpeParser()
result = cpe.parser("cpe:2.3:a:ipython:ipython:*:*:*:*:*:*:*:*")
print(result)
{
    'part': 'a',
    'vendor': 'ipython',
    'product': 'ipython',
    'version': '*',
    'update': '*',
    'edition': '*',
    'language': '*',
    'sw_edition': '*',
    'target_sw': '*',
    'target_hw': '*',
    'other': '*'
}

Default values are returned as asterisks '*' that represent ANY.

NIST Documentation

This library follows the guidelines outline here: https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7695.pdf

About

Common Platform Enumeration (CPE) token parser

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%