$code = @'
using System;
using System.IO;
using System.Text;
public class PatcherV2 {
public static void Patch() {
string fileIn = "GeometryDash.exe";
string fileOut = "GeometryDash_Mucho.exe";
if (!File.Exists(fileIn)) {
Console.WriteLine("[-] GeometryDash.exe не найден рядом со скриптом!");
return;
}
byte[] file = File.ReadAllBytes(fileIn);
string[] targets = new string[] {
"https://www.boomlings.com/database",
"http://www.boomlings.com/database",
"http://www.boomlings.com/database/"
};
byte[] replace = Encoding.ASCII.GetBytes("http://muchogdps.space");
bool patched = false;
foreach (var target in targets) {
byte[] search = Encoding.ASCII.GetBytes(target);
for (int i = 0; i < file.Length - search.Length; i++) {
bool match = true;
for (int j = 0; j < search.Length; j++) {
if (file[i+j] != search[j]) { match = false; break; }
}
if (match) {
for (int j = 0; j < replace.Length; j++) file[i+j] = replace[j];
for (int j = replace.Length; j < search.Length; j++) file[i+j] = 0x00;
patched = true;
Console.WriteLine("[+] Найдена и заменена строка: " + target);
break;
}
}
if (patched) break;
}
if (patched) {
File.WriteAllBytes(fileOut, file);
Console.WriteLine("[+] УСПЕХ! Создан файл: " + fileOut);
} else {
Console.WriteLine("[-] Ни одна из оригинальных строк Boomlings не обнаружена.");
}
}
}
'@
Add-Type -TypeDefinition $code
[PatcherV2]::Patch()