Skip to content

Commit

Permalink
Fix authentication problem when password contains "@"
Browse files Browse the repository at this point in the history
Fix authentication problem when password contains "@" => the solution is the same as implemented in impacket:

https://github.com/SecureAuthCorp/impacket/blob/master/examples/secretsdump.py#L346
  • Loading branch information
mpgn authored Jan 24, 2020
1 parent 61cbff5 commit c2cc465
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions polenum.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ def main():
if args.enum4linux:
enum4linux_regex = re.compile('(?:([^@:]*)(?::([^@]*))?@)?(.*)')
user, passw, target = enum4linux_regex.match(args.enum4linux).groups()
if '@' in target:
passw = passw + '@' + target.rpartition('@')[0]
target = target.rpartition('@')[2]

if args.protocols:
dumper = SAMRDump(args.protocols, user, passw)
Expand Down

0 comments on commit c2cc465

Please sign in to comment.