| 4170 | |
| 4171 | |
| 4172 | class SMB2_Query_Info_Request(_SMB2_Payload, _NTLMPayloadPacket): |
| 4173 | name = "SMB2 QUERY INFO Request" |
| 4174 | Command = 0x0010 |
| 4175 | OFFSET = 40 + 64 |
| 4176 | _NTLM_PAYLOAD_FIELD_NAME = "Buffer" |
| 4177 | fields_desc = [ |
| 4178 | XLEShortField("StructureSize", 0x29), |
| 4179 | ByteEnumField( |
| 4180 | "InfoType", |
| 4181 | 0, |
| 4182 | SMB2_INFO_TYPE, |
| 4183 | ), |
| 4184 | ByteEnumField("FileInfoClass", 0, FileInformationClasses), |
| 4185 | LEIntField("OutputBufferLength", 0), |
| 4186 | XLEIntField("InputBufferOffset", None), # Short + Reserved = Int |
| 4187 | LEIntField("InputLen", None), |
| 4188 | FlagsField( |
| 4189 | "AdditionalInformation", |
| 4190 | 0, |
| 4191 | -32, |
| 4192 | SMB2_ADDITIONAL_INFORMATION, |
| 4193 | ), |
| 4194 | FlagsField( |
| 4195 | "Flags", |
| 4196 | 0, |
| 4197 | -32, |
| 4198 | { |
| 4199 | 0x00000001: "SL_RESTART_SCAN", |
| 4200 | 0x00000002: "SL_RETURN_SINGLE_ENTRY", |
| 4201 | 0x00000004: "SL_INDEX_SPECIFIED", |
| 4202 | }, |
| 4203 | ), |
| 4204 | PacketField("FileId", SMB2_FILEID(), SMB2_FILEID), |
| 4205 | _NTLMPayloadField( |
| 4206 | "Buffer", |
| 4207 | OFFSET, |
| 4208 | [ |
| 4209 | MultipleTypeField( |
| 4210 | [ |
| 4211 | ( |
| 4212 | # QUOTA |
| 4213 | PacketListField( |
| 4214 | "Input", |
| 4215 | None, |
| 4216 | SMB2_Query_Quota_Info, |
| 4217 | length_from=lambda pkt: pkt.InputLen, |
| 4218 | ), |
| 4219 | lambda pkt: pkt.InfoType == 0x04, |
| 4220 | ), |
| 4221 | ], |
| 4222 | StrLenField("Input", b"", length_from=lambda pkt: pkt.InputLen), |
| 4223 | ), |
| 4224 | ], |
| 4225 | ), |
| 4226 | ] |
| 4227 | |
| 4228 | def post_build(self, pkt, pay): |
| 4229 | # type: (bytes, bytes) -> bytes |
no test coverage detected