Skip to content

Commit

Permalink
fix endless loop in FIND_NEXT2, by providing ResumeKey (#1629)
Browse files Browse the repository at this point in the history
Co-authored-by: Hynek Petrak <[email protected]>
  • Loading branch information
HynekPetrak and Hynek Petrak authored Aug 14, 2024
1 parent e527912 commit 8d86b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impacket/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3982,7 +3982,7 @@ def list_path(self, service, path = '*', password = None):
findNextParameter['SID'] = sid
findNextParameter['SearchCount'] = 1024
findNextParameter['InformationLevel'] = SMB_FIND_FILE_BOTH_DIRECTORY_INFO
findNextParameter['ResumeKey'] = 0
findNextParameter['ResumeKey'] = record["FileIndex"]
findNextParameter['Flags'] = SMB_FIND_RETURN_RESUME_KEYS | SMB_FIND_CLOSE_AT_EOS
if self.__flags2 & SMB.FLAGS2_UNICODE:
findNextParameter['FileName'] = resume_filename + b'\x00\x00'
Expand Down

0 comments on commit 8d86b5a

Please sign in to comment.