Пример #1
0
        public static bool NamedPipeExist(string pipeName)
        {
            bool flag;

            try
            {
                int timeout = 0;
                if (!NamedPipes4.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)
            {
                flag = false;
            }
            return(flag);
        }
Пример #2
0
 public static void LuaPipe(string script)
 {
     if (NamedPipes4.NamedPipeExist(NamedPipes4.luapipename))
     {
         new Thread((ThreadStart)(() =>
         {
             try
             {
                 using (NamedPipeClientStream pipeClientStream = new NamedPipeClientStream(".", NamedPipes4.luapipename, PipeDirection.Out))
                 {
                     pipeClientStream.Connect();
                     using (StreamWriter streamWriter = new StreamWriter((Stream)pipeClientStream, Encoding.Default, 999999))
                     {
                         streamWriter.Write(script);
                         streamWriter.Dispose();
                     }
                     pipeClientStream.Dispose();
                 }
             }
             catch (IOException)
             {
                 int num2 = (int)MessageBox.Show("Error occured connecting to the pipe.", "Connection Failed!");
             }
             catch (Exception ex)
             {
                 int num2 = (int)MessageBox.Show(ex.Message.ToString());
             }
         })).Start();
     }
     else
     {
         int num1 = (int)MessageBox.Show("Inject " + Functions4.exploitdllname + " before Using this!", "Error");
     }
 }
Пример #3
0
        public static void Inject()
        {
            if (NamedPipes4.NamedPipeExist(NamedPipes4.luapipename))
            {
                int num1 = (int)MessageBox.Show("Already Injected!");
            }
            else
            {
                if (NamedPipes4.NamedPipeExist(NamedPipes4.luapipename) || NamedPipes4.NamedPipeExist(NamedPipes4.luapipename))
                {
                    return;
                }
                switch (Injector4.DllInjector.GetInstance.Inject("RobloxPlayerBeta", AppDomain.CurrentDomain.BaseDirectory + Functions4.exploitdllname))
                {
                case Injector4.DllInjectionResult.DllNotFound:
                    int num2 = (int)MessageBox.Show("Couldnt find ElectronDLL.dll!");
                    goto case Injector4.DllInjectionResult.InjectionFailed;

                case Injector4.DllInjectionResult.GameProcessNotFound:
                    int num3 = (int)MessageBox.Show("Roblox not found!");
                    goto case Injector4.DllInjectionResult.InjectionFailed;

                case Injector4.DllInjectionResult.InjectionFailed:
                    break;

                default:
                    Thread.Sleep(3000);
                    if (!NamedPipes4.NamedPipeExist(NamedPipes4.luapipename))
                    {
                        break;
                    }
                    break;
                }
            }
        }