Objects

capec

class CveXplore.objects.capec.Capec(**kwargs)[source]

Bases: DatasourceConnection

Capec database object

__eq__(other)[source]

Return self==value.

__hash__ = None
__init__(**kwargs)[source]

Create a DatasourceConnection object

Parameters

collection (str) – Define the collection to connect to

__ne__(other)[source]

Return self!=value.

__repr__()[source]

String representation of object

Generator function for iterating the related capecs from the current Capec object

Returns

Capec objects

Return type

Capec

Generator function for iterating the related weaknesses from the current Capec object

Returns

Cwe object

Return type

Cwe

to_dict()[source]

Method to convert the entire object to a dictionary

Returns

Data from object

Return type

dict

cpe

class CveXplore.objects.cpe.Cpe(**kwargs)[source]

Bases: DatasourceConnection

Cpe database object

__eq__(other)[source]

Return self==value.

__hash__ = None
__init__(**kwargs)[source]

Create a DatasourceConnection object

Parameters

collection (str) – Define the collection to connect to

__ne__(other)[source]

Return self!=value.

__repr__()[source]

String representation of object

iter_cpe_names()[source]

Generator function for iterating over cpe_names for this CPE.

Returns

cpe_name

Return type

str

iter_cves_matching_cpe(vuln_prod_search=False)[source]

Generator function for iterating over cve’s matching this CPE. By default the search will be made matching the configuration fields of the cves documents.

Parameters

vuln_prod_search (bool) – Search for matching products instead of configurations

Returns

Matching CVES

Return type

Cves

to_dict()[source]

Method to convert the entire object to a dictionary

Returns

Data from object

Return type

dict

cves

class CveXplore.objects.cves.Cves(**kwargs)[source]

Bases: DatasourceConnection

Cves database object

__eq__(other)[source]

Return self==value.

__hash__ = None
__init__(**kwargs)[source]

Create a DatasourceConnection object

Parameters

collection (str) – Define the collection to connect to

__ne__(other)[source]

Return self!=value.

__repr__()[source]

String representation of object

iter_capec()[source]

Generator function for iterating over capecs for this CVE.

Returns

capec

Return type

Capec

iter_references()[source]

Generator function for iterating over references for this CVE.

Returns

references

Return type

str

iter_vuln_configurations()[source]

Generator function for iterating over vulnerable configurations for this CVE.

Returns

vulnerable_configuration

Return type

str

to_dict()[source]

Method to convert the entire object to a dictionary

Returns

Data from object

Return type

dict

cwe

class CveXplore.objects.cwe.Cwe(**kwargs)[source]

Bases: DatasourceConnection

Cwe database object

__eq__(other)[source]

Return self==value.

__hash__ = None
__init__(**kwargs)[source]

Create a DatasourceConnection object

Parameters

collection (str) – Define the collection to connect to

__ne__(other)[source]

Return self!=value.

__repr__()[source]

String representation of object

Generator function for iterating the related capecs from the current weakness object

Returns

Capec object

Return type

Capec

Generator function for iterating the related weaknesses from the current weakness object

Returns

Cwe object

Return type

Cwe

to_dict()[source]

Method to convert the entire object to a dictionary

Returns

Data from object

Return type

dict

via4

class CveXplore.objects.via4.Via4(**kwargs)[source]

Bases: DatasourceConnection

Via4 database object

__eq__(other)[source]

Return self==value.

__hash__ = None
__init__(**kwargs)[source]

Create a DatasourceConnection object

Parameters

collection (str) – Define the collection to connect to

__ne__(other)[source]

Return self!=value.

__repr__()[source]

String representation of object

to_dict()[source]

Method to convert the entire object to a dictionary

Returns

Data from object

Return type

dict