-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSMB_Python_StructureV2.py
43 lines (40 loc) · 1.06 KB
/
SMB_Python_StructureV2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class SMB_HEADER(Structure):
_pack_ = 1
_fields_ = [
("server_component", c_uint32),
("smb_command", c_uint8),
("error_class", c_uint8),
("reserved1", c_uint8),
("error_code", c_uint16),
("flags", c_uint8),
("flags2", c_uint16),
("process_id_high", c_uint16),
("signature", c_uint64),
("reserved2", c_uint16),
("tree_id", c_uint16),
("process_id", c_uint16),
("user_id", c_uint16),
("multiplex_id", c_uint16)
("WordCount", c_uint8),
("TotalParameterCount", c_uint16),
("TotalDataCount", c_uint16),
("MaxParameterCount", c_uint16),
("MaxDataCount", c_uint16),
("MaxSetupCount", c_uint8),
("reserved", c_uint8),
("flags", c_uint16),
("timeout", c_uint32),
("reserved2", c_uint16),
("ParameterCount", c_uint16),
("ParameterOffset", c_uint16),
("DataCount", c_uint16),
("DataOffset", c_uint16),
("SetupCount", c_uint8),
("reserved3", c_uint8),
("SubCommand", c_uint16), #Function
("ByteCount", c_uint16),
("padding", c_uint8),
("padding2", c_uint16),
#figure this out to convert this from C to Python
#uint8 parameters[12]
#uint8 SMBData[4096]