CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/util/dot_net_deserialization/enums.rb
Views: 11784
1
module Msf
2
module Util
3
module DotNetDeserialization
4
module Enums
5
6
#
7
# .NET Serialization Enumerations
8
#
9
BinaryTypeEnum = {
10
# see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/054e5c58-be21-4c86-b1c3-f6d3ce17ec72
11
Primitive: 0,
12
String: 1,
13
Object: 2,
14
SystemClass: 3,
15
Class: 4,
16
ObjectArray: 5,
17
StringArray: 6,
18
PrimitiveArray: 7
19
}
20
21
PrimitiveTypeEnum = {
22
# see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/4e77849f-89e3-49db-8fb9-e77ee4bc7214
23
Boolean: 1,
24
Byte: 2,
25
Char: 3,
26
Decimal: 5,
27
Double: 6,
28
Int16: 7,
29
Int32: 8,
30
Int64: 9,
31
SByte: 10,
32
Single: 11,
33
TimeSpan: 12,
34
DateTime: 13,
35
UInt16: 14,
36
UInt32: 15,
37
UInt64: 16,
38
Null: 17,
39
String: 18
40
}
41
42
RecordTypeEnum = {
43
# see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/954a0657-b901-4813-9398-4ec732fe8b32
44
SerializedStreamHeader: 0,
45
ClassWithId: 1,
46
SystemClassWithMembers: 2,
47
ClassWithMembers: 3,
48
SystemClassWithMembersAndTypes: 4,
49
ClassWithMembersAndTypes: 5,
50
BinaryObjectString: 6,
51
BinaryArray: 7,
52
MemberPrimitiveTyped: 8,
53
MemberReference: 9,
54
ObjectNull: 10,
55
MessageEnd: 11,
56
BinaryLibrary: 12,
57
ObjectNullMultiple256: 13,
58
ObjectNullMultiple: 14,
59
ArraySinglePrimitive: 15,
60
ArraySingleObject: 16,
61
ArraySingleString: 17,
62
MethodCall: 21,
63
MethodReturn: 22
64
}
65
66
end
67
end
68
end
69
end
70
71