0
0
mirror of https://github.com/sp-tarkov/assembly-tool.git synced 2025-02-13 06:50:44 -05:00

32 lines
1.0 KiB
C#
Raw Normal View History

2024-06-22 12:39:10 -04:00
using CliFx;
using CliFx.Attributes;
using CliFx.Infrastructure;
2024-12-31 13:46:44 -05:00
using ReCodeItLib.Utils;
using ReCodeItLib.ReMapper;
2024-06-22 12:39:10 -04:00
namespace ReCodeItCLI.Commands;
2024-06-22 12:39:10 -04:00
[Command("DeObfuscate", Description = "Generates a de-obfuscated -cleaned dll in the folder your assembly is in")]
public class DeObfuscate : ICommand
{
[CommandParameter(0, IsRequired = true, Description = "The absolute path to your obfuscated assembly or exe file, folder must contain all references to be resolved.")]
2024-12-30 23:50:31 -05:00
public required string AssemblyPath { get; init; }
2024-06-22 12:39:10 -04:00
[CommandParameter(1, IsRequired = false, Description = "Is the target the EFT launcher?")]
public bool IsLauncher { get; init; } = false;
2024-06-22 12:39:10 -04:00
public ValueTask ExecuteAsync(IConsole console)
{
Logger.Log("Deobfuscating assembly...");
Deobfuscator.Deobfuscate(AssemblyPath, IsLauncher);
2024-06-22 12:39:10 -04:00
Logger.Log("Complete", ConsoleColor.Green);
// Wait for log termination
Logger.Terminate();
while(Logger.IsRunning()) {}
2024-06-22 12:39:10 -04:00
return default;
}
}