This commit is contained in:
Oran Nadler 2018-04-30 16:48:42 +03:00
parent d59e464578
commit b49ba7526f
1 changed files with 6 additions and 2 deletions

View File

@ -875,13 +875,15 @@ def main():
for m, count in sorted(threatening.iteritems(), key=lambda (k,v): (v,k), reverse=True): for m, count in sorted(threatening.iteritems(), key=lambda (k,v): (v,k), reverse=True):
if count <= 0: if count <= 0:
continue continue
print """<tr><td><a href="#{ip}">{ip}</a></td><td>{hostname}</td><td>{domain}</td><td>{count}</td>""".format(ip=m.GetIp(), hostname=m.GetHostName(), domain=m.GetDomainName(), count=count) print """<tr><td><a href="#{ip}">{ip}</a></td><td>{hostname}</td><td>{domain}</td>""".format(ip=m.GetIp(), hostname=m.GetHostName(), domain=m.GetDomainName(), count=count)
print """<td><ul>""" print """<td><ul>"""
for service_name in m.GetCriticalServicesInstalled(): for service_name in m.GetCriticalServicesInstalled():
print """<li>{service_name}</li>""".format(service_name=service_name) print """<li>{service_name}</li>""".format(service_name=service_name)
print """</ul></td>""" print """</ul></td>"""
print """<td>{count}</td>""".format(count=count)
print """<td><ul>""" print """<td><ul>"""
for sid in pth.GetThreateningUsersByVictim(m): for sid in pth.GetThreateningUsersByVictim(m):
@ -901,13 +903,15 @@ def main():
for m, count in sorted(threatening.iteritems(), key=lambda (k,v): (v,k), reverse=True): for m, count in sorted(threatening.iteritems(), key=lambda (k,v): (v,k), reverse=True):
if count <= 0: if count <= 0:
continue continue
print """<tr><td><a href="#{ip}">{ip}</a></td><td>{hostname}</td><td>{domain}</td><td>{count}</td>""".format(ip=m.GetIp(), hostname=m.GetHostName(), domain=m.GetDomainName(), count=count) print """<tr><td><a href="#{ip}">{ip}</a></td><td>{hostname}</td><td>{domain}</td>""".format(ip=m.GetIp(), hostname=m.GetHostName(), domain=m.GetDomainName(), count=count)
print """<td><ul>""" print """<td><ul>"""
for service_name in m.GetCriticalServicesInstalled(): for service_name in m.GetCriticalServicesInstalled():
print """<li>{service_name}</li>""".format(service_name=service_name) print """<li>{service_name}</li>""".format(service_name=service_name)
print """</ul></td>""" print """</ul></td>"""
print """<td>{count}</td>""".format(count=count)
print """<td><ul>""" print """<td><ul>"""
for sid in pth.GetThreateningUsersByVictim(m): for sid in pth.GetThreateningUsersByVictim(m):