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) { MessageBox.Show("Can't connect with ROBLOX", "Xurus | API Loader", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception ex) { MessageBox.Show("Debug |" + ex.Message, "Xurus | API Loader", MessageBoxButtons.OK, MessageBoxIcon.Error); } })).Start(); } else { MessageBox.Show("First inject!", "Xurus | API Loader", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static bool NamedPipeExist(string pipeName) { try { if (!NamedPipes.WaitNamedPipe("\\\\.\\pipe\\" + pipeName, 0)) { switch (Marshal.GetLastWin32Error()) { case 0: return(false); case 2: return(false); } } return(true); } catch (Exception) { return(false); } }
public static void Inject() { if (NamedPipes.NamedPipeExist(NamedPipes.luapipename)) { MessageBox.Show("Already injected", "Xurus | API Loader", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { if (NamedPipes.NamedPipeExist(NamedPipes.luapipename)) { return; } switch (Injector.DllInjector.GetInstance.Inject("RobloxPlayerBeta", AppDomain.CurrentDomain.BaseDirectory + Functions.exploitdllname)) { case Injector.DllInjectionResult.DllNotFound: MessageBox.Show("Can't found ElectronDLL.dll", "Xurus | API Loader", MessageBoxButtons.OK, MessageBoxIcon.Error); break; case Injector.DllInjectionResult.GameProcessNotFound: MessageBox.Show("Xurus can't found ROBLOX process", "Xurus | API Loader", MessageBoxButtons.OK, MessageBoxIcon.Error); break; case Injector.DllInjectionResult.InjectionFailed: MessageBox.Show("Injection failed!", "Xurus | API Loader", MessageBoxButtons.OK, MessageBoxIcon.Error); break; default: Thread.Sleep(3000); if (NamedPipes.NamedPipeExist(NamedPipes.luapipename)) #pragma warning disable CS0642 // Posible instrucción vacía errónea { ; } #pragma warning restore CS0642 // Posible instrucción vacía errónea break; } } }