Skip to content

Commit

Permalink
Fix(smbserver): Add encode to filename (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
JerAxxxxxxx authored Sep 14, 2023
1 parent 0017927 commit ddfd9d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impacket/smbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ def queryPathInformation(path, filename, level):
infoRecord['PositionInformation']['CurrentByteOffset'] = 0 #
infoRecord['ModeInformation']['mode'] = mode
infoRecord['AlignmentInformation']['AlignmentRequirement'] = 0 #
infoRecord['NameInformation']['FileName'] = fileName
infoRecord['NameInformation']['FileNameLength'] = len(fileName)
infoRecord['NameInformation']['FileName'] = fileName.encode('utf-16le')
infoRecord['NameInformation']['FileNameLength'] = len(fileName.encode('utf-16le'))
elif level == smb2.SMB2_FILE_NETWORK_OPEN_INFO:
infoRecord = smb.SMBFileNetworkOpenInfo()
infoRecord['CreationTime'] = getFileTime(ctime)
Expand Down

0 comments on commit ddfd9d4

Please sign in to comment.