Skip to content

Commit

Permalink
Merge pull request #7 from sbrun/master
Browse files Browse the repository at this point in the history
Switch to Python 3
  • Loading branch information
Wh1t3Fox authored Jan 14, 2020
2 parents b1a3bdc + b7fdcba commit 61cbff5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions polenum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

"""
Uses Core's Impacket Library to get the password policy from a windows machine
Expand Down Expand Up @@ -29,7 +29,7 @@ def d2b(a):

t2bin = tbin[::-1]
if len(t2bin) != 8:
for x in xrange(6 - len(t2bin)):
for x in range(6 - len(t2bin)):
t2bin.insert(0, 0)
return ''.join([str(g) for g in t2bin])

Expand Down Expand Up @@ -86,7 +86,7 @@ class SAMRDump:
def __init__(self, protocols=None,
username='', password=''):
if not protocols:
protocols = SAMRDump.KNOWN_PROTOCOLS.keys()
protocols = list(SAMRDump.KNOWN_PROTOCOLS.keys())

self.__username = username
self.__password = password
Expand Down Expand Up @@ -250,7 +250,7 @@ def main():
parser.add_argument('--password', '-p', help='The password of the user')
parser.add_argument('--domain', '-d', help='The domain or IP')
parser.add_argument('--protocols', nargs='*',
help=str(SAMRDump.KNOWN_PROTOCOLS.keys()))
help=str(list(SAMRDump.KNOWN_PROTOCOLS.keys())))
parser.add_argument('enum4linux', nargs='?',
help='username:password@IPaddress')

Expand Down

0 comments on commit 61cbff5

Please sign in to comment.