[Help] Code for ListBox

Posts 1–6 of 6 · Page 1 of 1
[Help] Code for ListBox
Hi I'm currently making an Injector.
I was wondering if anyone could help me out with the code for Importing .dll into the listbox
Here ya go
(Don't C+P, make it your own)

To Load Items
Code:
Dim open As New OpenFileDialog
        open.Multiselect = True
        open.Filter = "DLL Files(*.dll) |*.dll"
        open.CheckFileExists = True
        open.ShowDialog()

        If (open.FileName = "") Then
        Else
            For Each item As String In open.FileNames
                Dim listItem As New ListViewItem
                listItem.Text = item
                Dim subItem As New ListViewItem.ListViewSubItem()
                subItem.Text = My.Computer.FileSystem.GetName(item)
                listItem.SubItems.Add(subItem)
                ListView1.Items.Add(listItem)
            Next
        End If

To Delete Items
Code:
        For Each lrow As ListViewItem In ListView1.SelectedItems
            ListView1.Items.Remove(lrow)
        Next
To Inject The Current Items
Code:
Private Sub Inject()
        Try
            For Each lrow As ListViewItem In ListView1.Items
                Timer1.Stop()
                Dim TargetProcess As Process() = Process.GetProcessesByName(ComboBox1.Text) 'Change to your .exe
                TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
                pszLibFileRemote = lrow.Text
                pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
                TargetBufferSize = 1 + Len(pszLibFileRemote)
                Dim Rtn As Integer
                Dim LoadLibParamAdr As Integer
                LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
                Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
                CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
                CloseHandle(TargetProcessHandle)
                Success(1)
                Me.Close()
            Next
        Catch es As Exception
            Success(2)
            Me.Close()
        End Try

Credits to.... Someone


Hope this helps
oh nice |-|3|_][({}PT3R12 ty
Gah. I got your code and edited it a bit, but no luck. Look I'll post a screenie.



See?
Everytime i try to inject, it comes up with an error that i put in. Uhm, Shall i put in the whole code? I'm not sure how to pm. You got MSN heli?

Heli HELP PLEASE lol
VB section is there for a reason.

And don't double post mang

Moved.
He slightly modified someone else's code, PM me your code, I will fix it for you.

And tell you what the issue was so you know for the future
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us