lolipop34860

Functions.cs

Dec 30th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading;
  7. using System.Threading.Tasks;
  8. using System.Windows.Forms;
  9.  
  10. namespace LAOHAX
  11. {
  12.     class Functions
  13.     {
  14.         public static void PopulateListBox(ListBox lsb, string Folder, string FileType)
  15.         {
  16.             DirectoryInfo dinfo = new DirectoryInfo(Folder);
  17.             FileInfo[] Files = dinfo.GetFiles(FileType);
  18.             foreach (FileInfo file in Files)
  19.             {
  20.                 lsb.Items.Add(file.Name);
  21.             }
  22.         }
  23.  
  24.  
  25.  
  26.         public static string exploitdllname = "LaoHax.dll";//Axon.dll this is the name of your dll
  27.         public static void Inject()
  28.         {
  29.             if (NamedPipes.NamedPipeExist(NamedPipes.luapipename))//check if the pipe exist
  30.             {
  31.                 MessageBox.Show("Already injected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);//if the pipe exist that's mean that we don't need to inject
  32.                 return;
  33.             }
  34.             else if (!NamedPipes.NamedPipeExist(NamedPipes.luapipename))//check if the pipe don't exist
  35.             {
  36.                 switch (Injector.DllInjector.GetInstance.Inject("RobloxPlayerBeta", AppDomain.CurrentDomain.BaseDirectory + exploitdllname))//Process name and dll directory
  37.                 {
  38.                     case Injector.DllInjectionResult.DllNotFound://if can't find the dll
  39.                         MessageBox.Show("Couldn't find " + exploitdllname, "Dll was not found!", MessageBoxButtons.OK, MessageBoxIcon.Error);//display messagebox to tell that dll was not found
  40.                         return;
  41.                     case Injector.DllInjectionResult.GameProcessNotFound://if can't find the process
  42.                         MessageBox.Show("Couldn't find RobloxPlayerBeta.exe!", "Target process was not found!", MessageBoxButtons.OK, MessageBoxIcon.Error);//display messagebox to tell that proccess was not found
  43.                         return;
  44.                     case Injector.DllInjectionResult.InjectionFailed://if injection fails(this don't work or only on special cases)
  45.                         MessageBox.Show("Injection Failed!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);//display messagebox to tell that injection failed
  46.                         return;
  47.                 }
  48.                 Thread.Sleep(3000);//pause the ui for 3 seconds
  49.                 if (!NamedPipes.NamedPipeExist(NamedPipes.luapipename))//check if the pipe dont exist
  50.                 {
  51.                     MessageBox.Show("Injection Failed!\nMaybe you are Missing something\nor took more time to check if was ready\nor other stuff", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);//display that the pipe was not found so the injection was unsuccessful
  52.                 }
  53.             }
  54.         }
  55.  
  56.         public static OpenFileDialog openfiledialog = new OpenFileDialog
  57.         {
  58.             Filter = "Lua Script Txt (*.txt)|*.txt|All files (*.*)|*.*",
  59.             FilterIndex = 1,
  60.             RestoreDirectory = true,
  61.             Title = "LaoHaxx v1.0"
  62.         };
  63.  
  64.     }
  65. }
Add Comment
Please, Sign In to add comment