Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError for cveobj['references'] in cve.py #23

Open
BlaiseDee opened this issue Oct 23, 2022 · 0 comments
Open

KeyError for cveobj['references'] in cve.py #23

BlaiseDee opened this issue Oct 23, 2022 · 0 comments

Comments

@BlaiseDee
Copy link

BlaiseDee commented Oct 23, 2022

First things first,
Awesome piece of software! it helps me a lot and saves me a lot of time, as long as it works fully as expected, but does not.

File:

root@webmap:/opt/nmapdashboard/nmapreport/nmap# cat cve.py
...
line 80: r.=.requests.get('http://cve.circl.lu/api/cvefor/'+cpestr)t()
...

there is 2x API reference, unfortunately "cvefor" doesn't work, as below

blaise@dev:~/app$ curl -k -X 'GET'   'https://cve.circl.lu/api/cvefor/cpe%3A2.3%3Ao%3Amicrosoft%3Awindows_11%3A-%3A*%3A*%3A*%3A*%3A*%3Ax64%3A*?limit=20'   -H 'accept: application/json'
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at cve.circl.lu Port 443</address>
</body></html>

I launched the whole project (cve search docker) locally, changed the addresses to my own (localhost)

and now the "CHECK FOR CVE AND EXPLOITS" function works, at the bottom of the page you can see: (222 CVE FOUND) but when I click to enable preview, I get an error from django:


KeyError at /report/192.168.16.147/
'references'
...

				elif type(i) is dict:
					listcve = [i]
					#cveout += 'dict<hr>'
				#continue
				for cveobj in listcve:
					cverefout = ''
					for cveref in cveobj['references']: …
						cverefout += '<a href="'+cveref+'">'+cveref+'</a><br>'
					cveexdbout = ''
					if 'exploit-db' in cveobj:
						cveexdbout = '<br><div class="small" style="line-height:20px;"><b>Exploit DB:</b><br>'
						for cveexdb in cveobj['exploit-db']:

'references' contains a list of urls

webmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant