EpicGamer72

Untitled

May 7th, 2020
1,257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 31.58 KB | None | 0 0
  1. // Script Hub 1: WebClient script = new WebClient();
  2.             api.SendLuaScript(script.DownloadString("https://pastebin.com/raw/5TbhA9Ww"));
  3. // Open Script Hub: Form3 form3 = new Form3(); // Name form3 to ur exploit form name and then change the second form3 to whatever because its a string.
  4.             form3.ShowDialog(); // Shows the form
  5. // Execute: HtmlDocument document = webBrowser1.Document;
  6.             string scriptName = "GetText";
  7.             object[] args = new string[0];
  8.             object obj = document.InvokeScript(scriptName, args);
  9.             string script = obj.ToString();
  10.             api.SendLuaScript(script);
  11. // Monaco Editor Code: WebClient wc = new WebClient();
  12.             wc.Proxy = null;
  13.             try
  14.             {
  15.                 RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
  16.                 string friendlyName = AppDomain.CurrentDomain.FriendlyName;
  17.                 bool flag2 = registryKey.GetValue(friendlyName) == null;
  18.                 if (flag2)
  19.                 {
  20.                     registryKey.SetValue(friendlyName, 11001, RegistryValueKind.DWord);
  21.                 }
  22.                 registryKey = null;
  23.                 friendlyName = null;
  24.             }
  25.             catch (Exception)
  26.             {
  27.             }
  28.             webBrowser1.Url = new Uri(string.Format("file:///{0}/Monaco/Monaco.html", Directory.GetCurrentDirectory()));
  29.             await Task.Delay(500);
  30.             webBrowser1.Document.InvokeScript("SetTheme", new string[]
  31.             {
  32.                    "Dark"
  33.                    /*
  34.                     There are 2 Themes Dark and Light
  35.                    */
  36.             });
  37.             addBase();
  38.             addMath();
  39.             addGlobalNS();
  40.             addGlobalV();
  41.             addGlobalF();
  42.             webBrowser1.Document.InvokeScript("SetText", new object[]
  43.             {
  44.                  "-- YTVid3--"
  45.             });
  46.         }
  47. // Monaco Download: https://mega.nz/fm/TDpwmQgD
  48. //Open File: if (Functions.openfiledialog.ShowDialog() == DialogResult.OK)
  49.             {
  50.                 try
  51.                 {
  52.  
  53.                     string MainText = File.ReadAllText(Functions.openfiledialog.FileName);
  54.                     webBrowser1.Document.InvokeScript("SetText", new object[]
  55.                     {
  56.                           MainText
  57.                     });
  58.  
  59.                 }
  60.                 catch (Exception ex)
  61.                 {
  62.                     MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
  63.                 }
  64.             }
  65.         }
  66. // Functions.cs Code: using System;
  67. using System.Collections.Generic;
  68. using System.IO;
  69. using System.Linq;
  70. using System.Text;
  71. using System.Threading.Tasks;
  72. using System.Windows.Forms;
  73.  
  74. namespace YTVid3 // Make sure u change this to ur exploit name!
  75. {
  76.     class Functions // Make sure u change this to ur class name!
  77.     {
  78.         public static OpenFileDialog openfiledialog = new OpenFileDialog
  79.         {
  80.             Filter = "Lua Script Txt (*.txt)|*.txt|All files (*.*)|*.*",
  81.             FilterIndex = 1,
  82.             RestoreDirectory = true,
  83.             Title = "Memey v1.0"
  84.         };
  85.         public static void PopulateListBox(ListBox lsb, string Folder, string FileType)
  86.         {
  87.             DirectoryInfo dinfo = new DirectoryInfo(Folder);
  88.             FileInfo[] Files = dinfo.GetFiles(FileType);
  89.             foreach (FileInfo file in Files)
  90.             {
  91.                 lsb.Items.Add(file.Name);
  92.             }
  93.         }
  94.     }
  95. }
  96. // Execute File: using (OpenFileDialog openFileDialog = new OpenFileDialog())
  97.             {
  98.                 openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
  99.                 openFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
  100.                 openFileDialog.FilterIndex = 2;
  101.                 openFileDialog.RestoreDirectory = true;
  102.  
  103.                 if (openFileDialog.ShowDialog() == DialogResult.OK)
  104.                 {
  105.                     var filePath = openFileDialog.FileName;
  106.  
  107.                     var fileStream = openFileDialog.OpenFile();
  108.  
  109.                     using (StreamReader reader = new StreamReader(fileStream))
  110.                     {
  111.                         var MainText = reader.ReadToEnd();
  112.                         api.SendLuaScript(MainText);
  113.                     };
  114.                 }
  115.             }
  116.         }
  117. // Save File: HtmlDocument document = webBrowser1.Document;
  118.             string scriptName = "GetText";
  119.             object[] args = new string[0];
  120.             object obj = document.InvokeScript(scriptName, args);
  121.             string script = obj.ToString();
  122. // Load to monaco Context menu strip: if (this.listBox1.SelectedIndex != -1)
  123.             {
  124.                 this.webBrowser1.Document.InvokeScript("SetText", new object[1]
  125.                 {
  126.           (object) System.IO.File.ReadAllText("scripts\\" + this.listBox1.SelectedItem.ToString())
  127.                 });
  128.             }
  129.             else
  130.             {
  131.                 int num = (int)MessageBox.Show("Please select a script from the list before trying to loading it in tab.", "Name");
  132.             }
  133.         }
  134. // Refresh Context menu strip: listBox1.Items.Clear();//Clear Items in the LuaScriptList
  135.             Functions.PopulateListBox(listBox1, "./Scripts", "*.txt");
  136.             Functions.PopulateListBox(listBox1, "./Scripts", "*.lua");
  137. //Execute Context menu strip: if (this.listBox1.SelectedIndex != -1)
  138.             {
  139.                 api.SendLuaScript(System.IO.File.ReadAllText("scripts\\" + this.listBox1.SelectedItem.ToString()));
  140.             }
  141.         }
  142. // Save Context menu strip: SaveFileDialog sfd = new SaveFileDialog();
  143.             sfd.Filter = "Txt Files (*.txt)|*.txt|Lua Files (*.lua)|*.lua";
  144.  
  145.             if (sfd.ShowDialog() == DialogResult.OK)
  146.             {
  147.                 Stream s = sfd.OpenFile();
  148.                 StreamWriter sw = new StreamWriter(s);
  149.             }
  150.         }
  151. //Modded wearedevs api:
  152. using System;
  153. using System.Diagnostics;
  154. using System.IO;
  155. using System.IO.Pipes;
  156. using System.Net;
  157. using System.Runtime.InteropServices;
  158. using System.Text;
  159. using System.Windows.Forms;
  160.  
  161. namespace WeAreDevs_API
  162. {
  163.     public class ExploitAPI
  164.     {
  165.         private String name = ""; // Your Exploit's name.
  166.  
  167.  
  168.         [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  169.         [return: MarshalAs(UnmanagedType.Bool)]
  170.  
  171.         private static extern bool WaitNamedPipe(string name, int timeout);
  172.  
  173.         public static bool NamedPipeExist(string pipeName)
  174.         {
  175.             bool result;
  176.             try
  177.             {
  178.                 int timeout = 0;
  179.                 if (!ExploitAPI.WaitNamedPipe(Path.GetFullPath(string.Format("\\\\.\\pipe\\{0}", pipeName)), timeout))
  180.                 {
  181.                     int lastWin32Error = Marshal.GetLastWin32Error();
  182.                     if (lastWin32Error == 0)
  183.                     {
  184.                         return false;
  185.                     }
  186.                     if (lastWin32Error == 2)
  187.                     {
  188.                         return false;
  189.                     }
  190.                 }
  191.                 result = true;
  192.             }
  193.             catch (Exception)
  194.             {
  195.                 result = false;
  196.             }
  197.             return result;
  198.         }
  199.  
  200.         private void SMTP(string pipe, string input)
  201.         {
  202.             if (ExploitAPI.NamedPipeExist(pipe))
  203.             {
  204.                 try
  205.                 {
  206.                     using (NamedPipeClientStream namedPipeClientStream = new NamedPipeClientStream(".", pipe, PipeDirection.Out))
  207.                     {
  208.                         namedPipeClientStream.Connect();
  209.                         using (StreamWriter streamWriter = new StreamWriter(namedPipeClientStream))
  210.                         {
  211.                             streamWriter.Write(input);
  212.                             streamWriter.Dispose();
  213.                         }
  214.                         namedPipeClientStream.Dispose();
  215.                     }
  216.                     return;
  217.                 }
  218.                 catch (IOException)
  219.                 {
  220.                     MessageBox.Show("Could not send message to the game!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
  221.                     return;
  222.                 }
  223.                 catch (Exception ex)
  224.                 {
  225.                     MessageBox.Show(ex.Message.ToString());
  226.                     return;
  227.                 }
  228.             }
  229.             MessageBox.Show("Did " + this.name + " attach?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  230.         }
  231.  
  232.         private string ReadURL(string url)
  233.         {
  234.             return this.client.DownloadString(url);
  235.         }
  236.  
  237.         private string GetLatestData()
  238.         {
  239.             string text = this.ReadURL("https://cdn.wearedevs.net/software/exploitapi/latestdata.txt");
  240.             if (text.Length > 0)
  241.             {
  242.                 return text;
  243.             }
  244.             string text2 = this.ReadURL("https://pastebin.com/raw/Ly9mJwH7");
  245.             if (text2.Length > 0)
  246.             {
  247.                 return text2;
  248.             }
  249.             return "";
  250.         }
  251.  
  252.         public bool IsUpdated()
  253.         {
  254.             bool result = false;
  255.             string latestData = this.GetLatestData();
  256.             if (latestData.Length > 0)
  257.             {
  258.                 result = Convert.ToBoolean(latestData.Split(new char[]
  259.                 {
  260.                     ' '
  261.                 })[0]);
  262.             }
  263.             else
  264.             {
  265.                 MessageBox.Show("Could not check for updates. Did your firewall block us?", "Error");
  266.             }
  267.             return result;
  268.         }
  269.  
  270.         private bool DownloadLatestVersion()
  271.         {
  272.             if (File.Exists("WeAreDevsMainDLL.dll"))
  273.             {
  274.                 File.Delete("WeAreDevsMainDLL.dll");
  275.             }
  276.             string latestData = this.GetLatestData();
  277.             if (latestData.Length > 0)
  278.             {
  279.                 this.client.DownloadFile(latestData.Split(new char[]
  280.                 {
  281.                     ' '
  282.                 })[1], "WeAreDevsMainDLL.dll");
  283.             }
  284.             return File.Exists("WeAreDevsMainDLL.dll");
  285.         }
  286.  
  287.         // Token: 0x06000008 RID: 8 RVA: 0x00002275 File Offset: 0x00000475
  288.         public bool isAPIAttached()
  289.         {
  290.             return ExploitAPI.NamedPipeExist(this.cmdpipe);
  291.         }
  292.  
  293.         // Token: 0x06000009 RID: 9 RVA: 0x00002288 File Offset: 0x00000488
  294.         public bool LaunchExploit()
  295.         {
  296.             if (ExploitAPI.NamedPipeExist(this.cmdpipe))
  297.             {
  298.                 MessageBox.Show(this.name + " is already attached!", "Info");
  299.             }
  300.             else if (this.IsUpdated())
  301.             {
  302.                 if (this.DownloadLatestVersion())
  303.                 {
  304.                     if (this.injector.InjectDLL())
  305.                     {
  306.                         return true;
  307.                     }
  308.                     MessageBox.Show(this.name + " failed to attach!", "Error");
  309.                 }
  310.                 else
  311.                 {
  312.                     MessageBox.Show("Could not download updates. Did your firewall block us?", "Error");
  313.                 }
  314.             }
  315.             else
  316.             {
  317.                 MessageBox.Show("This API is patched. You can wait for updates or choose another API.", "Error");
  318.             }
  319.             return false;
  320.         }
  321.  
  322.         // Token: 0x0600000A RID: 10 RVA: 0x00002308 File Offset: 0x00000508
  323.         public void SendCommand(string Command)
  324.         {
  325.             this.SMTP(this.cmdpipe, Command);
  326.         }
  327.  
  328.         // Token: 0x0600000B RID: 11 RVA: 0x00002317 File Offset: 0x00000517
  329.         public void SendScript(string script)
  330.         {
  331.             this.SendLuaCScript(script);
  332.         }
  333.  
  334.         // Token: 0x0600000C RID: 12 RVA: 0x00002320 File Offset: 0x00000520
  335.         public void SendLuaCScript(string Script)
  336.         {
  337.             foreach (string input in Script.Split("\r\n".ToCharArray()))
  338.             {
  339.                 try
  340.                 {
  341.                     this.SMTP(this.luacpipe, input);
  342.                 }
  343.                 catch (Exception ex)
  344.                 {
  345.                     MessageBox.Show(ex.Message.ToString());
  346.                 }
  347.             }
  348.         }
  349.  
  350.         // Token: 0x0600000D RID: 13 RVA: 0x00002384 File Offset: 0x00000584
  351.         public void SendLimitedLuaScript(string script)
  352.         {
  353.             this.SendLuaScript(script);
  354.         }
  355.  
  356.         // Token: 0x0600000E RID: 14 RVA: 0x0000238D File Offset: 0x0000058D
  357.         public void SendLuaScript(string Script)
  358.         {
  359.             this.SMTP(this.luapipe, Script);
  360.         }
  361.  
  362.         // Token: 0x0600000F RID: 15 RVA: 0x0000239C File Offset: 0x0000059C
  363.         public void LuaC_getglobal(string service)
  364.         {
  365.             this.SendScript("getglobal " + service);
  366.         }
  367.  
  368.         // Token: 0x06000010 RID: 16 RVA: 0x000023AF File Offset: 0x000005AF
  369.         public void LuaC_getfield(int index, string instance)
  370.         {
  371.             this.SendScript(string.Concat(new object[]
  372.             {
  373.                 "getglobal ",
  374.                 index,
  375.                 " ",
  376.                 instance
  377.             }));
  378.         }
  379.  
  380.         // Token: 0x06000011 RID: 17 RVA: 0x000023DF File Offset: 0x000005DF
  381.         public void LuaC_setfield(int index, string property)
  382.         {
  383.             this.SendScript(string.Concat(new object[]
  384.             {
  385.                 "setfield ",
  386.                 index,
  387.                 " ",
  388.                 property
  389.             }));
  390.         }
  391.  
  392.         // Token: 0x06000012 RID: 18 RVA: 0x0000240F File Offset: 0x0000060F
  393.         public void LuaC_pushvalue(int index)
  394.         {
  395.             this.SendScript("pushvalue " + index);
  396.         }
  397.  
  398.         // Token: 0x06000013 RID: 19 RVA: 0x00002427 File Offset: 0x00000627
  399.         public void LuaC_pushstring(string text)
  400.         {
  401.             this.SendScript("pushstring " + text);
  402.         }
  403.  
  404.         // Token: 0x06000014 RID: 20 RVA: 0x0000243A File Offset: 0x0000063A
  405.         public void LuaC_pushnumber(int number)
  406.         {
  407.             this.SendScript("pushnumber " + number);
  408.         }
  409.  
  410.         // Token: 0x06000015 RID: 21 RVA: 0x00002454 File Offset: 0x00000654
  411.         public void LuaC_pcall(int numberOfArguments, int numberOfResults, int ErrorFunction)
  412.         {
  413.             this.SendScript(string.Concat(new object[]
  414.             {
  415.                 "pushnumber ",
  416.                 numberOfArguments,
  417.                 " ",
  418.                 numberOfResults,
  419.                 " ",
  420.                 ErrorFunction
  421.             }));
  422.         }
  423.  
  424.         // Token: 0x06000016 RID: 22 RVA: 0x000024A5 File Offset: 0x000006A5
  425.         public void LuaC_settop(int index)
  426.         {
  427.             this.SendScript("settop " + index);
  428.         }
  429.  
  430.         // Token: 0x06000017 RID: 23 RVA: 0x000024BD File Offset: 0x000006BD
  431.         public void LuaC_pushboolean(string value = "false")
  432.         {
  433.             this.SendScript("pushboolean " + value);
  434.         }
  435.  
  436.         // Token: 0x06000018 RID: 24 RVA: 0x000024D0 File Offset: 0x000006D0
  437.         public void LuaC_gettop()
  438.         {
  439.             this.SendScript("gettop");
  440.         }
  441.  
  442.         // Token: 0x06000019 RID: 25 RVA: 0x000024DD File Offset: 0x000006DD
  443.         public void LuaC_pushnil()
  444.         {
  445.             this.SendScript("pushnil");
  446.         }
  447.  
  448.         // Token: 0x0600001A RID: 26 RVA: 0x000024EA File Offset: 0x000006EA
  449.         public void LuaC_next(int index)
  450.         {
  451.             this.SendScript("next");
  452.         }
  453.  
  454.         // Token: 0x0600001B RID: 27 RVA: 0x000024F7 File Offset: 0x000006F7
  455.         public void LuaC_pop(int quantity)
  456.         {
  457.             this.SendScript("pop " + quantity);
  458.         }
  459.  
  460.         // Token: 0x0600001C RID: 28 RVA: 0x0000250F File Offset: 0x0000070F
  461.         public void DoBTools(string username = "me")
  462.         {
  463.             this.SendCommand("btools " + username);
  464.         }
  465.  
  466.         // Token: 0x0600001D RID: 29 RVA: 0x00002522 File Offset: 0x00000722
  467.         public void DoKill(string username = "me")
  468.         {
  469.             this.SendCommand("kill " + username);
  470.         }
  471.  
  472.         // Token: 0x0600001E RID: 30 RVA: 0x00002535 File Offset: 0x00000735
  473.         public void CreateForceField(string username = "me")
  474.         {
  475.             this.SendCommand("ff " + username);
  476.         }
  477.  
  478.         // Token: 0x0600001F RID: 31 RVA: 0x00002548 File Offset: 0x00000748
  479.         public void RemoveForceField(string username = "me")
  480.         {
  481.             this.SendCommand("noff " + username);
  482.         }
  483.  
  484.         // Token: 0x06000020 RID: 32 RVA: 0x0000255B File Offset: 0x0000075B
  485.         public void DoFloat(string username = "me")
  486.         {
  487.             this.SendCommand("float " + username);
  488.         }
  489.  
  490.         // Token: 0x06000021 RID: 33 RVA: 0x0000256E File Offset: 0x0000076E
  491.         public void DoNoFloat(string username = "me")
  492.         {
  493.             this.SendCommand("nofloat " + username);
  494.         }
  495.  
  496.         // Token: 0x06000022 RID: 34 RVA: 0x00002581 File Offset: 0x00000781
  497.         public void RemoveLimbs(string username = "me")
  498.         {
  499.             this.SendCommand("nolimbs " + username);
  500.         }
  501.  
  502.         // Token: 0x06000023 RID: 35 RVA: 0x00002594 File Offset: 0x00000794
  503.         public void RemoveArms(string username = "me")
  504.         {
  505.             this.SendCommand("noarms " + username);
  506.         }
  507.  
  508.         // Token: 0x06000024 RID: 36 RVA: 0x000025A7 File Offset: 0x000007A7
  509.         public void RemoveLegs(string username = "me")
  510.         {
  511.             this.SendCommand("nolegs " + username);
  512.         }
  513.  
  514.         // Token: 0x06000025 RID: 37 RVA: 0x000025BA File Offset: 0x000007BA
  515.         public void AddFire(string username = "me")
  516.         {
  517.             this.SendCommand("fire " + username);
  518.         }
  519.  
  520.         // Token: 0x06000026 RID: 38 RVA: 0x000025CD File Offset: 0x000007CD
  521.         public void RemoveFire(string username = "me")
  522.         {
  523.             this.SendCommand("nofire " + username);
  524.         }
  525.  
  526.         // Token: 0x06000027 RID: 39 RVA: 0x000025E0 File Offset: 0x000007E0
  527.         public void AddSparkles(string username = "me")
  528.         {
  529.             this.SendCommand("sparkles " + username);
  530.         }
  531.  
  532.         // Token: 0x06000028 RID: 40 RVA: 0x000025F3 File Offset: 0x000007F3
  533.         public void RemoveSparkles(string username = "me")
  534.         {
  535.             this.SendCommand("nosparkles " + username);
  536.         }
  537.  
  538.         // Token: 0x06000029 RID: 41 RVA: 0x00002606 File Offset: 0x00000806
  539.         public void AddSmoke(string username = "me")
  540.         {
  541.             this.SendCommand("smoke " + username);
  542.         }
  543.  
  544.         // Token: 0x0600002A RID: 42 RVA: 0x00002619 File Offset: 0x00000819
  545.         public void DoBlockHead(string username = "me")
  546.         {
  547.             this.SendCommand("blockhead " + username);
  548.         }
  549.  
  550.         // Token: 0x0600002B RID: 43 RVA: 0x0000262C File Offset: 0x0000082C
  551.         public void ForceBubbleChat(string username = "me", string text = "WeAreDevs Website")
  552.         {
  553.             this.SendCommand("chat " + username + " " + text);
  554.         }
  555.  
  556.         // Token: 0x0600002C RID: 44 RVA: 0x00002645 File Offset: 0x00000845
  557.         public void ConsolePrint(string text = "WeAreDevs Website")
  558.         {
  559.             this.SendCommand("print " + text);
  560.         }
  561.  
  562.         // Token: 0x0600002D RID: 45 RVA: 0x00002658 File Offset: 0x00000858
  563.         public void ConsoleWarn(string text = "meWeAreDevs Website")
  564.         {
  565.             this.SendCommand("warn " + text);
  566.         }
  567.  
  568.         // Token: 0x0600002E RID: 46 RVA: 0x0000266B File Offset: 0x0000086B
  569.         public void SetWalkSpeed(string username = "me", int value = 100)
  570.         {
  571.             this.SendCommand("speed " + username + " " + value.ToString());
  572.         }
  573.  
  574.         // Token: 0x0600002F RID: 47 RVA: 0x0000268A File Offset: 0x0000088A
  575.         public void ToggleClickTeleport()
  576.         {
  577.             this.SendCommand("toggleclickteleport");
  578.         }
  579.  
  580.         // Token: 0x06000030 RID: 48 RVA: 0x00002697 File Offset: 0x00000897
  581.         public void SetFogEnd(int value = 0)
  582.         {
  583.             this.SendCommand("fogend " + value);
  584.         }
  585.  
  586.         // Token: 0x06000031 RID: 49 RVA: 0x000026AF File Offset: 0x000008AF
  587.         public void SetJumpPower(int value = 100)
  588.         {
  589.             this.SendCommand("jumppower " + value);
  590.         }
  591.  
  592.         // Token: 0x06000032 RID: 50 RVA: 0x000026C7 File Offset: 0x000008C7
  593.         public void TeleportMyCharacterTo(string target_username = "me")
  594.         {
  595.             this.SendCommand("teleport " + target_username);
  596.         }
  597.  
  598.         // Token: 0x06000033 RID: 51 RVA: 0x000026DA File Offset: 0x000008DA
  599.         public void PlaySoundInGame(string assetid = "1071384374")
  600.         {
  601.             this.SendCommand("music " + assetid);
  602.         }
  603.  
  604.         // Token: 0x06000034 RID: 52 RVA: 0x000026ED File Offset: 0x000008ED
  605.         public void SetSkyboxImage(string assetid = "2143522")
  606.         {
  607.             this.SendCommand("skybox " + assetid);
  608.         }
  609.  
  610.         private WebClient client = new WebClient();
  611.  
  612.         private ExploitAPI.BasicInject injector = new ExploitAPI.BasicInject();
  613.  
  614.         private string cmdpipe = "WeAreDevsPublicAPI_CMD";
  615.  
  616.         private string luacpipe = "WeAreDevsPublicAPI_LuaC";
  617.  
  618.         private string luapipe = "WeAreDevsPublicAPI_Lua";
  619.  
  620.         private class BasicInject
  621.         {
  622.             [DllImport("kernel32", CharSet = CharSet.Ansi, SetLastError = true)]
  623.             internal static extern IntPtr LoadLibraryA(string lpFileName);
  624.  
  625.             [DllImport("kernel32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
  626.             internal static extern UIntPtr GetProcAddress(IntPtr hModule, string procName);
  627.  
  628.             [DllImport("kernel32.dll", SetLastError = true)]
  629.             [return: MarshalAs(UnmanagedType.Bool)]
  630.             internal static extern bool FreeLibrary(IntPtr hModule);
  631.  
  632.             [DllImport("kernel32.dll")]
  633.             internal static extern IntPtr OpenProcess(ExploitAPI.BasicInject.ProcessAccess dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
  634.  
  635.             [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)]
  636.             internal static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);
  637.  
  638.             [DllImport("kernel32.dll", SetLastError = true)]
  639.             internal static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out UIntPtr lpNumberOfBytesWritten);
  640.  
  641.             [DllImport("kernel32.dll")]
  642.             internal static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, uint dwStackSize, UIntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, out IntPtr lpThreadId);
  643.  
  644.             [DllImport("kernel32.dll", SetLastError = true)]
  645.             internal static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, out int lpNumberOfBytesRead);
  646.  
  647.             public bool InjectDLL()
  648.             {
  649.                 if (Process.GetProcessesByName("RobloxPlayerBeta").Length == 0)
  650.                 {
  651.                     return false;
  652.                 }
  653.                 Process process = Process.GetProcessesByName("RobloxPlayerBeta")[0];
  654.                 byte[] bytes = new ASCIIEncoding().GetBytes(AppDomain.CurrentDomain.BaseDirectory + "WeAreDevsMainDLL.dll");
  655.                 IntPtr hModule = ExploitAPI.BasicInject.LoadLibraryA("kernel32.dll");
  656.                 UIntPtr procAddress = ExploitAPI.BasicInject.GetProcAddress(hModule, "LoadLibraryA");
  657.                 ExploitAPI.BasicInject.FreeLibrary(hModule);
  658.                 if (procAddress == UIntPtr.Zero)
  659.                 {
  660.                     return false;
  661.                 }
  662.                 IntPtr intPtr = ExploitAPI.BasicInject.OpenProcess(ExploitAPI.BasicInject.ProcessAccess.AllAccess, false, process.Id);
  663.                 if (intPtr == IntPtr.Zero)
  664.                 {
  665.                     return false;
  666.                 }
  667.                 IntPtr intPtr2 = ExploitAPI.BasicInject.VirtualAllocEx(intPtr, (IntPtr)0, (uint)bytes.Length, 12288U, 4U);
  668.                 UIntPtr uintPtr;
  669.                 IntPtr intPtr3;
  670.                 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);
  671.             }
  672.  
  673.             [Flags]
  674.             public enum ProcessAccess
  675.             {
  676.                 AllAccess = 1050235,
  677.                 CreateThread = 2,
  678.                 DuplicateHandle = 64,
  679.                 QueryInformation = 1024,
  680.                 SetInformation = 512,
  681.                 Terminate = 1,
  682.                 VMOperation = 8,
  683.                 VMRead = 16,
  684.                 VMWrite = 32,
  685.                 Synchronize = 1048576
  686.             }
  687.         }
  688.     }
  689. }
  690. //Injection.cs code:
  691. using System;
  692. using System.Diagnostics;
  693. using System.IO;
  694. using System.Runtime.InteropServices;
  695. using System.Text;
  696.  
  697. namespace YTVid3 // Make sure u always change this to ur exploit name!
  698. {
  699.     // Token: 0x02000003 RID: 3
  700.     internal class DLLInjection
  701.     {
  702.         // Token: 0x02000004 RID: 4
  703.         public enum DllInjectionResult
  704.         {
  705.             // Token: 0x04000003 RID: 3
  706.             DllNotFound,
  707.             // Token: 0x04000004 RID: 4
  708.             GameProcessNotFound,
  709.             // Token: 0x04000005 RID: 5
  710.             InjectionFailed,
  711.             // Token: 0x04000006 RID: 6
  712.             Success
  713.         }
  714.  
  715.         // Token: 0x02000005 RID: 5
  716.         public sealed class DllInjector
  717.         {
  718.             // Token: 0x17000001 RID: 1
  719.             // (get) Token: 0x0600000B RID: 11 RVA: 0x0000242F File Offset: 0x0000062F
  720.             public static DLLInjection.DllInjector GetInstance
  721.             {
  722.                 get
  723.                 {
  724.                     if (DLLInjection.DllInjector._instance == null)
  725.                     {
  726.                         DLLInjection.DllInjector._instance = new DLLInjection.DllInjector();
  727.                     }
  728.                     return DLLInjection.DllInjector._instance;
  729.                 }
  730.             }
  731.  
  732.             // Token: 0x0600000D RID: 13 RVA: 0x00002454 File Offset: 0x00000654
  733.             private DllInjector()
  734.             {
  735.             }
  736.  
  737.             // Token: 0x0600000E RID: 14 RVA: 0x0000245C File Offset: 0x0000065C
  738.             private bool bInject(uint pToBeInjected, string sDllPath)
  739.             {
  740.                 IntPtr intPtr = DLLInjection.DllInjector.OpenProcess(1082U, 1, pToBeInjected);
  741.                 if (intPtr == DLLInjection.DllInjector.INTPTR_ZERO)
  742.                 {
  743.                     return false;
  744.                 }
  745.                 IntPtr procAddress = DLLInjection.DllInjector.GetProcAddress(DLLInjection.DllInjector.GetModuleHandle("kernel32.dll"), "LoadLibraryA");
  746.                 if (procAddress == DLLInjection.DllInjector.INTPTR_ZERO)
  747.                 {
  748.                     return false;
  749.                 }
  750.                 IntPtr intPtr2 = DLLInjection.DllInjector.VirtualAllocEx(intPtr, (IntPtr)0, (IntPtr)sDllPath.Length, 12288U, 64U);
  751.                 if (intPtr2 == DLLInjection.DllInjector.INTPTR_ZERO)
  752.                 {
  753.                     return false;
  754.                 }
  755.                 byte[] bytes = Encoding.ASCII.GetBytes(sDllPath);
  756.                 if (DLLInjection.DllInjector.WriteProcessMemory(intPtr, intPtr2, bytes, (uint)bytes.Length, 0) == 0)
  757.                 {
  758.                     return false;
  759.                 }
  760.                 if (DLLInjection.DllInjector.CreateRemoteThread(intPtr, (IntPtr)0, DLLInjection.DllInjector.INTPTR_ZERO, procAddress, intPtr2, 0U, (IntPtr)0) == DLLInjection.DllInjector.INTPTR_ZERO)
  761.                 {
  762.                     return false;
  763.                 }
  764.                 DLLInjection.DllInjector.CloseHandle(intPtr);
  765.                 return true;
  766.             }
  767.  
  768.             // Token: 0x0600000F RID: 15
  769.             [DllImport("kernel32.dll", SetLastError = true)]
  770.             private static extern int CloseHandle(IntPtr hObject);
  771.  
  772.             // Token: 0x06000010 RID: 16
  773.             [DllImport("kernel32.dll", SetLastError = true)]
  774.             private static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttribute, IntPtr dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);
  775.  
  776.             // Token: 0x06000011 RID: 17
  777.             [DllImport("kernel32.dll", SetLastError = true)]
  778.             private static extern IntPtr GetModuleHandle(string lpModuleName);
  779.  
  780.             // Token: 0x06000012 RID: 18
  781.             [DllImport("kernel32.dll", SetLastError = true)]
  782.             private static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
  783.  
  784.             // Token: 0x06000013 RID: 19 RVA: 0x00002524 File Offset: 0x00000724
  785.             public DLLInjection.DllInjectionResult Inject(string sProcName, string sDllPath)
  786.             {
  787.                 if (!File.Exists(sDllPath))
  788.                 {
  789.                     return DLLInjection.DllInjectionResult.DllNotFound;
  790.                 }
  791.                 uint num = 0U;
  792.                 Process[] processes = Process.GetProcesses();
  793.                 for (int i = 0; i < processes.Length; i++)
  794.                 {
  795.                     if (!(processes[i].ProcessName != sProcName))
  796.                     {
  797.                         num = (uint)processes[i].Id;
  798.                         break;
  799.                     }
  800.                 }
  801.                 if (num == 0U)
  802.                 {
  803.                     return DLLInjection.DllInjectionResult.GameProcessNotFound;
  804.                 }
  805.                 if (!this.bInject(num, sDllPath))
  806.                 {
  807.                     return DLLInjection.DllInjectionResult.InjectionFailed;
  808.                 }
  809.                 return DLLInjection.DllInjectionResult.Success;
  810.             }
  811.  
  812.             // Token: 0x06000014 RID: 20
  813.             [DllImport("kernel32.dll", SetLastError = true)]
  814.             private static extern IntPtr OpenProcess(uint dwDesiredAccess, int bInheritHandle, uint dwProcessId);
  815.  
  816.             // Token: 0x06000015 RID: 21
  817.             [DllImport("kernel32.dll", SetLastError = true)]
  818.             private static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, IntPtr dwSize, uint flAllocationType, uint flProtect);
  819.  
  820.             // Token: 0x06000016 RID: 22
  821.             [DllImport("kernel32.dll", SetLastError = true)]
  822.             private static extern int WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] buffer, uint size, int lpNumberOfBytesWritten);
  823.  
  824.             // Token: 0x04000007 RID: 7
  825.             private static readonly IntPtr INTPTR_ZERO = (IntPtr)0;
  826.  
  827.             // Token: 0x04000008 RID: 8
  828.             private static DLLInjection.DllInjector _instance;
  829.         }
  830.     }
  831. }
  832. // Login Code:
  833. if (textBox1.Text == "Test1")
  834.                 if(textBox2.Text == "Test2")
  835.             {
  836.                 MessageBox.Show("Thanks for using YTVid3 Exploit");
  837.                 this.Hide();
  838.                 Form2 main = new Form2();
  839.                 main.Show();
  840.             }
  841.             else
  842.             {
  843.                 MessageBox.Show("Invalid username or password");
  844.             }
  845. // Thats it!! Kinda hard.
  846. // If u have issuses with this contact me on discord:
  847. Username: EpicGamer27 Alt
  848. Tag: #4205
Add Comment
Please, Sign In to add comment