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

Class SMB2_Query_Directory_Request

scapy/layers/smb2.py:3915–3954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3913
3914
3915class SMB2_Query_Directory_Request(_SMB2_Payload, _NTLMPayloadPacket):
3916 name = "SMB2 QUERY DIRECTORY Request"
3917 Command = 0x000E
3918 OFFSET = 32 + 64
3919 _NTLM_PAYLOAD_FIELD_NAME = "Buffer"
3920 fields_desc = [
3921 XLEShortField("StructureSize", 0x21),
3922 ByteEnumField("FileInformationClass", 0x1, FileInformationClasses),
3923 FlagsField(
3924 "Flags",
3925 0,
3926 -8,
3927 {
3928 0x01: "SMB2_RESTART_SCANS",
3929 0x02: "SMB2_RETURN_SINGLE_ENTRY",
3930 0x04: "SMB2_INDEX_SPECIFIED",
3931 0x10: "SMB2_REOPEN",
3932 },
3933 ),
3934 LEIntField("FileIndex", 0),
3935 PacketField("FileId", SMB2_FILEID(), SMB2_FILEID),
3936 LEShortField("FileNameBufferOffset", None),
3937 LEShortField("FileNameLen", None),
3938 LEIntField("OutputBufferLength", 65535),
3939 _NTLMPayloadField("Buffer", OFFSET, [StrFieldUtf16("FileName", b"")]),
3940 ]
3941
3942 def post_build(self, pkt, pay):
3943 # type: (bytes, bytes) -> bytes
3944 return (
3945 _SMB2_post_build(
3946 self,
3947 pkt,
3948 self.OFFSET,
3949 {
3950 "FileName": 24,
3951 },
3952 )
3953 + pay
3954 )
3955
3956
3957bind_top_down(

Callers 1

query_directoryMethod · 0.90

Calls 9

XLEShortFieldClass · 0.90
ByteEnumFieldClass · 0.90
FlagsFieldClass · 0.90
LEIntFieldClass · 0.90
PacketFieldClass · 0.90
LEShortFieldClass · 0.90
_NTLMPayloadFieldClass · 0.90
StrFieldUtf16Class · 0.90
SMB2_FILEIDClass · 0.85

Tested by

no test coverage detected