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

Method decode

pager_lib/smb/smb_structs.py:1120–1128  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls 1

ProtocolErrorClass · 0.85

Tested by

no test coverage detected