C+P Injector

I made a new injector that you can just delete your current code and replace it with this lol
The well know statement : kareem don't leech.... lol
Copy/Paste this into ur form and u have a good injector...
Code:
Public Class Form1
Dim InjectButton As New Button : Dim BrowseButton As New Button : Dim ClearButton As New Button : Dim RemoveButton As New Button
Dim DLLDialog As New System.Windows.Forms.OpenFileDialog : Dim DLLListbox As New ListBox
Dim CloseAfterInjection As New CheckBox : Dim ProcessTextbox As New TextBox
Dim dlls As New Dictionary(Of String, String)
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Integer, ByVal lpAddress As Integer, ByVal dwSize As Integer, ByVal flAllocationType As Integer, ByVal flProtect As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByVal lpBuffer() As Byte, ByVal nSize As Integer, ByVal lpNumberOfBytesWritten As UInteger) As Boolean
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Integer, ByVal lpProcName As String) As Integer
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Integer
Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Integer, ByVal lpThreadAttributes As Integer, ByVal dwStackSize As Integer, ByVal lpStartAddress As Integer, ByVal lpParameter As Integer, ByVal dwCreationFlags As Integer, ByVal lpThreadId As Integer) As Integer
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Private Function Inject(ByVal pID As Integer, ByVal dllLocation As String) As Boolean
If IntPtr.Size = 8 Then Throw New ArgumentException("Please make sure this program is compiled as x86, not x64. Memory functions don't work so well otherwise.")
Dim hProcess As Integer = OpenProcess(&H1F0FFF, 1, pID)
If hProcess = 0 Then Return False
Dim dllBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(dllLocation)
Dim allocAddress As Integer = VirtualAllocEx(hProcess, 0, dllBytes.Length, &H1000, &H4)
If allocAddress = Nothing Then Return False
Dim kernelMod As Integer = GetModuleHandle("kernel32.dll")
Dim loadLibAddr = GetProcAddress(kernelMod, "LoadLibraryA")
If kernelMod = 0 OrElse loadLibAddr = 0 Then Return False
WriteProcessMemory(hProcess, allocAddress, dllBytes, dllBytes.Length, 0)
Dim libThread As Integer = CreateRemoteThread(hProcess, 0, 0, loadLibAddr, allocAddress, 0, 0)
If libThread = 0 Then
Return False
Else
WaitForSingleObject(libThread, 5000)
CloseHandle(libThread)
End If
CloseHandle(hProcess)
MsgBox("The Injection was a success..", MsgBoxStyle.Information, "Injector")
If CloseAfterInjection.Checked = True Then
Me.Close()
Else
End If
Return True
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
InjectButton.Name = "InjectButton" : InjectButton.Text = "Inject" : InjectButton.Size = New Size(75, 30) : InjectButton.Location = New Point(185, 12) : InjectButton.BackColor = Color.Black : InjectButton.ForeColor = Color.White : Me.Controls.Add(InjectButton) : InjectButton.FlatStyle = FlatStyle.Flat : AddHandler InjectButton.Click, AddressOf InjectClick : BrowseButton.Name = "BrowseButton" : BrowseButton.Text = "Browse" : BrowseButton.Size = New Size(75, 30) : BrowseButton.Location = New Point(185, 48) : BrowseButton.BackColor = Color.Black : BrowseButton.ForeColor = Color.White : Me.Controls.Add(BrowseButton) : BrowseButton.FlatStyle = FlatStyle.Flat : AddHandler BrowseButton.Click, AddressOf BrowseClick : ClearButton.Name = "ClearButton" : ClearButton.Text = "Clear" : ClearButton.Size = New Size(75, 30) : ClearButton.Location = New Point(185, 84) : ClearButton.BackColor = Color.Black : ClearButton.ForeColor = Color.White : Me.Controls.Add(ClearButton) : ClearButton.FlatStyle = FlatStyle.Flat : AddHandler ClearButton.Click, AddressOf ClearClick : RemoveButton.Name = "RemoveButton" : RemoveButton.Text = "Remove" : RemoveButton.Size = New Size(75, 30) : RemoveButton.Location = New Point(185, 120) : RemoveButton.BackColor = Color.Black : RemoveButton.ForeColor = Color.White : Me.Controls.Add(RemoveButton) : RemoveButton.FlatStyle = FlatStyle.Flat : AddHandler RemoveButton.Click, AddressOf RemoveClick : Me.BackColor = Color.Black : DLLListbox.Name = "DLLListbox" : DLLListbox.Size = New Size(156, 134) : DLLListbox.Location = New Point(13, 65) : DLLListbox.BackColor = Color.Black : DLLListbox.ForeColor = Color.White : Me.Controls.Add(DLLListbox) : CloseAfterInjection.Name = "CAICheckBox" : CloseAfterInjection.Text = "C.A.I." : CloseAfterInjection.Location = New Point(12, 207) : CloseAfterInjection.BackColor = Color.Black : CloseAfterInjection.ForeColor = Color.White : Me.Controls.Add(CloseAfterInjection) : ProcessTextbox.BackColor = Color.Black : ProcessTextbox.ForeColor = Color.White : ProcessTextbox.Size = New Size(151, 20) : ProcessTextbox.Text = "Process Without .EXE" : ProcessTextbox.Name = "Processtextbox" : ProcessTextbox.Location = New Point(15, 35) : Me.Controls.Add(ProcessTextbox) : DLLDialog.Filter = "DLL (*.dll) |*.dll|All Files (*.*) |*.*" : Me.Text = "::Injector by Lucasheer::" : Me.MaximumSize = New Size(Me.Width, Me.Height)
End Sub
#Region "Handlers"
Private Sub InjectClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Click
If sender.Equals(InjectButton) Then
If ProcessTextbox.Text <> "" Then
Dim TargetProcess As Process() = Process.GetProcessesByName(ProcessTextbox.Text)
If TargetProcess.Length = 0 Then
MsgBox(ProcessTextbox.Text & " : Not Found...")
Else
Dim ProcID As Integer = Process.GetProcessesByName(ProcessTextbox.Text)(0).Id
For Each inj As KeyValuePair(Of String, String) In dlls
Inject(ProcID, inj.Value)
Next
End If
End If
End If
End Sub
Private Sub BrowseClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyClass.Click
If sender.Equals(BrowseButton) Then
Dim result As DialogResult = DLLDialog.ShowDialog()
If result = Windows.Forms.DialogResult.OK Then
Dim FileName As String
FileName = DLLDialog.FileName.Substring(DLLDialog.FileName.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.DLLListbox.Items.Add(DllFileName)
dlls.Add(DllFileName, DLLDialog.FileName)
MsgBox("Adding : " & FileName)
End If
End If
End Sub
Private Sub ClearClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyClass.Click
If sender.Equals(ClearButton) Then
DLLListbox.Items.Clear()
dlls.Clear()
End If
End Sub
Private Sub RemoveClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyClass.Click
If sender.Equals(RemoveButton) Then
If DLLListbo*****lectedIndex >= 0 Then
DLLDialog.Reset()
dlls.Remove(DLLListbo*****lectedItem)
For i As Integer = (DLLListbo*****lectedItems.Count - 1) To 0 Step -1
DLLListbox.Items.Remove(DLLListbo*****lectedItems(i))
Next
End If
End If
End Sub
#End Region
End Class
so if you use it don't add me to credits which i'm sure u wont use it lolPS : I added auto inject... but cause the timer was a new form timer i needed a shared sub... so it ended up getting so crappy that i decided not to add it....
Credits :
@MAMO007
@lucasheer715

![=]](/forum/images/emotions/=].gif)
