Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics;
- using System.IO;
- using System.IO.Pipes;
- using System.Net;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Windows.Forms;
- namespace WeAreDevs_API
- {
- // Token: 0x02000002 RID: 2
- public class ExploitAPI
- {
- // Token: 0x06000001 RID: 1
- [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- [return: MarshalAs(UnmanagedType.Bool)]
- private static extern bool WaitNamedPipe(string name, int timeout);
- // Token: 0x06000002 RID: 2 RVA: 0x00002050 File Offset: 0x00000250
- private static bool NamedPipeExist(string pipeName)
- {
- bool result;
- try
- {
- int timeout = 0;
- if (!ExploitAPI.WaitNamedPipe(Path.GetFullPath(string.Format("\\\\\\\\.\\\\pipe\\\\{0}", pipeName)), timeout))
- {
- int lastWin32Error = Marshal.GetLastWin32Error();
- if (lastWin32Error == 0)
- {
- result = false;
- return result;
- }
- if (lastWin32Error == 2)
- {
- result = false;
- return result;
- }
- }
- result = true;
- }
- catch (Exception)
- {
- result = false;
- }
- return result;
- }
- // Token: 0x06000003 RID: 3 RVA: 0x000020AC File Offset: 0x000002AC
- private void SMTP(string pipe, string input)
- {
- if (ExploitAPI.NamedPipeExist(pipe))
- {
- try
- {
- using (NamedPipeClientStream namedPipeClientStream = new NamedPipeClientStream(".", pipe, PipeDirection.Out))
- {
- namedPipeClientStream.Connect();
- using (StreamWriter streamWriter = new StreamWriter(namedPipeClientStream))
- {
- streamWriter.Write(input);
- streamWriter.Dispose();
- }
- namedPipeClientStream.Dispose();
- }
- return;
- }
- catch (IOException)
- {
- MessageBox.Show("Error occured sending message to the game!", "Connection Failed!", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- return;
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message.ToString());
- return;
- }
- }
- MessageBox.Show("Error occured. Did the dll properly inject?", "Oops", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
- }
- // Token: 0x06000004 RID: 4 RVA: 0x00002178 File Offset: 0x00000378
- private string ReadURL(string url)
- {
- return this.client.DownloadString(url);
- }
- // Token: 0x06000005 RID: 5 RVA: 0x00002188 File Offset: 0x00000388
- public bool IsUpdated()
- {
- bool result = false;
- string text = this.ReadURL("https://pastebin.com/raw/Ly9mJwH7");
- if (text.Length > 0)
- {
- result = Convert.ToBoolean(text.Split(new char[]
- {
- ' '
- })[0]);
- }
- else
- {
- MessageBox.Show("Could not check for the latest version. Did your fireall block us?", "Error");
- }
- return result;
- }
- // Token: 0x06000006 RID: 6 RVA: 0x000021D8 File Offset: 0x000003D8
- private bool DownloadLatestVersion()
- {
- if (File.Exists("exploit-main.dll"))
- {
- File.Delete("exploit-main.dll");
- }
- string text = this.ReadURL("https://pastebin.com/raw/Ly9mJwH7");
- if (text.Length > 0)
- {
- this.client.DownloadFile(text.Split(new char[]
- {
- ' '
- })[1], "exploit-main.dll");
- }
- return File.Exists("exploit-main.dll");
- }
- // Token: 0x06000007 RID: 7 RVA: 0x00002244 File Offset: 0x00000444
- public bool LaunchExploit()
- {
- if (ExploitAPI.NamedPipeExist(this.cmdpipe))
- {
- MessageBox.Show("Dll already injected", "No problems");
- }
- else if (this.IsUpdated())
- {
- if (this.DownloadLatestVersion())
- {
- if (this.injector.InjectDLL())
- {
- return true;
- }
- MessageBox.Show("DLL failed to inject", "Error");
- }
- else
- {
- MessageBox.Show("Could not download the latest version! Did your firewall block us?", "Error");
- }
- }
- else
- {
- MessageBox.Show("Exploit currently patched. Try again tomorrow!", "Error");
- }
- return false;
- }
- // Token: 0x06000008 RID: 8 RVA: 0x000022C4 File Offset: 0x000004C4
- internal void SendCommand(string Command)
- {
- this.SMTP(this.cmdpipe, Command);
- }
- // Token: 0x06000009 RID: 9 RVA: 0x000022D4 File Offset: 0x000004D4
- public void SendScript(string Script)
- {
- foreach (string input in Script.Split("\r\n".ToCharArray()))
- {
- try
- {
- this.SMTP(this.luacpipe, input);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message.ToString());
- }
- }
- }
- // Token: 0x0600000A RID: 10 RVA: 0x00002338 File Offset: 0x00000538
- public void SendLimitedLuaScript(string Script)
- {
- this.SMTP(this.luapipe, Script);
- }
- // Token: 0x0600000B RID: 11 RVA: 0x00002347 File Offset: 0x00000547
- public void LuaC_getglobal(string service)
- {
- this.SendScript("getglobal " + service);
- }
- // Token: 0x0600000C RID: 12 RVA: 0x0000235A File Offset: 0x0000055A
- public void LuaC_getfield(int index, string instance)
- {
- this.SendScript(string.Concat(new object[]
- {
- "getglobal ",
- index,
- " ",
- instance
- }));
- }
- // Token: 0x0600000D RID: 13 RVA: 0x0000238A File Offset: 0x0000058A
- public void LuaC_setfield(int index, string property)
- {
- this.SendScript(string.Concat(new object[]
- {
- "setfield ",
- index,
- " ",
- property
- }));
- }
- // Token: 0x0600000E RID: 14 RVA: 0x000023BA File Offset: 0x000005BA
- public void LuaC_pushvalue(int index)
- {
- this.SendScript("pushvalue " + index);
- }
- // Token: 0x0600000F RID: 15 RVA: 0x000023D2 File Offset: 0x000005D2
- public void LuaC_pushstring(string text)
- {
- this.SendScript("pushstring " + text);
- }
- // Token: 0x06000010 RID: 16 RVA: 0x000023E5 File Offset: 0x000005E5
- public void LuaC_pushnumber(int number)
- {
- this.SendScript("pushnumber " + number);
- }
- // Token: 0x06000011 RID: 17 RVA: 0x00002400 File Offset: 0x00000600
- public void LuaC_pcall(int numberOfArguments, int numberOfResults, int ErrorFunction)
- {
- this.SendScript(string.Concat(new object[]
- {
- "pushnumber ",
- numberOfArguments,
- " ",
- numberOfResults,
- " ",
- ErrorFunction
- }));
- }
- // Token: 0x06000012 RID: 18 RVA: 0x00002451 File Offset: 0x00000651
- public void LuaC_settop(int index)
- {
- this.SendScript("settop " + index);
- }
- // Token: 0x06000013 RID: 19 RVA: 0x00002469 File Offset: 0x00000669
- public void LuaC_pushboolean(string value = "false")
- {
- this.SendScript("pushboolean " + value);
- }
- // Token: 0x06000014 RID: 20 RVA: 0x0000247C File Offset: 0x0000067C
- public void LuaC_gettop()
- {
- this.SendScript("gettop");
- }
- // Token: 0x06000015 RID: 21 RVA: 0x00002489 File Offset: 0x00000689
- public void LuaC_pushnil()
- {
- this.SendScript("pushnil");
- }
- // Token: 0x06000016 RID: 22 RVA: 0x00002496 File Offset: 0x00000696
- public void LuaC_next(int index)
- {
- this.SendScript("next");
- }
- // Token: 0x06000017 RID: 23 RVA: 0x000024A3 File Offset: 0x000006A3
- public void LuaC_pop(int quantity)
- {
- this.SendScript("pop " + quantity);
- }
- // Token: 0x06000018 RID: 24 RVA: 0x000024BB File Offset: 0x000006BB
- public void DoBTools(string username = "me")
- {
- this.SendCommand("btools " + username);
- }
- // Token: 0x06000019 RID: 25 RVA: 0x000024CE File Offset: 0x000006CE
- public void DoKill(string username = "me")
- {
- this.SendCommand("kill " + username);
- }
- // Token: 0x0600001A RID: 26 RVA: 0x000024E1 File Offset: 0x000006E1
- public void CreateForceField(string username = "me")
- {
- this.SendCommand("ff " + username);
- }
- // Token: 0x0600001B RID: 27 RVA: 0x000024F4 File Offset: 0x000006F4
- public void RemoveForceField(string username = "me")
- {
- this.SendCommand("noff " + username);
- }
- // Token: 0x0600001C RID: 28 RVA: 0x00002507 File Offset: 0x00000707
- public void DoFloat(string username = "me")
- {
- this.SendCommand("float " + username);
- }
- // Token: 0x0600001D RID: 29 RVA: 0x0000251A File Offset: 0x0000071A
- public void DoNoFloat(string username = "me")
- {
- this.SendCommand("nofloat " + username);
- }
- // Token: 0x0600001E RID: 30 RVA: 0x0000252D File Offset: 0x0000072D
- public void RemoveLimbs(string username = "me")
- {
- this.SendCommand("nolimbs " + username);
- }
- // Token: 0x0600001F RID: 31 RVA: 0x00002540 File Offset: 0x00000740
- public void RemoveArms(string username = "me")
- {
- this.SendCommand("noarms " + username);
- }
- // Token: 0x06000020 RID: 32 RVA: 0x00002553 File Offset: 0x00000753
- public void RemoveLegs(string username = "me")
- {
- this.SendCommand("nolegs " + username);
- }
- // Token: 0x06000021 RID: 33 RVA: 0x00002566 File Offset: 0x00000766
- public void AddFire(string username = "me")
- {
- this.SendCommand("fire " + username);
- }
- // Token: 0x06000022 RID: 34 RVA: 0x00002579 File Offset: 0x00000779
- public void RemoveFire(string username = "me")
- {
- this.SendCommand("nofire " + username);
- }
- // Token: 0x06000023 RID: 35 RVA: 0x0000258C File Offset: 0x0000078C
- public void AddSparkles(string username = "me")
- {
- this.SendCommand("sparkles " + username);
- }
- // Token: 0x06000024 RID: 36 RVA: 0x0000259F File Offset: 0x0000079F
- public void RemoveSparkles(string username = "me")
- {
- this.SendCommand("nosparkles " + username);
- }
- // Token: 0x06000025 RID: 37 RVA: 0x000025B2 File Offset: 0x000007B2
- public void AddSmoke(string username = "me")
- {
- this.SendCommand("smoke " + username);
- }
- // Token: 0x06000026 RID: 38 RVA: 0x000025C5 File Offset: 0x000007C5
- public void DoBlockHead(string username = "me")
- {
- this.SendCommand("blockhead " + username);
- }
- // Token: 0x06000027 RID: 39 RVA: 0x000025D8 File Offset: 0x000007D8
- public void ForceBubbleChat(string username = "me", string text = "WeAreDevs Website")
- {
- this.SendCommand("chat " + username + " " + text);
- }
- // Token: 0x06000028 RID: 40 RVA: 0x000025F1 File Offset: 0x000007F1
- public void ConsolePrint(string text = "WeAreDevs Website")
- {
- this.SendCommand("print " + text);
- }
- // Token: 0x06000029 RID: 41 RVA: 0x00002604 File Offset: 0x00000804
- public void ConsoleWarn(string text = "meWeAreDevs Website")
- {
- this.SendCommand("warn " + text);
- }
- // Token: 0x0600002A RID: 42 RVA: 0x00002617 File Offset: 0x00000817
- public void SetWalkSpeed(string username = "me", int value = 100)
- {
- this.SendCommand("speed " + username + " " + value.ToString());
- }
- // Token: 0x0600002B RID: 43 RVA: 0x00002636 File Offset: 0x00000836
- public void ToggleClickTeleport()
- {
- this.SendCommand("toggleclickteleport");
- }
- // Token: 0x0600002C RID: 44 RVA: 0x00002643 File Offset: 0x00000843
- public void SetFogEnd(int value = 0)
- {
- this.SendCommand("fogend " + value);
- }
- // Token: 0x0600002D RID: 45 RVA: 0x0000265B File Offset: 0x0000085B
- public void SetJumpPower(int value = 100)
- {
- this.SendCommand("jumppower " + value);
- }
- // Token: 0x0600002E RID: 46 RVA: 0x00002673 File Offset: 0x00000873
- public void TeleportMyCharacterTo(string target_username = "me")
- {
- this.SendCommand("teleport " + target_username);
- }
- // Token: 0x0600002F RID: 47 RVA: 0x00002686 File Offset: 0x00000886
- public void PlaySoundInGame(string assetid = "1071384374")
- {
- this.SendCommand("music " + assetid);
- }
- // Token: 0x06000030 RID: 48 RVA: 0x00002699 File Offset: 0x00000899
- public void SetSkyboxImage(string assetid = "2143522")
- {
- this.SendCommand("skybox " + assetid);
- }
- // Token: 0x04000001 RID: 1
- private WebClient client = new WebClient();
- // Token: 0x04000002 RID: 2
- private ExploitAPI.BasicInject injector = new ExploitAPI.BasicInject();
- // Token: 0x04000003 RID: 3
- private string cmdpipe = "WeAreDevsPublicAPI_CMD";
- // Token: 0x04000004 RID: 4
- private string luacpipe = "WeAreDevsPublicAPI_LuaC";
- // Token: 0x04000005 RID: 5
- private string luapipe = "WeAreDevsPublicAPI_Lua";
- // Token: 0x02000003 RID: 3
- private class BasicInject
- {
- // Token: 0x06000032 RID: 50
- [DllImport("kernel32", CharSet = CharSet.Ansi, SetLastError = true)]
- internal static extern IntPtr LoadLibraryA(string lpFileName);
- // Token: 0x06000033 RID: 51
- [DllImport("kernel32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
- internal static extern UIntPtr GetProcAddress(IntPtr hModule, string procName);
- // Token: 0x06000034 RID: 52
- [DllImport("kernel32.dll", SetLastError = true)]
- [return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool FreeLibrary(IntPtr hModule);
- // Token: 0x06000035 RID: 53
- [DllImport("kernel32.dll")]
- internal static extern IntPtr OpenProcess(ExploitAPI.BasicInject.ProcessAccess dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
- // Token: 0x06000036 RID: 54
- [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)]
- internal static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);
- // Token: 0x06000037 RID: 55
- [DllImport("kernel32.dll", SetLastError = true)]
- internal static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out UIntPtr lpNumberOfBytesWritten);
- // Token: 0x06000038 RID: 56
- [DllImport("kernel32.dll")]
- internal static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, uint dwStackSize, UIntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, out IntPtr lpThreadId);
- // Token: 0x06000039 RID: 57
- [DllImport("kernel32.dll", SetLastError = true)]
- internal static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, out int lpNumberOfBytesRead);
- // Token: 0x0600003A RID: 58 RVA: 0x000026EC File Offset: 0x000008EC
- public bool InjectDLL()
- {
- if (Process.GetProcessesByName("RobloxPlayerBeta").Length == 0)
- {
- return false;
- }
- Process process = Process.GetProcessesByName("RobloxPlayerBeta")[0];
- byte[] bytes = new ASCIIEncoding().GetBytes(AppDomain.CurrentDomain.BaseDirectory + "exploit-main.dll");
- IntPtr hModule = ExploitAPI.BasicInject.LoadLibraryA("kernel32.dll");
- UIntPtr procAddress = ExploitAPI.BasicInject.GetProcAddress(hModule, "LoadLibraryA");
- ExploitAPI.BasicInject.FreeLibrary(hModule);
- if (procAddress == UIntPtr.Zero)
- {
- return false;
- }
- IntPtr intPtr = ExploitAPI.BasicInject.OpenProcess(ExploitAPI.BasicInject.ProcessAccess.AllAccess, false, process.Id);
- if (intPtr == IntPtr.Zero)
- {
- return false;
- }
- IntPtr intPtr2 = ExploitAPI.BasicInject.VirtualAllocEx(intPtr, (IntPtr)0, (uint)bytes.Length, 12288u, 4u);
- UIntPtr uintPtr;
- IntPtr intPtr3;
- return !(intPtr2 == IntPtr.Zero) && ExploitAPI.BasicInject.WriteProcessMemory(intPtr, intPtr2, bytes, (uint)bytes.Length, out uintPtr) && !(ExploitAPI.BasicInject.CreateRemoteThread(intPtr, (IntPtr)0, 0u, procAddress, intPtr2, 0u, out intPtr3) == IntPtr.Zero);
- }
- // Token: 0x02000004 RID: 4
- [Flags]
- public enum ProcessAccess
- {
- // Token: 0x04000007 RID: 7
- AllAccess = 1050235,
- // Token: 0x04000008 RID: 8
- CreateThread = 2,
- // Token: 0x04000009 RID: 9
- DuplicateHandle = 64,
- // Token: 0x0400000A RID: 10
- QueryInformation = 1024,
- // Token: 0x0400000B RID: 11
- SetInformation = 512,
- // Token: 0x0400000C RID: 12
- Terminate = 1,
- // Token: 0x0400000D RID: 13
- VMOperation = 8,
- // Token: 0x0400000E RID: 14
- VMRead = 16,
- // Token: 0x0400000F RID: 15
- VMWrite = 32,
- // Token: 0x04000010 RID: 16
- Synchronize = 1048576
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement