-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.py
More file actions
67 lines (56 loc) · 1.63 KB
/
config.py
File metadata and controls
67 lines (56 loc) · 1.63 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import pycobalt.sharpgen
import pycobalt.aliases
import pycobalt.aggressor
import pycobalt.engine
import powerpick
#
# SharpGen settings
#
protections_net35 = {
#'anti debug': None,
#'anti dump': None,
#'anti ildasm': None,
#'anti tamper': None,
#'constants': None,
'ctrl flow': None,
#'ctrl flow': {'mode': 'jump',
# 'intensity': 30,
# 'junk': 'true'},
#'constants': {'mode': 'dynamic',
# 'decoderCount': 20,
# 'elements': 'SNPI',
# 'cfg': 'true'},
#'ctrl flow': {'mode': 'jump',
# 'intensity': 30,
# 'junk': 'true'},
#'invalid metadata': None,
#'ref proxy': None,
'ref proxy': {#'mode': 'strong',
'encoding': 'expression',
'internal': 'true',
'typeErasure': 'true',
'depth': 5,
'initCount': 16},
'rename': {'mode': 'ascii'},
'resources': {'mode': 'dynamic'},
#'typescramble': None,
}
protections_net40 = protections_net35
def set_dotnet(version):
if version == 'net35':
pycobalt.sharpgen.set_confuser_protections(protections_net35)
else:
pycobalt.sharpgen.set_confuser_protections(protections_net40)
pycobalt.sharpgen.set_dotnet_framework(version)
# powerpick
powerpick.enable_custom_powerpick()
# sharpgen
set_dotnet('net35')
pycobalt.sharpgen.set_resources()
pycobalt.sharpgen.set_references()
#pycobalt.sharpgen.enable_cache()
pycobalt.sharpgen.set_using()
# quote replacement
pycobalt.aliases.set_quote_replacement('^')
# debug
#pycobalt.engine.enable_debug()