From a8df4c2a868378576f3b959261ad756e06ed3749 Mon Sep 17 00:00:00 2001 From: mpgn Date: Tue, 4 Jan 2022 11:17:21 +0100 Subject: [PATCH] Fix error when hash option is used thx to @tiyeuse `cme smb 192.168.57.5 -u users.txt -H 8846f7eaee8fb117ad06bdd830b7586c`` => UnboundLocalError: local variable 'ntlm_hash_file' referenced before assignment --- cme/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cme/connection.py b/cme/connection.py index 48c73b59..3663f064 100755 --- a/cme/connection.py +++ b/cme/connection.py @@ -211,7 +211,7 @@ class connection(object): if self.hash_login(self.domain, usr.strip(), f_hash.strip()): return True else: # ntlm_hash is a string if not self.over_fail_limit(usr.strip()): - if self.hash_login(self.domain, usr.strip(), ntlm_hash_file): return True + if self.hash_login(self.domain, usr.strip(), ntlm_hash.strip()): return True elif self.args.password: with sem: @@ -251,7 +251,7 @@ class connection(object): if self.hash_login(self.domain, user, f_hash.strip()): return True else: # ntlm_hash is a string if not self.over_fail_limit(user): - if self.hash_login(self.domain, user, ntlm_hash): return True + if self.hash_login(self.domain, user, ntlm_hash.strip()): return True elif self.args.password: with sem: