public static void LuaPipe(string script) { if (NamedPipes.NamedPipeExist(NamedPipes.luapipename)) { new Thread((ThreadStart)(() => { try { using (NamedPipeClientStream pipeClientStream = new NamedPipeClientStream(".", NamedPipes.luapipename, PipeDirection.Out)) { pipeClientStream.Connect(); using (StreamWriter streamWriter = new StreamWriter((Stream)pipeClientStream, Encoding.Default, 999999)) { streamWriter.Write(script); streamWriter.Dispose(); } pipeClientStream.Dispose(); } } catch (IOException ex) { int num2 = (int)MessageBox.Show("Error occured connecting to the pipe.", "Connection Failed!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } catch (Exception ex) { int num2 = (int)MessageBox.Show(ex.Message.ToString()); } })).Start(); } else { int num1 = (int)MessageBox.Show("Inject " + Functions.exploitdllname + " before Using this!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
public static bool NamedPipeExist(string pipeName) { bool flag; try { int timeout = 0; if (!NamedPipes.WaitNamedPipe(Path.GetFullPath(string.Format("\\\\\\\\.\\\\pipe\\\\{0}", (object)pipeName)), timeout)) { switch (Marshal.GetLastWin32Error()) { case 0: return(false); case 2: return(false); } } flag = true; } catch (Exception ex) { flag = false; } return(flag); }
public static void Inject() { if (NamedPipes.NamedPipeExist(NamedPipes.luapipename)) { int num1 = (int)MessageBox.Show("Already injected Dumbass", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (NamedPipes.NamedPipeExist(NamedPipes.luapipename)) { return; } switch (Injector.DllInjector.GetInstance.Inject("RobloxPlayerBeta", AppDomain.CurrentDomain.BaseDirectory + Functions.exploitdllname)) { case Injector.DllInjectionResult.DllNotFound: int num2 = (int)MessageBox.Show("Couldn't find " + Functions.exploitdllname, "Sprx Dll was not found!", MessageBoxButtons.OK, MessageBoxIcon.Hand); break; case Injector.DllInjectionResult.GameProcessNotFound: int num3 = (int)MessageBox.Show("Couldn't find RobloxPlayerBeta.exe!", "Target process was not found!", MessageBoxButtons.OK, MessageBoxIcon.Hand); break; case Injector.DllInjectionResult.InjectionFailed: int num4 = (int)MessageBox.Show("Injection Failed!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Hand); break; default: Thread.Sleep(3000); if (!NamedPipes.NamedPipeExist(NamedPipes.luapipename)) { int num5 = (int)MessageBox.Show("Injection Failed!\nMaybe you are Missing something\nor took more time to check if was ready\nor other stuff XD", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } break; } } }
private void button3_Click_1(object sender, EventArgs e) { NamedPipes.LuaPipe(this.webBrowser1.Document.InvokeScript("GetText", (object[])new string[0]).ToString()); }