From c2cc46571d173b3f121fd21220709d8c1a3a5114 Mon Sep 17 00:00:00 2001 From: mpgn Date: Fri, 24 Jan 2020 14:39:04 +0100 Subject: [PATCH 1/2] Fix authentication problem when password contains "@" 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 --- polenum.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/polenum.py b/polenum.py index 3804d04..dd8f17b 100755 --- a/polenum.py +++ b/polenum.py @@ -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) From 94ae6b6034fdcc6ee92987692f5135a079a46f8c Mon Sep 17 00:00:00 2001 From: mpgn Date: Fri, 24 Jan 2020 14:40:57 +0100 Subject: [PATCH 2/2] Fix error in Password Complexity using python3 Rrror due to : python2 => 1 / 2 = 0 python3 => 1 / 2 = 0.5 python3 => 1 // 2 = 0 --- polenum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polenum.py b/polenum.py index dd8f17b..a6a4737 100755 --- a/polenum.py +++ b/polenum.py @@ -25,7 +25,7 @@ def d2b(a): tbin = [] while a: tbin.append(a % 2) - a /= 2 + a //= 2 t2bin = tbin[::-1] if len(t2bin) != 8: