Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
64 lines (54 loc) · 2.03 KB
/
Copy pathProgram.cs
File metadata and controls
64 lines (54 loc) · 2.03 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
using dnlib.DotNet;
using dnlib.DotNet.Writer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YOUTUBE.NET_OBFUSCATOR
{
class Program
{
static void Main(string[] args)
{
//try
{
//CONSOLE:TITLE VERSION DISPLAY
Console.Title = "YOUTUBE .NET OBFUSCATOR V.01 [PRIVATE]";
//LOAD FILE INTO STRING (DRAG & DROP)
string file_to_obf = args[0];
//CREATE SOME CONTEXT (IDK WHAT THE HELL THAT IS)
ModuleContext modCtx = ModuleDef.CreateModuleContext();
//LOAD FILE TO MODULE
var module = ModuleDefMD.Load(file_to_obf, modCtx);
//OBFUSCATION METHODS
RenameProtector.Execute(module);
//DISPLAY OBFUSCATED OUTPUT
Console.WriteLine("RenameEverything: " + RenameProtector.count_xxx);
//SAVE FILE TO PATH EXE
if (file_to_obf.EndsWith(".exe"))
{
var path = file_to_obf + "_ELITE.exe";
module.Write(path, new ModuleWriterOptions(module) { Logger = DummyLogger.NoThrowInstance });
}
//SAVE FILE TO PATH DLL
if (file_to_obf.EndsWith(".dll"))
{
var path = file_to_obf + "_ELITE.dll";
module.Write(path, new ModuleWriterOptions(module) { Logger = DummyLogger.NoThrowInstance });
}
//DISPLAY FINISH TEXT
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Obfuscated!");
}
//catch
//{
// //DISPLAY ERROR TEXT
// Console.ForegroundColor = ConsoleColor.Green;
// Console.WriteLine("Some error happend, please try DRAG & DROP!");
//}
//DONT CLOSE THE APP
Console.ReadKey();
}
}
}