small fixes

This commit is contained in:
Oran Nadler 2018-03-07 00:03:55 -08:00
parent 3291e4f0bc
commit 458cc20ceb
1 changed files with 5 additions and 2 deletions

View File

@ -466,7 +466,10 @@ class PassTheHashMap(object):
SIDs = set() SIDs = set()
for m in self.machines: for m in self.machines:
SIDs.add(m.GetSidBySecret(secret)) sid = m.GetSidBySecret(secret)
if sid:
SIDs.add(sid)
return SIDs return SIDs
@ -650,7 +653,7 @@ def main():
print """<h3>SIDs that use that secret</h3>""" print """<h3>SIDs that use that secret</h3>"""
print """<ul>""" print """<ul>"""
for sid in pth.GetSidsBySecret(secret): for sid in pth.GetSidsBySecret(secret):
print """<li><a href="#{sid}">{username} ({sid})</a></li>""".format(username=m.GetUsernameBySid(sid), sid=sid) print """<li><a href="#{sid}">{username} ({sid})</a></li>""".format(username=pth.GetUsernameBySid(sid), sid=sid)
print """</ul>""" print """</ul>"""
print """<h3>Attackable Machines with that secret</h3>""" print """<h3>Attackable Machines with that secret</h3>"""