This commit is contained in:
Oran Nadler 2018-04-30 16:51:07 +03:00
parent b49ba7526f
commit 2e3401f285
1 changed files with 1 additions and 5 deletions

View File

@ -899,16 +899,12 @@ def main():
threatening = dict(map(lambda x: (x, len(pth.GetThreateningUsersByVictim(x))), pth.GetNonCritialServers())) threatening = dict(map(lambda x: (x, len(pth.GetThreateningUsersByVictim(x))), pth.GetNonCritialServers()))
print """<table>""" print """<table>"""
print """<tr><th>Critical Server</th><th>Hostname</th><th>Domain</th><th>Critical Services Installed</th><th>Threatening User Count</th><th>Threatening Users</th></tr>""" print """<tr><th>Critical Server</th><th>Hostname</th><th>Domain</th><th>Threatening User Count</th><th>Threatening Users</th></tr>"""
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>""".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>"""
for service_name in m.GetCriticalServicesInstalled():
print """<li>{service_name}</li>""".format(service_name=service_name)
print """</ul></td>"""
print """<td>{count}</td>""".format(count=count) print """<td>{count}</td>""".format(count=count)