Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion impacket/smbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
STATUS_FILE_IS_A_DIRECTORY, STATUS_NOT_IMPLEMENTED, STATUS_INVALID_HANDLE, STATUS_OBJECT_NAME_COLLISION, \
STATUS_NO_SUCH_FILE, STATUS_CANCELLED, STATUS_OBJECT_NAME_NOT_FOUND, STATUS_SUCCESS, STATUS_ACCESS_DENIED, \
STATUS_NOT_SUPPORTED, STATUS_INVALID_DEVICE_REQUEST, STATUS_FS_DRIVER_REQUIRED, STATUS_INVALID_INFO_CLASS, \
STATUS_LOGON_FAILURE, STATUS_OBJECT_PATH_SYNTAX_BAD
STATUS_LOGON_FAILURE, STATUS_OBJECT_PATH_SYNTAX_BAD, STATUS_END_OF_FILE

# Setting LOG to current's module name
LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -3610,6 +3610,8 @@ def smb2Read(connId, smbServer, recvPacket):
respSMBCommand['DataLength'] = len(content)
respSMBCommand['DataRemaining'] = 0
respSMBCommand['Buffer'] = content
if len(content) == 0:
errorCode = STATUS_END_OF_FILE
except Exception as e:
smbServer.log('SMB2_READ: %s ' % e, logging.ERROR)
errorCode = STATUS_ACCESS_DENIED
Expand Down