You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.7 KiB

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace godtier_patcher
{
class Program
{
[STAThread]
static void Main(string[] args)
{
Log.Info("godtier-patcher by VollRahm");
Log.Info("Please select godtier.exe...\n");
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Executables (*.exe) |";
ofd.InitialDirectory = Directory.GetCurrentDirectory();
ofd.Title = "Please select godtier.exe...";
var result = ofd.ShowDialog();
if(result == DialogResult.OK)
{
Log.Info("Loading exe...");
Thread.Sleep(1000);
try
{
ProcessStartInfo psi = new ProcessStartInfo(Path.GetFullPath(ofd.FileName))
{
UseShellExecute = true,
};
var process = Process.Start(psi);
Log.Critical("Process started, PID -> " + process.Id);
Log.Info("Attaching to process...");
Patcherino patcherino = new Patcherino(process);
Log.Info("Patching...\n");
patcherino.Patch().GetAwaiter().GetResult();
}catch(Exception ex)
{
Log.Error("Something wen't wrong: " + ex.Message);
}
}
else
{
Log.Error("Please select godtier.exe");
}
Console.ReadLine();
}
}
}