-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathProgram.cs
More file actions
88 lines (76 loc) · 3.13 KB
/
Copy pathProgram.cs
File metadata and controls
88 lines (76 loc) · 3.13 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
using System;
using System.IO;
using RustEditProCrack.Core;
namespace RustEditProCrack
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("🚀 RustEdit Pro Crack - Автономный DLL Патчер");
Console.WriteLine("================================================");
if (args.Length == 0)
{
ShowUsage();
return;
}
string dllPath = args[0];
if (string.IsNullOrEmpty(dllPath))
{
Console.WriteLine("❌ Не указан путь к DLL файлу");
ShowUsage();
return;
}
RunPatching(dllPath);
}
static void RunPatching(string dllPath)
{
Console.WriteLine($"📂 Использую указанный путь: {dllPath}");
if (!File.Exists(dllPath))
{
Console.WriteLine($"❌ Файл не найден: {dllPath}");
return;
}
using (var manager = new DllManager())
{
Console.WriteLine($"📂 Загружаю сборку: {dllPath}");
if (!manager.LoadAssembly(dllPath))
{
Console.WriteLine("❌ Не удалось загрузить сборку");
return;
}
if (manager.ApplyAllPatches())
{
Console.WriteLine("\n💾 Сохраняю пропатченную сборку...");
var directory = Path.GetDirectoryName(dllPath);
var filename = Path.GetFileNameWithoutExtension(dllPath);
var extension = Path.GetExtension(dllPath);
var outputPath = Path.Combine(directory, $"{filename}-Patched{extension}");
if (manager.SavePatched(outputPath))
{
Console.WriteLine("✅ Патчинг завершен успешно!");
Console.WriteLine($"📁 Результат: {outputPath}");
Console.WriteLine("\n🎉 Готово! Замените оригинальный файл на пропатченный.");
}
else
{
Console.WriteLine("❌ Ошибка сохранения пропатченного файла");
}
}
else
{
Console.WriteLine("❌ Патчинг завершился с ошибками");
}
}
}
static void ShowUsage()
{
Console.WriteLine("=== RustEdit Pro Crack Tool ===");
Console.WriteLine("Использование:");
Console.WriteLine(" dotnet run <dll-path>");
Console.WriteLine();
Console.WriteLine("Пример:");
Console.WriteLine(" dotnet run Assembly-CSharp.dll");
}
}
}