forked from KOLANICH-tools/de4dot
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDeobfuscatorTemplate.cs
More file actions
63 lines (49 loc) · 2.1 KB
/
DeobfuscatorTemplate.cs
File metadata and controls
63 lines (49 loc) · 2.1 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
/*
Copyright (C) 2011-2015 de4dot@gmail.com
This file is part of de4dot.
de4dot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
de4dot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/
using System.Collections.Generic;
using de4dot.blocks.cflow;
namespace de4dot.code.deobfuscators.INSERT_NAMESPACE_NAME_HERE { // Change this namespace name
public class DeobfuscatorInfo : DeobfuscatorInfoBase {
public const string THE_NAME = "INSERT_LONG_OFBUSCATOR_NAME_HERE"; // Obfuscator name
public const string THE_TYPE = "INSERT_SHORT_OFBUSCATOR_NAME_HERE"; // Obfuscator short name
const string DEFAULT_REGEX = @"(^<.*)|(^[a-zA-Z_<{$][a-zA-Z_0-9<>{}$.`-]*$)";
public DeobfuscatorInfo()
: base(DEFAULT_REGEX) {
}
public override string Name => THE_NAME;
public override string Type => THE_TYPE;
public override IDeobfuscator CreateDeobfuscator() =>
new Deobfuscator(new Deobfuscator.Options {
RenameResourcesInCode = false,
ValidNameRegex = validNameRegex.Get(),
});
}
public class Deobfuscator : DeobfuscatorBase {
internal class Options : OptionsBase {
}
public override string Type => DeobfuscatorInfo.THE_TYPE;
public override string TypeLong => DeobfuscatorInfo.THE_NAME;
public override string Name => DeobfuscatorInfo.THE_NAME;
internal Deobfuscator(Options options)
: base(options) {
}
protected override void ScanForObfuscator() {
}
protected override int DetectInternal() {
return 0;
}
public override IEnumerable<int> GetStringDecrypterMethods() => new List<int>();
}
}