Skip to content

Commit

Permalink
Merge pull request #60 from theMiddleBlue/v2.3/master
Browse files Browse the repository at this point in the history
fix filter port/service
  • Loading branch information
theMiddleBlue authored Dec 17, 2018
2 parents 00cd2fe + 5ee7ad2 commit 63f0149
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion views.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def index(request, filterservice="", filterportid=""):
hostsup = (hostsup + 1)

r['tr'][address] = {
'hostindex': '1',
'hostindex': '',
'hostname': hostname,
'po': 0,
'pc': 0,
Expand Down Expand Up @@ -656,6 +656,13 @@ def index(request, filterservice="", filterportid=""):
# this fix single host report
if type(ik) is not dict:
break;
else:
if address in r['tr']:
del r['tr'][address]
else:
if address in r['tr']:
del r['tr'][address]


totports = (ports['open']+ports['closed']+ports['filtered'])
if filterservice == "" and filterportid == "":
Expand Down

0 comments on commit 63f0149

Please sign in to comment.