diff --git a/pyrdp/parser/rdp/virtual_channel/device_redirection.py b/pyrdp/parser/rdp/virtual_channel/device_redirection.py index 8d3b5459..c01765ef 100644 --- a/pyrdp/parser/rdp/virtual_channel/device_redirection.py +++ b/pyrdp/parser/rdp/virtual_channel/device_redirection.py @@ -13,6 +13,7 @@ FileCreateOptions, FileShareAccess, FileSystemInformationClass, \ GeneralCapabilityVersion, MajorFunction, MinorFunction, \ RDPDRCapabilityType, NTSTATUS +from pyrdp.logging import log from pyrdp.parser import Parser from pyrdp.pdu import DeviceAnnounce, DeviceCloseRequestPDU, DeviceCloseResponsePDU, DeviceCreateRequestPDU, \ DeviceCreateResponsePDU, DeviceDirectoryControlResponsePDU, DeviceIORequestPDU, DeviceIOResponsePDU, \ @@ -296,6 +297,8 @@ def parseDeviceIOResponse(self, stream: BytesIO) -> DeviceIOResponsePDU: deviceID = Uint32LE.unpack(stream) completionID = Uint32LE.unpack(stream) ioStatus = NTSTATUS(Uint32LE.unpack(stream)) + if ioStatus._name_ == "STATUS_PYRDP_FAILURE": + log.error("Unknown NTSTATUS value: %(value)", {"value": ioStatus._value_}) majorFunction = self.majorFunctionsForParsingResponse.pop(completionID, None)