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

Class ComOpenAndxResponse

pager_lib/smb/smb_structs.py:1028–1058  ·  view source on GitHub ↗

Contains information about a SMB_COM_OPEN_ANDX response from the server After decoding, each instance will contain the following attributes: - fid (integer) - file_attributes (integer) - last_write_time (long) - access_rights (integer) - resource_type (integer) - op

Source from the content-addressed store, hash-verified

1026
1027
1028class ComOpenAndxResponse(Payload):
1029 """
1030 Contains information about a SMB_COM_OPEN_ANDX response from the server
1031
1032 After decoding, each instance will contain the following attributes:
1033 - fid (integer)
1034 - file_attributes (integer)
1035 - last_write_time (long)
1036 - access_rights (integer)
1037 - resource_type (integer)
1038 - open_results (integer)
1039
1040 References:
1041 ===========
1042 - [MS-CIFS]: 2.2.4.41.2
1043 - [MS-SMB]: 2.2.4.1.2
1044 """
1045
1046 PAYLOAD_STRUCT_FORMAT = '<BBHHHIIHHHHHHH'
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 1

_decodePayloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected