File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -413,14 +413,15 @@ def parse_credentials(self):
413413 if isfile (ntlm_hash ):
414414 with open (ntlm_hash ) as ntlm_hash_file :
415415 for i , line in enumerate (ntlm_hash_file ):
416- if len (line ) != 16 and len (line ) != 32 :
417- self .logger .fail (f"Invalid NTLM hash length on line { i + 1 } : { line } " )
416+ line = line .strip ()
417+ if len (line ) != 32 and len (line ) != 65 :
418+ self .logger .fail (f"Invalid NTLM hash length on line { (i + 1 )} (len { len (line )} ): { line } " )
418419 continue
419420 else :
420- secret .append (line . strip () )
421+ secret .append (line )
421422 cred_type .append ("hash" )
422423 else :
423- if len (ntlm_hash ) != 16 and len (ntlm_hash ) != 32 :
424+ if len (ntlm_hash ) != 32 and len (ntlm_hash ) != 65 :
424425 self .logger .fail (f"Invalid NTLM hash length { len (ntlm_hash )} , authentication not sent" )
425426 exit (1 )
426427 else :
You can’t perform that action at this time.
0 commit comments