Skip to content

Commit 8a532bd

Browse files
authored
Merge pull request #2 from infinition/master
fixes by @infinition
2 parents 1efc0cb + 1a99db0 commit 8a532bd

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def getCVE(request):
143143
cpe = json.loads(base64.b64decode(urllib.parse.unquote(request.POST['cpe'])).decode('ascii'))
144144

145145
for cpestr in cpe:
146-
r = requests.get('http://cve.circl.lu/api/cvefor/'+cpestr)
146+
r = requests.get('http://cve.circl.lu/api/#cvefor/'+cpestr)
147147
cvejson = r.json()
148148

149149
for host in cpe[cpestr]:
@@ -156,7 +156,7 @@ def getCVE(request):
156156

157157
return HttpResponse(json.dumps(res), content_type="application/json")
158158

159-
r = requests.get('http://cve.circl.lu/api/cvefor/'+request.POST['cpe'])
159+
r = requests.get('http://cve.circl.lu/api/#cvefor/'+request.POST['cpe'])
160160

161161
if request.POST['host'] not in res:
162162
res[request.POST['host']] = {}

docker/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,29 @@
1515
# $ mv /tmp/myscan.xml /opt/WebMap/docker/xml
1616
#
1717
# Now you can point your browser to http://localhost:8000
18+
#python3 python3-pip curl wget git wkhtmltopdf libssl1.0-dev vim nmap tzdata
1819

1920
FROM ubuntu:latest
2021

2122
ENV DEBIAN_FRONTEND noninteractive
2223

2324
RUN apt-get update && apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages \
24-
python3 python3-pip curl wget git wkhtmltopdf libssl1.0-dev vim nmap tzdata
25+
python3 python3-pip curl wget git wkhtmltopdf libssl1.1 vim nmap tzdata
2526

2627
RUN mkdir /opt/xml && mkdir /opt/notes && \
2728
wget -P /opt/ https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz && \
2829
cd /opt/ && tar -xvf /opt/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
2930

3031
RUN pip3 install Django requests xmltodict && \
3132
cd /opt/ && django-admin startproject nmapdashboard && cd /opt/nmapdashboard && \
32-
git clone https://github.com/SECUREFOREST/WebMap.git nmapreport
33-
34-
COPY settings.py /opt/nmapdashboard/nmapdashboard/
35-
COPY urls.py /opt/nmapdashboard/nmapdashboard/
36-
# COPY vimrc /root/.vimrc
37-
COPY tzdata.sh /root/tzdata.sh
38-
COPY startup.sh /startup.sh
33+
git clone https://github.com/infinition/WebMap-1.git nmapreport && \
34+
cd nmapreport && git checkout master
35+
36+
37+
RUN cp /opt/nmapdashboard/nmapreport/docker/settings.py /opt/nmapdashboard/nmapdashboard/
38+
RUN cp /opt/nmapdashboard/nmapreport/docker/urls.py /opt/nmapdashboard/nmapdashboard/
39+
RUN cp /opt/nmapdashboard/nmapreport/docker/tzdata.sh /root/tzdata.sh
40+
RUN cp /opt/nmapdashboard/nmapreport/docker/startup.sh /startup.sh
3941

4042
RUN cd /opt/nmapdashboard && python3 manage.py migrate
4143
RUN apt-get autoremove -y

nmap/cve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def getcve(xmlfile):
7777
for cpestr in cpecve['cpe'][i]:
7878
print(cpestr)
7979
if re.search('^cpe:[^:]+:[^:]+:[^:]+:.+$', cpestr):
80-
r = requests.get('http://cve.circl.lu/api/cvefor/'+cpestr)
80+
r = requests.get('http://cve.circl.lu/api/#cvefor/'+cpestr)
8181
if r.json() is not None:
8282
if r.json() is dict:
8383
cvejson[i].append(r.json())
@@ -92,7 +92,7 @@ def getcve(xmlfile):
9292

9393
for cvestr in cpecve['cve'][i]:
9494
print(cvestr)
95-
r = requests.get('http://cve.circl.lu/api/cve/'+cvestr)
95+
r = requests.get('http://cve.circl.lu/api/#cve/'+cvestr)
9696
if r.json() is not None:
9797
if r.json() is dict:
9898
cvejson[i].append(r.json())

0 commit comments

Comments
 (0)