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

Method decode

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

Source from the content-addressed store, hash-verified

1047 PAYLOAD_STRUCT_SIZE = struct.calcsize(PAYLOAD_STRUCT_FORMAT)
1048
1049 def decode(self, message):
1050 assert message.command == SMB_COM_OPEN_ANDX
1051
1052 if not message.status.hasError:
1053 if len(message.parameters_data) < self.PAYLOAD_STRUCT_SIZE:
1054 raise ProtocolError('Not enough data to decode SMB_COM_OPEN_ANDX parameters', message.raw_data, message)
1055
1056 _, _, _, self.fid, self.file_attributes, self.last_write_time, _, \
1057 self.access_rights, self.resource_type, _, self.open_results, _, _, _ = struct.unpack(self.PAYLOAD_STRUCT_FORMAT,
1058 message.parameters_data[:self.PAYLOAD_STRUCT_SIZE])
1059
1060
1061class ComWriteAndxRequest(Payload):

Callers

nothing calls this directly

Calls 1

ProtocolErrorClass · 0.85

Tested by

no test coverage detected