| 3913 | |
| 3914 | |
| 3915 | class 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 | |
| 3957 | bind_top_down( |
no test coverage detected