internal static async Task injectionCheckerThreadHandler() { while (!isCheckingDetachDone) { Application.DoEvents(); await Task.Delay(100); IntPtr intPtr = SirHurtAPI.FindWindowA("WINDOWSCLIENT", "Roblox"); uint num = 0U; SirHurtAPI.GetWindowThreadProcessId(intPtr, out num); if ((intPtr == IntPtr.Zero && SirHurtAPI.isInjected()) || (SirHurtAPI._injectionResult != 0U && num != SirHurtAPI._injectionResult)) { SirHurtAPI.Execute("", true); SirHurtAPI.setInjectStatus(false); if (GetAutoInject()) { await Task.Run(async() => { await autoIJ(); }); } isCheckingDetachDone = true; } } }
public static bool ExecuteFromName(string ScriptName) { Console.WriteLine(DllName + "Script selected: " + ScriptName); string scriptURL = null; foreach (JToken jtoken in list) { if (jtoken["Name"].ToString() == ScriptName) { scriptURL = jtoken["FileName"].ToString(); Console.WriteLine(DllName + "File name:" + scriptURL); } } if (scriptURL == null) { Console.WriteLine(DllName + "scriptURL is null, returning (prob bc invalid script name)"); return(false); } try { return(SirHurtAPI.Execute("loadstring(HttpGet('https://sirhurt.net/upl/UIScriptHub/Scripts/script.php?script=" + scriptURL + "'))()", true)); } catch { return(false); } }
private static async Task autoIJ() { while (GetAutoInject()) { await Task.Delay(100); IntPtr intPtr = SirHurtAPI.FindWindowA("WINDOWSCLIENT", "Roblox"); if (SirHurtAPI.isInjected() || intPtr == IntPtr.Zero) { Console.WriteLine(DllName + "Injected or ROBLOX isn't running..."); } else { Console.WriteLine(DllName + "ROBLOX Found. Injecting..."); LaunchExploit(); } } }
public static bool LaunchExploit() { bool returnval; if (!SirHurtAPI.isInjected()) { IntPtr intPtr = SirHurtAPI.FindWindowA("WINDOWSCLIENT", "Roblox"); if (intPtr == IntPtr.Zero) { SirHurtAPI.setInjectStatus(false); return(false); } long num = 0; try { if (SirHurtAPI.DownloadDll(false) && dlFASM()) { returnval = true; Thread.Sleep(250); foreach (Process rbx in Process.GetProcessesByName("RobloxPlayerBeta")) { var a = new Injector(rbx); num = a.Inject(AppDomain.CurrentDomain.BaseDirectory + "SirHurt.dll"); Thread.Sleep(100); } } else { return(false); } } catch (Exception ex) { Console.WriteLine(DllName + "An error occured with injecting SirHurt: " + ex.Message); SirHurtAPI.setInjectStatus(false); return(false); } if (num != 0) { Console.WriteLine(DllName + "Sucessfully injected SirHurt V4."); SirHurtAPI.setInjectStatus(true); returnval = true; var a = Registry.CurrentUser.CreateSubKey("SirHurtAPI"); SirHurtAPI.SHdatPath = AppDomain.CurrentDomain.BaseDirectory + "sirhurt.dat"; a.SetValue("SHDatPath", SirHurtAPI.SHdatPath); SirHurtAPI.GetWindowThreadProcessId(intPtr, out SirHurtAPI._injectionResult); SirHurtAPI.setInjectStatus(true); isCheckingDetachDone = false; Task.Run(async() => { await injectionCheckerThreadHandler(); }); } else { Console.WriteLine(DllName + "Failed to inject SirHurt V4"); SirHurtAPI.setInjectStatus(false); return(false); } } else { return(false); } return(returnval); }