32 | 32 |
super().__init__(*arg, **kwargs)
|
33 | 33 |
self.id = "nuclei"
|
34 | 34 |
self.name = "Nuclei"
|
35 | |
self.plugin_version = "1.0.2"
|
36 | |
self.version = "2.5.3"
|
|
35 |
self.plugin_version = "1.0.3"
|
|
36 |
self.version = "2.5.5"
|
37 | 37 |
self.json_keys = {"matched-at", "template-id", "host"}
|
38 | 38 |
self._command_regex = re.compile(r'^(sudo nuclei|nuclei|\.\/nuclei|^.*?nuclei)\s+.*?')
|
39 | 39 |
self.xml_arg_re = re.compile(r"^.*(-o\s*[^\s]+).*$")
|
|
87 | 87 |
references = [references]
|
88 | 88 |
else:
|
89 | 89 |
references = []
|
90 | |
cwe = vuln_dict['info'].get('cwe', [])
|
91 | |
capec = vuln_dict['info'].get('capec', [])
|
92 | |
refs = sorted(list(set(reference + references + cwe + capec)))
|
|
90 |
|
|
91 |
cve = vuln_dict['info'].get('classification', {}).get('cve-id', [])
|
|
92 |
cve = [x.upper() for x in cve]
|
|
93 |
|
|
94 |
# TODO CVSSv2, CVSSv3, CWE and CAPEC
|
|
95 |
#cvssv2 = vuln_dict['info'].get('classification', {}).get('cvss-score')
|
|
96 |
#cvssv3 = vuln_dict['info'].get('classification', {}).get('cvss-metrics')
|
|
97 |
#cwe = vuln_dict['info'].get('classification', {}).get('cwe-id', [])
|
|
98 |
#cwe = [x.upper() for x in cwe]
|
|
99 |
#capec = vuln_dict['info'].get('metadata', {}).get('capec', [])
|
|
100 |
#if isinstance(capec, str):
|
|
101 |
# capec = capec.upper().split(',')
|
|
102 |
|
|
103 |
refs = sorted(list(set(reference + references)))
|
|
104 |
refs = list(filter(None, refs))
|
|
105 |
|
93 | 106 |
tags = vuln_dict['info'].get('tags', [])
|
94 | 107 |
if isinstance(tags, str):
|
95 | 108 |
tags = tags.split(',')
|
96 | |
impact = vuln_dict['info'].get('impact')
|
97 | |
resolution = vuln_dict['info'].get('resolution', '')
|
98 | |
easeofresolution = vuln_dict['info'].get('easeofresolution')
|
|
109 |
|
|
110 |
impact = {}
|
|
111 |
impacted = vuln_dict['info'].get('metadata', {}).get('impact')
|
|
112 |
if isinstance(impacted, str):
|
|
113 |
for x in impacted.split(','):
|
|
114 |
impact[x] = True
|
|
115 |
|
|
116 |
resolution = vuln_dict['info'].get('metadata', {}).get('resolution', '')
|
|
117 |
easeofresolution = vuln_dict['info'].get('metadata', {}).get('easeofresolution', None)
|
|
118 |
|
99 | 119 |
request = vuln_dict.get('request', '')
|
100 | 120 |
if request:
|
101 | 121 |
method = request.split(" ")[0]
|
|
121 | 141 |
impact=impact,
|
122 | 142 |
resolution=resolution,
|
123 | 143 |
easeofresolution=easeofresolution,
|
|
144 |
cve=cve,
|
|
145 |
# TODO CVSSv2, CVSSv3, CWE and CAPEC
|
|
146 |
#cvssv2=cvssv2,
|
|
147 |
#cvssv3=cvssv3,
|
|
148 |
#cwe=cwe,
|
|
149 |
#capec=capec,
|
124 | 150 |
website=host,
|
125 | 151 |
request=request,
|
126 | 152 |
response=vuln_dict.get('response', ''),
|