Jack10101

Untitled

Dec 19th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.25 KB | None | 0 0
  1. Imports System
  2. Imports System.Diagnostics
  3. Imports System.IO
  4. Imports System.IO.Pipes
  5. Imports System.Net
  6. Imports System.Runtime.InteropServices
  7. Imports System.Text
  8. Imports System.Windows.Forms
  9.  
  10. Namespace WeAreDevs_API
  11. Public Class ExploitAPI
  12. ' Methods
  13. Public Sub AddFire(ByVal Optional username As String = "me")
  14. Me.SendCommand(("fire " & username))
  15. End Sub
  16.  
  17. Public Sub AddSmoke(ByVal Optional username As String = "me")
  18. Me.SendCommand(("smoke " & username))
  19. End Sub
  20.  
  21. Public Sub AddSparkles(ByVal Optional username As String = "me")
  22. Me.SendCommand(("sparkles " & username))
  23. End Sub
  24.  
  25. Public Sub ConsolePrint(ByVal Optional [text] As String = "WeAreDevs Website")
  26. Me.SendCommand(("print " & [text]))
  27. End Sub
  28.  
  29. Public Sub ConsoleWarn(ByVal Optional [text] As String = "meWeAreDevs Website")
  30. Me.SendCommand(("warn " & [text]))
  31. End Sub
  32.  
  33. Public Sub CreateForceField(ByVal Optional username As String = "me")
  34. Me.SendCommand(("ff " & username))
  35. End Sub
  36.  
  37. Public Sub DoBlockHead(ByVal Optional username As String = "me")
  38. Me.SendCommand(("blockhead " & username))
  39. End Sub
  40.  
  41. Public Sub DoBTools(ByVal Optional username As String = "me")
  42. Me.SendCommand(("btools " & username))
  43. End Sub
  44.  
  45. Public Sub DoFloat(ByVal Optional username As String = "me")
  46. Me.SendCommand(("float " & username))
  47. End Sub
  48.  
  49. Public Sub DoKill(ByVal Optional username As String = "me")
  50. Me.SendCommand(("kill " & username))
  51. End Sub
  52.  
  53. Public Sub DoNoFloat(ByVal Optional username As String = "me")
  54. Me.SendCommand(("nofloat " & username))
  55. End Sub
  56.  
  57. Private Function DownloadLatestVersion() As Boolean
  58. If File.Exists("exploit-main.dll") Then
  59. File.Delete("exploit-main.dll")
  60. End If
  61. Dim str As String = Me.ReadURL("https://pastebin.com/raw/Ly9mJwH7")
  62. If (str.Length > 0) Then
  63. Dim separator As Char() = New Char() { " "c }
  64. Me.client.DownloadFile(str.Split(separator)(1), "exploit-main.dll")
  65. End If
  66. Return File.Exists("exploit-main.dll")
  67. End Function
  68.  
  69. Public Sub ForceBubbleChat(ByVal Optional username As String = "me", ByVal Optional [text] As String = "WeAreDevs Website")
  70. Me.SendCommand(("chat " & username & " " & [text]))
  71. End Sub
  72.  
  73. Public Function IsUpdated() As Boolean
  74. Dim flag As Boolean = False
  75. Dim str As String = Me.ReadURL("https://pastebin.com/raw/Ly9mJwH7")
  76. If (str.Length <= 0) Then
  77. MessageBox.Show("Could not check for the latest version. Did your fireall block us?", "Error")
  78. Else
  79. Dim separator As Char() = New Char() { " "c }
  80. flag = Convert.ToBoolean(str.Split(separator)(0))
  81. End If
  82. Return flag
  83. End Function
  84.  
  85. Public Function LaunchExploit() As Boolean
  86. If ExploitAPI.NamedPipeExist(Me.cmdpipe) Then
  87. MessageBox.Show("Dll already injected", "No problems")
  88. ElseIf Not Me.IsUpdated Then
  89. MessageBox.Show("Exploit is currently patched... Please wait for the developers to fix it! Meanwhile, check wearedevs.net for updates/info.", "Error")
  90. ElseIf Not Me.DownloadLatestVersion Then
  91. MessageBox.Show("Could not download the latest version! Did your firewall block us?", "Error")
  92. Else
  93. If Me.injector.InjectDLL Then
  94. Return True
  95. End If
  96. MessageBox.Show("DLL failed to inject", "Error")
  97. End If
  98. Return False
  99. End Function
  100.  
  101. Public Sub LuaC_getfield(ByVal index As Integer, ByVal instance As String)
  102. Dim objArray1 As Object() = New Object() { "getglobal ", index, " ", instance }
  103. Me.SendScript(String.Concat(objArray1))
  104. End Sub
  105.  
  106. Public Sub LuaC_getglobal(ByVal service As String)
  107. Me.SendScript(("getglobal " & service))
  108. End Sub
  109.  
  110. Public Sub LuaC_gettop()
  111. Me.SendScript("gettop")
  112. End Sub
  113.  
  114. Public Sub LuaC_next(ByVal index As Integer)
  115. Me.SendScript("next")
  116. End Sub
  117.  
  118. Public Sub LuaC_pcall(ByVal numberOfArguments As Integer, ByVal numberOfResults As Integer, ByVal ErrorFunction As Integer)
  119. Dim objArray1 As Object() = New Object() { "pushnumber ", numberOfArguments, " ", numberOfResults, " ", ErrorFunction }
  120. Me.SendScript(String.Concat(objArray1))
  121. End Sub
  122.  
  123. Public Sub LuaC_pop(ByVal quantity As Integer)
  124. Me.SendScript(("pop " & quantity))
  125. End Sub
  126.  
  127. Public Sub LuaC_pushboolean(ByVal Optional value As String = "false")
  128. Me.SendScript(("pushboolean " & value))
  129. End Sub
  130.  
  131. Public Sub LuaC_pushnil()
  132. Me.SendScript("pushnil")
  133. End Sub
  134.  
  135. Public Sub LuaC_pushnumber(ByVal number As Integer)
  136. Me.SendScript(("pushnumber " & number))
  137. End Sub
  138.  
  139. Public Sub LuaC_pushstring(ByVal [text] As String)
  140. Me.SendScript(("pushstring " & [text]))
  141. End Sub
  142.  
  143. Public Sub LuaC_pushvalue(ByVal index As Integer)
  144. Me.SendScript(("pushvalue " & index))
  145. End Sub
  146.  
  147. Public Sub LuaC_setfield(ByVal index As Integer, ByVal [property] As String)
  148. Dim objArray1 As Object() = New Object() { "setfield ", index, " ", [property] }
  149. Me.SendScript(String.Concat(objArray1))
  150. End Sub
  151.  
  152. Public Sub LuaC_settop(ByVal index As Integer)
  153. Me.SendScript(("settop " & index))
  154. End Sub
  155.  
  156. Private Shared Function NamedPipeExist(ByVal pipeName As String) As Boolean
  157. Dim flag2 As Boolean
  158. Try
  159. Dim timeout As Integer = 0
  160. If Not ExploitAPI.WaitNamedPipe(Path.GetFullPath($"\\\\.\\pipe\\{pipeName}"), timeout) Then
  161. Dim num2 As Integer = Marshal.GetLastWin32Error
  162. If (num2 <> 0) Then
  163. If (num2 = 2) Then
  164. Return False
  165. End If
  166. Else
  167. Return False
  168. End If
  169. End If
  170. Return True
  171. Catch exception1 As Exception
  172. Return False
  173. End Try
  174. Return flag2
  175. End Function
  176.  
  177. Public Sub PlaySoundInGame(ByVal Optional assetid As String = "1071384374")
  178. Me.SendCommand(("music " & assetid))
  179. End Sub
  180.  
  181. Private Function ReadURL(ByVal url As String) As String
  182. Return Me.client.DownloadString(url)
  183. End Function
  184.  
  185. Public Sub RemoveArms(ByVal Optional username As String = "me")
  186. Me.SendCommand(("noarms " & username))
  187. End Sub
  188.  
  189. Public Sub RemoveFire(ByVal Optional username As String = "me")
  190. Me.SendCommand(("nofire " & username))
  191. End Sub
  192.  
  193. Public Sub RemoveForceField(ByVal Optional username As String = "me")
  194. Me.SendCommand(("noff " & username))
  195. End Sub
  196.  
  197. Public Sub RemoveLegs(ByVal Optional username As String = "me")
  198. Me.SendCommand(("nolegs " & username))
  199. End Sub
  200.  
  201. Public Sub RemoveLimbs(ByVal Optional username As String = "me")
  202. Me.SendCommand(("nolimbs " & username))
  203. End Sub
  204.  
  205. Public Sub RemoveSparkles(ByVal Optional username As String = "me")
  206. Me.SendCommand(("nosparkles " & username))
  207. End Sub
  208.  
  209. Public Sub SendCommand(ByVal Command As String)
  210. Me.SMTP(Me.cmdpipe, Command)
  211. End Sub
  212.  
  213. Public Sub SendLimitedLuaScript(ByVal Script As String)
  214. Me.SMTP(Me.luapipe, Script)
  215. End Sub
  216.  
  217. Public Sub SendScript(ByVal Script As String)
  218. Dim str As String
  219. For Each str In Script.Split(ChrW(13) & ChrW(10).ToCharArray)
  220. Try
  221. Me.SMTP(Me.luacpipe, str)
  222. Catch exception1 As Exception
  223. MessageBox.Show(exception1.Message.ToString)
  224. End Try
  225. Next
  226. End Sub
  227.  
  228. Public Sub SetFogEnd(ByVal Optional value As Integer = 0)
  229. Me.SendCommand(("fogend " & value))
  230. End Sub
  231.  
  232. Public Sub SetJumpPower(ByVal Optional value As Integer = 100)
  233. Me.SendCommand(("jumppower " & value))
  234. End Sub
  235.  
  236. Public Sub SetSkyboxImage(ByVal Optional assetid As String = "2143522")
  237. Me.SendCommand(("skybox " & assetid))
  238. End Sub
  239.  
  240. Public Sub SetWalkSpeed(ByVal Optional username As String = "me", ByVal Optional value As Integer = 100)
  241. Me.SendCommand(("speed " & username & " " & value.ToString))
  242. End Sub
  243.  
  244. Private Sub SMTP(ByVal pipe As String, ByVal input As String)
  245. If Not ExploitAPI.NamedPipeExist(pipe) Then
  246. MessageBox.Show("Error occured. Did the dll properly inject?", "Oops", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
  247. Else
  248. Try
  249. Using stream As NamedPipeClientStream = New NamedPipeClientStream(".", pipe, PipeDirection.Out)
  250. stream.Connect
  251. Using writer As StreamWriter = New StreamWriter(stream)
  252. writer.Write(input)
  253. writer.Dispose
  254. End Using
  255. stream.Dispose
  256. End Using
  257. Catch exception2 As IOException
  258. MessageBox.Show("Error occured sending message to the game!", "Connection Failed!", MessageBoxButtons.OK, MessageBoxIcon.Hand)
  259. Catch exception1 As Exception
  260. MessageBox.Show(exception1.Message.ToString)
  261. End Try
  262. End If
  263. End Sub
  264.  
  265. Public Sub TeleportMyCharacterTo(ByVal Optional target_username As String = "me")
  266. Me.SendCommand(("teleport " & target_username))
  267. End Sub
  268.  
  269. Public Sub ToggleClickTeleport()
  270. Me.SendCommand("toggleclickteleport")
  271. End Sub
  272.  
  273. <DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
  274. Private Shared Function WaitNamedPipe(ByVal name As String, ByVal timeout As Integer) As <MarshalAs(UnmanagedType.Bool)> Boolean
  275. End Function
  276.  
  277.  
  278. ' Fields
  279. Private client As WebClient = New WebClient
  280. Private injector As BasicInject = New BasicInject
  281. Private cmdpipe As String = "WeAreDevsPublicAPI_CMD"
  282. Private luacpipe As String = "WeAreDevsPublicAPI_LuaC"
  283. Private luapipe As String = "WeAreDevsPublicAPI_Lua"
  284.  
  285. ' Nested Types
  286. Private Class BasicInject
  287. ' Methods
  288. <DllImport("kernel32.dll")> _
  289. Friend Shared Function CreateRemoteThread(ByVal hProcess As IntPtr, ByVal lpThreadAttributes As IntPtr, ByVal dwStackSize As UInt32, ByVal lpStartAddress As UIntPtr, ByVal lpParameter As IntPtr, ByVal dwCreationFlags As UInt32, <Out> ByRef lpThreadId As IntPtr) As IntPtr
  290. End Function
  291.  
  292. <DllImport("kernel32.dll", SetLastError:=True)> _
  293. Friend Shared Function FreeLibrary(ByVal hModule As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
  294. End Function
  295.  
  296. <DllImport("kernel32", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
  297. Friend Shared Function GetProcAddress(ByVal hModule As IntPtr, ByVal procName As String) As UIntPtr
  298. End Function
  299.  
  300. Public Function InjectDLL() As Boolean
  301. Dim ptr As UIntPtr
  302. Dim ptr2 As IntPtr
  303. If (Process.GetProcessesByName("RobloxPlayerBeta").Length = 0) Then
  304. Return False
  305. End If
  306. Dim process As Process = Process.GetProcessesByName("RobloxPlayerBeta")(0)
  307. Dim bytes As Byte() = New ASCIIEncoding().GetBytes((AppDomain.CurrentDomain.BaseDirectory & "exploit-main.dll"))
  308. Dim hModule As IntPtr = BasicInject.LoadLibraryA("kernel32.dll")
  309. Dim procAddress As UIntPtr = BasicInject.GetProcAddress(hModule, "LoadLibraryA")
  310. BasicInject.FreeLibrary(hModule)
  311. If (procAddress = UIntPtr.Zero) Then
  312. Return False
  313. End If
  314. Dim hProcess As IntPtr = BasicInject.OpenProcess(ProcessAccess.AllAccess, False, process.Id)
  315. If (hProcess = IntPtr.Zero) Then
  316. Return False
  317. End If
  318. Dim lpBaseAddress As IntPtr = BasicInject.VirtualAllocEx(hProcess, IntPtr.Zero, DirectCast(bytes.Length, UInt32), &H3000, 4)
  319. Return If(Not (lpBaseAddress = IntPtr.Zero), If(BasicInject.WriteProcessMemory(hProcess, lpBaseAddress, bytes, DirectCast(bytes.Length, UInt32), ptr), Not (BasicInject.CreateRemoteThread(hProcess, IntPtr.Zero, 0, procAddress, lpBaseAddress, 0, ptr2) = IntPtr.Zero), False), False)
  320. End Function
  321.  
  322. <DllImport("kernel32", CharSet:=CharSet.Ansi, SetLastError:=True)> _
  323. Friend Shared Function LoadLibraryA(ByVal lpFileName As String) As IntPtr
  324. End Function
  325.  
  326. <DllImport("kernel32.dll")> _
  327. Friend Shared Function OpenProcess(ByVal dwDesiredAccess As ProcessAccess, <MarshalAs(UnmanagedType.Bool)> ByVal bInheritHandle As Boolean, ByVal dwProcessId As Integer) As IntPtr
  328. End Function
  329.  
  330. <DllImport("kernel32.dll", SetLastError:=True)> _
  331. Friend Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <Out> ByVal lpBuffer As Byte(), ByVal dwSize As Integer, <Out> ByRef lpNumberOfBytesRead As Integer) As Boolean
  332. End Function
  333.  
  334. <DllImport("kernel32.dll", SetLastError:=True, ExactSpelling:=True)> _
  335. Friend Shared Function VirtualAllocEx(ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As UInt32, ByVal flAllocationType As UInt32, ByVal flProtect As UInt32) As IntPtr
  336. End Function
  337.  
  338. <DllImport("kernel32.dll", SetLastError:=True)> _
  339. Friend Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As Byte(), ByVal nSize As UInt32, <Out> ByRef lpNumberOfBytesWritten As UIntPtr) As Boolean
  340. End Function
  341.  
  342.  
  343. ' Nested Types
  344. <Flags> _
  345. Public Enum ProcessAccess
  346. ' Fields
  347. AllAccess = &H10067B
  348. CreateThread = 2
  349. DuplicateHandle = &H40
  350. QueryInformation = &H400
  351. SetInformation = &H200
  352. Terminate = 1
  353. VMOperation = 8
  354. VMRead = &H10
  355. VMWrite = &H20
  356. Synchronize = &H100000
  357. End Enum
  358. End Class
  359. End Class
  360. End Namespace
Advertisement
Add Comment
Please, Sign In to add comment