-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcveClass.py
52 lines (43 loc) · 1.59 KB
/
cveClass.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from cpeClass import Cpe
class Cve:
exploitabilityScore = None
id = None
publishedDate = None
lastModifiedDate = None
description = None
version = None
baseScore = None
vectorString = None
source = None
urlSource = None
cpeList = []
def __init__(self, id, publishedDate, lastModifiedDate, description):
self.id = id
self.publishedDate = publishedDate
self.lastModifiedDate = lastModifiedDate
self.description = description
def getCvss(self, version, baseScore, vectorString, exploitabilityScore):
self.version = version
self.baseScore = baseScore
self.vectorString = vectorString
self.exploitabilityScore = exploitabilityScore
def getSource(self, source, urlSource):
self.source = source
self.urlSource = urlSource
def getCpe(self, cpeList):
self.cpeList = cpeList
def showAll(self):
print("\n\n")
print("id: " + str(self.id))
print("publishedDate: " + str(self.publishedDate))
print("lastModifiedDate: " + str(self.lastModifiedDate))
print("description: " + str(self.description))
print("version: " + str(self.version))
print("baseScore: " + str(self.baseScore))
print("vectorString: " + str(self.vectorString))
print("exploitabilityScore: " + str(self.exploitabilityScore))
print("\nVulnerable CPEs: ")
for i in range(len(self.cpeList)):
self.cpeList[i].showAll()
print("\nsource: " + str(self.source))
print("urlSource: " + str(self.urlSource))