コード例 #1
0
ファイル: device_redirection.py プロジェクト: xianlimei/pyrdp
 def parseDeviceReadRequest(self, deviceId: int, fileId: int, completionId: int,
                            minorFunction: int, stream: BytesIO) -> DeviceReadRequestPDU:
     """
     Starting at length, just before offset
     """
     length = Uint32LE.unpack(stream)
     offset = Uint64LE.unpack(stream)
     return DeviceReadRequestPDU(deviceId, fileId, completionId, minorFunction,
                                 length, offset)
コード例 #2
0
    def parseDeviceReadRequest(self, deviceID: int, fileID: int,
                               completionID: int, minorFunction: int,
                               stream: BytesIO) -> DeviceReadRequestPDU:
        length = Uint32LE.unpack(stream)
        offset = Uint64LE.unpack(stream)
        stream.read(20)  # Padding

        return DeviceReadRequestPDU(deviceID, fileID, completionID,
                                    minorFunction, length, offset)
コード例 #3
0
        def sendReadRequest(self):
            request = DeviceReadRequestPDU(
                self.deviceID,
                self.fileID,
                self.requestID,
                0,
                1024 * 16,
                self.offset
            )

            self.sendIORequest(request)