Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit a8df4c2

Browse files
author
mpgn
authored
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
1 parent 80ec68a commit a8df4c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cme/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def login(self):
211211
if self.hash_login(self.domain, usr.strip(), f_hash.strip()): return True
212212
else: # ntlm_hash is a string
213213
if not self.over_fail_limit(usr.strip()):
214-
if self.hash_login(self.domain, usr.strip(), ntlm_hash_file): return True
214+
if self.hash_login(self.domain, usr.strip(), ntlm_hash.strip()): return True
215215

216216
elif self.args.password:
217217
with sem:
@@ -251,7 +251,7 @@ def login(self):
251251
if self.hash_login(self.domain, user, f_hash.strip()): return True
252252
else: # ntlm_hash is a string
253253
if not self.over_fail_limit(user):
254-
if self.hash_login(self.domain, user, ntlm_hash): return True
254+
if self.hash_login(self.domain, user, ntlm_hash.strip()): return True
255255

256256
elif self.args.password:
257257
with sem:

0 commit comments

Comments
 (0)