Skip to content

Commit e2e70a7

Browse files
committed
Allow an empty nt hash
1 parent 2a6b4c7 commit e2e70a7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nxc/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ def parse_credentials(self):
416416
with open(ntlm_hash) as ntlm_hash_file:
417417
for i, line in enumerate(ntlm_hash_file):
418418
line = line.strip()
419-
if len(line) != 32 and len(line) != 65:
419+
if len(line) != 32 and len(line) != 65 and len(line) != 0:
420420
self.logger.fail(f"Invalid NTLM hash length on line {(i + 1)} (len {len(line)}): {line}")
421421
continue
422422
else:
423423
secret.append(line)
424424
cred_type.append("hash")
425425
else:
426-
if len(ntlm_hash) != 32 and len(ntlm_hash) != 65:
426+
if len(ntlm_hash) != 32 and len(ntlm_hash) != 65 and len(ntlm_hash) != 0:
427427
self.logger.fail(f"Invalid NTLM hash length {len(ntlm_hash)}, authentication not sent")
428428
exit(1)
429429
else:

0 commit comments

Comments
 (0)