MCPcopy Index your code
hub / github.com/secdev/scapy / SMB2_Query_Info_Request

Class SMB2_Query_Info_Request

scapy/layers/smb2.py:4172–4240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4170
4171
4172class 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

Callers 1

query_infoMethod · 0.90

Calls 11

XLEShortFieldClass · 0.90
ByteEnumFieldClass · 0.90
LEIntFieldClass · 0.90
XLEIntFieldClass · 0.90
FlagsFieldClass · 0.90
PacketFieldClass · 0.90
_NTLMPayloadFieldClass · 0.90
MultipleTypeFieldClass · 0.90
PacketListFieldClass · 0.90
StrLenFieldClass · 0.90
SMB2_FILEIDClass · 0.85

Tested by

no test coverage detected