Skip to content

Commit 5477d45

Browse files
committed
Add MGMT tests
1 parent 7c70048 commit 5477d45

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

test/scapy/layers/msrpce/mgmt.uts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
% C706 MGMT tests
2+
3+
+ C706 MGMT test vectors
4+
5+
= [C706 MGMT] - Dissect rpc__mgmt_inq_if_ids_Response
6+
7+
import uuid
8+
from scapy.layers.msrpce.raw.mgmt import *
9+
10+
DATA = bytes.fromhex('00000200000000000c000000000000000c000000000000000000020000000000000002000000000000000200000000000000020000000000000002000000000000000200000000000000020000000000000002000000000000000200000000000000020000000000000002000000000000000200000000000883afe11f5dc91191a408002b14a0fa0300000084650a0b0f9ecf11a3cf00805f68cb1b0100010026b5551d37c1c546ab79638f2a68e869010000007f0bfe64f59e5345a7db9a197577755401000000e6730ce6f988cf119af10020af6e72f402000000c4fefc9960521b10bbcb00aa0021347a00000000609ee7b9523dce11aaa100006901293f000002001e242f412ac1ce11abff0020af6e7a17000002003601000000000000c0000000000000460000000072eef3c67eced111b71e00c04fc3111a01000000b84a9f4d1c7dcf11861e0020af6e7c5700000000a001000000000000c0000000000000460000000000000000')
11+
pkt = rpc__mgmt_inq_if_ids_Response(DATA)
12+
assert pkt.if_id_vector.value.max_count == 12
13+
assert pkt.if_id_vector.value.Count == 12
14+
assert [(uuid.UUID(bytes_le=bytes(x.Uuid)), x.VersMajor, x.VersMinor) for x in pkt.valueof("if_id_vector.IfId")] == [
15+
(uuid.UUID('e1af8308-5d1f-11c9-91a4-08002b14a0fa'), 3, 0),
16+
(uuid.UUID('0b0a6584-9e0f-11cf-a3cf-00805f68cb1b'), 1, 1),
17+
(uuid.UUID('1d55b526-c137-46c5-ab79-638f2a68e869'), 1, 0),
18+
(uuid.UUID('64fe0b7f-9ef5-4553-a7db-9a1975777554'), 1, 0),
19+
(uuid.UUID('e60c73e6-88f9-11cf-9af1-0020af6e72f4'), 2, 0),
20+
(uuid.UUID('99fcfec4-5260-101b-bbcb-00aa0021347a'), 0, 0),
21+
(uuid.UUID('b9e79e60-3d52-11ce-aaa1-00006901293f'), 0, 2),
22+
(uuid.UUID('412f241e-c12a-11ce-abff-0020af6e7a17'), 0, 2),
23+
(uuid.UUID('00000136-0000-0000-c000-000000000046'), 0, 0),
24+
(uuid.UUID('c6f3ee72-ce7e-11d1-b71e-00c04fc3111a'), 1, 0),
25+
(uuid.UUID('4d9f4ab8-7d1c-11cf-861e-0020af6e7c57'), 0, 0),
26+
(uuid.UUID('000001a0-0000-0000-c000-000000000046'), 0, 0),
27+
]
28+

0 commit comments

Comments
 (0)