-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathProgram.cs
50 lines (46 loc) · 1.43 KB
/
Program.cs
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
using AsmResolver.DotNet;
using System;
using static VirtualGuardDevirt.Context;
using static VirtualGuardDevirt.Logger;
namespace VirtualGuardDevirt
{
internal class Program
{
static void Main(string[] args)
{
if (args.Length == 1)
{
Welcome();
LoadModule(args[0]);
bool isCrocodileVM = false;
bool isSpiderVM = false;
foreach (ManifestResource res in module.Resources)
{
if (res.Name == "crocodile")
isCrocodileVM = true;
else if (res.Name == "spider")
isSpiderVM = true;
}
if (isCrocodileVM)
{
Log("VM Type : Crocodile VM", TypeMessage.Info);
Protections.CrocodileVM.VM.Execute();
}
else if (isSpiderVM)
{
Log("VM Type : Spider VM", TypeMessage.Info);
Protections.SpiderVM.VM.Execute();
}
else
{
throw new Exception("VM Type : UNKNOWN (Possibility of No/New Virtualization)");
}
SaveModule();
}
else
{
Log($"Please drag and drop your file\n\n", TypeMessage.Error);
}
}
}
}