MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / ComWriteAndxResponse

Class ComWriteAndxResponse

pager_lib/smb/smb_structs.py:1109–1128  ·  view source on GitHub ↗

References: =========== - [MS-CIFS]: 2.2.4.43.2 - [MS-SMB]: 2.2.4.3.2

Source from the content-addressed store, hash-verified

1107
1108
1109class ComWriteAndxResponse(Payload):
1110 """
1111 References:
1112 ===========
1113 - [MS-CIFS]: 2.2.4.43.2
1114 - [MS-SMB]: 2.2.4.3.2
1115 """
1116
1117 PAYLOAD_STRUCT_FORMAT = '<BBHHHHH' # We follow the SMB_COM_WRITEX_ANDX server extensions in [MS-SMB]: 2.2.4.3.2
1118 PAYLOAD_STRUCT_SIZE = struct.calcsize(PAYLOAD_STRUCT_FORMAT)
1119
1120 def decode(self, message):
1121 assert message.command == SMB_COM_WRITE_ANDX
1122
1123 if not message.status.hasError:
1124 if len(message.parameters_data) < self.PAYLOAD_STRUCT_SIZE:
1125 raise ProtocolError('Not enough data to decode SMB_COM_WRITE_ANDX parameters', message.raw_data, message)
1126
1127 _, _, _, count, self.available, high_count, _ = struct.unpack(self.PAYLOAD_STRUCT_FORMAT, message.parameters_data[:self.PAYLOAD_STRUCT_SIZE])
1128 self.count = (count & 0xFFFF) | (high_count << 16)
1129
1130
1131class ComReadAndxRequest(Payload):

Callers 1

_decodePayloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected