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

Method decode

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

Source from the content-addressed store, hash-verified

590 PAYLOAD_STRUCT_SIZE = struct.calcsize(PAYLOAD_STRUCT_FORMAT)
591
592 def decode(self, message):
593 assert message.command == SMB_COM_TREE_CONNECT_ANDX
594
595 if not message.status.hasError:
596 if len(message.parameters_data) < self.PAYLOAD_STRUCT_SIZE:
597 raise ProtocolError('Not enough data to decode SMB_COM_TREE_CONNECT_ANDX parameters', message.raw_data, message)
598
599 _, _, _, self.optional_support = struct.unpack(self.PAYLOAD_STRUCT_FORMAT, message.parameters_data[:self.PAYLOAD_STRUCT_SIZE])
600
601
602class ComNTCreateAndxRequest(Payload):

Callers

nothing calls this directly

Calls 1

ProtocolErrorClass · 0.85

Tested by

no test coverage detected