Firstly, is the user loading the .dll's into a listbox in the injector? Please post more info?
Hey ;D
I got my own Injector and I wanna add a Save/Load function that will use a ini file.
I got already a code but I need help to save the dll path and use it again...
Heres my code:
INI.wertlesen = read ini files.Code:Private Sub Button6_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Dim INI As New INIDatei, i As Integer INI.Pfad = My.Application******.DirectoryPath & "\savedlls.ini" For i = 1 To Dlls.Items.Count INI.WertSchreiben("Files", "Number of Files", Dlls.Items.Count) INI.WertSchreiben("Files", CStr(i), Dlls.tostring) Next i End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Dim INI As New INIDatei, max As Integer, i As Integer INI.Pfad = My.Application******.DirectoryPath & "\savedlls.ini" max = CInt(INI.WertLesen("Files", "Number of Files")) For i = 1 To max Dlls.Items.Add(INI.WertLesen("Files", CStr(i))) Next i End Sub
INI.wertschreiben = write into ini files.
INI.pfad = the place where the ini will be loaded or created
I need help at the part of dll.tostring I get this message in the ini file:
But I used 2 different dlls.Code:[Files] Number of Files=2 1=System.Windows.Forms.ListBox, Items.Count: 2, Items[0]: Mpgh CrossFire.dll 2=System.Windows.Forms.ListBox, Items.Count: 2, Items[0]: Mpgh CrossFire.dll
It can only save this and not the path...
Can someone help me ?
Scan:
Virustotal. MD5: 42bd80d5fd2049278ea917d09b58e7d4
Last edited by XxDragonSharKxX; 07-01-2010 at 02:49 AM.
Firstly, is the user loading the .dll's into a listbox in the injector? Please post more info?
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
ok I upload the full project so you can see ;D wait a sec
Last edited by Jason; 07-01-2010 at 01:55 AM.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Sorry I'm german and good in English but not perfect xDD Just download it if you wanna have more information in the whole thing *please*
Here's the Injector:
https://www.mpgh.net/forum/290-crossf...stream-v*****ml
The Save and Load feature is only in my Project because I need help at it ^^
I try to answer you eh:
The user browse it and it will be added to the listbox. There is only shown the name. And my new function have to save it and load it later ^^
Okay I got this.
Add this to your "Browse" button.
[php]
Dim ofd As New OpenFileDialog
ofd.Title = "Browse for your .dlls..."
ofd.RestoreDirectory = True
ofd.Filter = ".DLL files (*.dll)|*.dll"
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim raw As String = ofd.FileName
Dim mod1 As String = raw.Replace(".dll", "")
Dim q1 As Integer = mod1.LastIndexOf("\") + 1
Dim final As String = mod1.Substring(q1)
ListBox1.Items.Add(final)
SaveSetting("InjectorDLLs", "Dlls", final, ofd.FileName)
End If
[/php]
This will add your .dll to the listbox, and save the path.
Now to inject you need the path of the .dll, so declare this at the top of the form just underneath "Public Class Form1"
[php]
dim dllLoc as String
[/php]
And add this to your "ListBox1_SelectedIndexChanged" sub
[php]
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
dllLoc = GetSetting("InjectorDLLs", "Dlls", ListBox1.SelectedItem)
End Sub
[/php]
This will give you the path of the selected .dll.
NOW, saving all this to a .ini
first declare this underneath "Public Class Form1"
[php]
dim path as string = (Application.StartupPath & "\SavedDlls.ini")
[/php]
THEN
add this sub to your project
[php]
Private Sub SaveList()
Using sWrite As New IO.StreamWriter(path)
For Each p As String In ListBox1.Items
sWrite.WriteLine(p)
Next
End Using
End Sub
[/php]
That will save all your listbox items.
Now this sub to load them
[php]
Private Sub LoadList()
Using sRead As New IO.StreamReader(path)
Do
Dim lbDLL As String = sRead.ReadLine()
If IsNothing(lbDLL) Then Exit Do
ListBox1.Items.Add(lbDLL)
Loop
End Using
End Sub
[/php]
This will add all your items back to the listbox.
so whenever you need to save the list simply type
[php]
SaveList()
[/php]
and whenever you need to load the list
[php]
LoadList()
[/php]
And that's it.
Problems, just ask.
Last edited by Jason; 07-01-2010 at 02:20 AM.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
XxDragonSharKxX (07-01-2010)
testing right now ;D thank you for you help, Ill pm you if I got problems thannnkkk you
IT WORKS THANK YA D
But where the ini gets saved :O ? ^^
Last edited by XxDragonSharKxX; 07-01-2010 at 02:26 AM.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
XxDragonSharKxX (07-01-2010)
working yay No problem *.*
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)