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
| 1026 | |
| 1027 | |
| 1028 | class 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 | |
| 1061 | class ComWriteAndxRequest(Payload): |