Heyya, i need an dll injection udf which works on 32 bits. I have Killer's udf but it's not working for 32 bits :c
Can anyone help me? Thanks :p
Can anyone help me? Thanks :p
#AutoIt3Wrapper_Compression=0 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2
#AutoIt3Wrapper_UseUpx=n
;
#include "_UskinLibrary.au3"
#include "Descent.au3"; <-- This is an skin ".msstyles" embedded
_Uskin_LoadDLL()
_USkin_Init(_Descent(True)); <-- Put here your favorite Skin!!!
#RequireAdmin
Global Const $gui_event_close = -3
Global Const $gui_event_minimize = -4
Global Const $gui_event_restore = -5
Global Const $gui_event_maximize = -6
Global Const $gui_event_primarydown = -7
Global Const $gui_event_primaryup = -8
Global Const $gui_event_secondarydown = -9
Global Const $gui_event_secondaryup = -10
Global Const $gui_event_mousemove = -11
Global Const $gui_event_resized = -12
Global Const $gui_event_dropped = -13
Global Const $gui_rundefmsg = "GUI_RUNDEFMSG"
Global Const $gui_avistop = 0
Global Const $gui_avistart = 1
Global Const $gui_aviclose = 2
Global Const $gui_checked = 1
Global Const $gui_indeterminate = 2
Global Const $gui_unchecked = 4
Global Const $gui_dropaccepted = 8
Global Const $gui_nodropaccepted = 4096
Global Const $gui_acceptfiles = $gui_dropaccepted
Global Const $gui_show = 16
Global Const $gui_hide = 32
Global Const $gui_enable = 64
Global Const $gui_disable = 128
Global Const $gui_focus = 256
Global Const $gui_nofocus = 8192
Global Const $gui_defbutton = 512
Global Const $gui_expand = 1024
Global Const $gui_ontop = 2048
Global Const $gui_fontitalic = 2
Global Const $gui_fontunder = 4
Global Const $gui_fontstrike = 8
Global Const $gui_dockauto = 1
Global Const $gui_dockleft = 2
Global Const $gui_dockright = 4
Global Const $gui_dockhcenter = 8
Global Const $gui_docktop = 32
Global Const $gui_dockbottom = 64
Global Const $gui_dockvcenter = 128
Global Const $gui_dockwidth = 256
Global Const $gui_dockheight = 512
Global Const $gui_docksize = 768
Global Const $gui_dockmenubar = 544
Global Const $gui_dockstatebar = 576
Global Const $gui_dockall = 802
Global Const $gui_dockborders = 102
Global Const $gui_gr_close = 1
Global Const $gui_gr_line = 2
Global Const $gui_gr_bezier = 4
Global Const $gui_gr_move = 6
Global Const $gui_gr_color = 8
Global Const $gui_gr_rect = 10
Global Const $gui_gr_ellipse = 12
Global Const $gui_gr_pie = 14
Global Const $gui_gr_dot = 16
Global Const $gui_gr_pixel = 18
Global Const $gui_gr_hint = 20
Global Const $gui_gr_refresh = 22
Global Const $gui_gr_pensize = 24
Global Const $gui_gr_nobkcolor = -2
Global Const $gui_bkcolor_default = -1
Global Const $gui_bkcolor_transparent = -2
Global Const $gui_bkcolor_lv_alternate = -33554432
Global Const $gui_ws_ex_parentdrag = 1048576
If FileExists("Log.ini") Then
Else
MsgBox(16, "That Shit Man!", "No Log No Launch No Fun Sorry >.>", 5)
Exit
EndIf
$InjectEdilecekExeTitle = IniWrite("Log.ini", "dll", "", "Processname")
$dllyeri = IniWrite("Log.ini", " DLl Injector", "Dll", "default")
GUICreate("Dll Injector V1.3.6", 276, 383, 473, 207)
GUICtrlCreateLabel("Process name:", 24, 8, 74, 17)
$i_processname = GUICtrlCreateInput($InjectEdilecekExeTitle, 16, 24, 121, 21)
$i_dllpath1 = GUICtrlCreateInput($dllyeri, 120, 72, 121, 21)
$i_dllpath2 = GUICtrlCreateInput($dllyeri, 120, 104, 121, 21)
$i_dllpath3 = GUICtrlCreateInput($dllyeri, 120, 136, 121, 21)
$i_dllpath4 = GUICtrlCreateInput($dllyeri, 120, 168, 121, 21)
$i_dllpath5 = GUICtrlCreateInput($dllyeri, 120, 200, 121, 21)
$i_dllpath6 = GUICtrlCreateInput($dllyeri, 120, 232, 121, 21)
$Label2 = GUICtrlCreateLabel("Proc number:", 144, 8, 67, 17)
$Input2 = GUICtrlCreateInput("", 216, 8, 49, 21)
$Group1 = GUICtrlCreateGroup("DLL", 24, 56, 241, 209)
$b_searchdll1 = GUICtrlCreateButton("...", 40, 72, 75, 25)
$b_searchdll2 = GUICtrlCreateButton("...", 40, 104, 75, 25)
$b_searchdll3 = GUICtrlCreateButton("...", 40, 136, 75, 25)
$b_searchdll4 = GUICtrlCreateButton("...", 40, 168, 75, 25)
$b_searchdll5 = GUICtrlCreateButton("...", 40, 232, 75, 25)
$b_searchdll6 = GUICtrlCreateButton("...", 40, 200, 75, 25)
$b_searchdll7 = GUICtrlCreateButton("...", 40, 232, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$r_auto = GUICtrlCreateRadio("Automatic", 40, 288, 113, 17)
$r_man = GUICtrlCreateRadio("Manual", 152, 288, 113, 17)
$b_inject = GUICtrlCreateButton("Injecte", 88, 312, 75, 25)
$Group2 = GUICtrlCreateGroup("Injection", 24, 264, 241, 81)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlSetState(-1, $gui_disable)
GUISetState()
$injected = False
Do
$msg = GUIGetMsg()
Switch $msg
Case $b_searchdll1
GUICtrlSetData($i_dllpath1 ,FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))
Case $b_searchdll2
GUICtrlSetData($i_dllpath2 ,FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))
Case $b_searchdll3
GUICtrlSetData($i_dllpath3 ,FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))
Case $b_searchdll4
GUICtrlSetData($i_dllpath4 ,FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))
Case $b_searchdll5
GUICtrlSetData($i_dllpath5 ,FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))
Case $b_searchdll6
GUICtrlSetData($i_dllpath6 ,FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))
Case $r_man
GUICtrlSetState($b_inject, $gui_enable)
Case $b_inject
_injectdll1(ProcessExists(GUICtrlRead($i_processname)), GUICtrlRead($i_dllpath1))
_injectdll2(ProcessExists(GUICtrlRead($i_processname)), GUICtrlRead($i_dllpath2))
_injectdll3(ProcessExists(GUICtrlRead($i_processname)), GUICtrlRead($i_dllpath3))
_injectdll4(ProcessExists(GUICtrlRead($i_processname)), GUICtrlRead($i_dllpath4))
_injectdll5(ProcessExists(GUICtrlRead($i_processname)), GUICtrlRead($i_dllpath5))
_injectdll6(ProcessExists(GUICtrlRead($i_processname)), GUICtrlRead($i_dllpath6))
_message(@error)
EndSwitch
If BitAND(GUICtrlRead($r_auto), $gui_checked) AND NOT $injected Then
$processid = ProcessExists(GUICtrlRead($i_processname))
If $processid > 0 Then
_injectdll1($processid, GUICtrlRead($i_dllpath1))
_injectdll2($processid, GUICtrlRead($i_dllpath2))
_injectdll3($processid, GUICtrlRead($i_dllpath3))
_injectdll4($processid, GUICtrlRead($i_dllpath4))
_injectdll5($processid, GUICtrlRead($i_dllpath5))
_injectdll6($processid, GUICtrlRead($i_dllpath6))
_message(@error)
$injected = True
EndIf
EndIf
Sleep(10)
Until $msg == $gui_event_close
Func _message($errorcode)
If $errorcode <> 0 Then
MsgBox(16, "FAIL", "Fatal Error" & @CRLF & "Hata Kodu: " & @error)
Else
MsgBox(64, "Succes", "Inject Succesfull", 3)
If WinWaitActive("Zouba Best ", "") Then
Sleep(100)
WinSetState("Direnish.net", "", @SW_HIDE)
EndIf
Exit
EndIf
EndFunc
Func _injectdll1($processid, $dllpath1)
If $processid == 0 Then Return SetError(1, "", False)
If NOT (FileExists($dllpath1)) Then Return SetError(2, "", False)
If NOT (StringRight($dllpath1, 4) == ".dll") Then Return SetError(3, "", False)
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(4, "", False)
$dll_path1 = DllStructCreate("char[255]")
DllCall($kernel32, "DWORD", "GetFullPathNameA", "str", $dllpath1, "DWORD", 255, "ptr", DllStructGetPtr($dll_path1), "int", 0)
If @error Then Return SetError(5, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 2035711, "int", 0, "DWORD", $processid)
If @error Then Return SetError(6, "", False)
$hmodule = DllCall($kernel32, "DWORD", "GetModuleHandleA", "str", "kernel32.dll")
If @error Then Return SetError(7, "", False)
$lpstartaddress = DllCall($kernel32, "DWORD", "GetProcAddress", "DWORD", $hmodule[0], "str", "LoadLibraryA")
If @error Then Return SetError(8, "", False)
$lpparameter = DllCall($kernel32, "DWORD", "VirtualAllocEx", "int", $hprocess[0], "int", 0, "ULONG_PTR", DllStructGetSize($dll_path1), "DWORD", 12288, "int", 4)
If @error Then Return SetError(9, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $lpparameter[0], "str", DllStructGetData($dll_path1, 1), "ULONG_PTR", DllStructGetSize($dll_path1), "int", 0)
If @error Then Return SetError(10, "", False)
$hthread = DllCall($kernel32, "int", "CreateRemoteThread", "DWORD", $hprocess[0], "int", 0, "int", 0, "DWORD", $lpstartaddress[0], "DWORD", $lpparameter[0], "int", 0, "int", 0)
If @error Then Return SetError(11, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
DllClose($kernel32)
Return SetError(0, "", True)
EndFunc
Exit
Func _injectdll2($processid, $dllpath2)
If $processid == 0 Then Return SetError(1, "", False)
If NOT (FileExists($dllpath2)) Then Return SetError(2, "", False)
If NOT (StringRight($dllpath2, 4) == ".dll") Then Return SetError(3, "", False)
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(4, "", False)
$dll_path2 = DllStructCreate("char[255]")
DllCall($kernel32, "DWORD", "GetFullPathNameA", "str", $dllpath2, "DWORD", 255, "ptr", DllStructGetPtr($dll_path2), "int", 0)
If @error Then Return SetError(5, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 2035711, "int", 0, "DWORD", $processid)
If @error Then Return SetError(6, "", False)
$hmodule = DllCall($kernel32, "DWORD", "GetModuleHandleA", "str", "kernel32.dll")
If @error Then Return SetError(7, "", False)
$lpstartaddress = DllCall($kernel32, "DWORD", "GetProcAddress", "DWORD", $hmodule[0], "str", "LoadLibraryA")
If @error Then Return SetError(8, "", False)
$lpparameter = DllCall($kernel32, "DWORD", "VirtualAllocEx", "int", $hprocess[0], "int", 0, "ULONG_PTR", DllStructGetSize($dll_path2), "DWORD", 12288, "int", 4)
If @error Then Return SetError(9, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $lpparameter[0], "str", DllStructGetData($dll_path2, 1), "ULONG_PTR", DllStructGetSize($dll_path2), "int", 0)
If @error Then Return SetError(10, "", False)
$hthread = DllCall($kernel32, "int", "CreateRemoteThread", "DWORD", $hprocess[0], "int", 0, "int", 0, "DWORD", $lpstartaddress[0], "DWORD", $lpparameter[0], "int", 0, "int", 0)
If @error Then Return SetError(11, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
DllClose($kernel32)
Return SetError(0, "", True)
EndFunc
Exit
Func _injectdll3($processid, $dllpath3)
If $processid == 0 Then Return SetError(1, "", False)
If NOT (FileExists($dllpath3)) Then Return SetError(2, "", False)
If NOT (StringRight($dllpath3, 4) == ".dll") Then Return SetError(3, "", False)
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(4, "", False)
$dll_path3 = DllStructCreate("char[255]")
DllCall($kernel32, "DWORD", "GetFullPathNameA", "str", $dllpath3, "DWORD", 255, "ptr", DllStructGetPtr($dll_path3), "int", 0)
If @error Then Return SetError(5, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 2035711, "int", 0, "DWORD", $processid)
If @error Then Return SetError(6, "", False)
$hmodule = DllCall($kernel32, "DWORD", "GetModuleHandleA", "str", "kernel32.dll")
If @error Then Return SetError(7, "", False)
$lpstartaddress = DllCall($kernel32, "DWORD", "GetProcAddress", "DWORD", $hmodule[0], "str", "LoadLibraryA")
If @error Then Return SetError(8, "", False)
$lpparameter = DllCall($kernel32, "DWORD", "VirtualAllocEx", "int", $hprocess[0], "int", 0, "ULONG_PTR", DllStructGetSize($dll_path3), "DWORD", 12288, "int", 4)
If @error Then Return SetError(9, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $lpparameter[0], "str", DllStructGetData($dll_path3, 1), "ULONG_PTR", DllStructGetSize($dll_path3), "int", 0)
If @error Then Return SetError(10, "", False)
$hthread = DllCall($kernel32, "int", "CreateRemoteThread", "DWORD", $hprocess[0], "int", 0, "int", 0, "DWORD", $lpstartaddress[0], "DWORD", $lpparameter[0], "int", 0, "int", 0)
If @error Then Return SetError(11, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
DllClose($kernel32)
Return SetError(0, "", True)
EndFunc
Exit
Func _injectdll4($processid, $dllpath4)
If $processid == 0 Then Return SetError(1, "", False)
If NOT (FileExists($dllpath4)) Then Return SetError(2, "", False)
If NOT (StringRight($dllpath4, 4) == ".dll") Then Return SetError(3, "", False)
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(4, "", False)
$dll_path4 = DllStructCreate("char[255]")
DllCall($kernel32, "DWORD", "GetFullPathNameA", "str", $dllpath4, "DWORD", 255, "ptr", DllStructGetPtr($dll_path4), "int", 0)
If @error Then Return SetError(5, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 2035711, "int", 0, "DWORD", $processid)
If @error Then Return SetError(6, "", False)
$hmodule = DllCall($kernel32, "DWORD", "GetModuleHandleA", "str", "kernel32.dll")
If @error Then Return SetError(7, "", False)
$lpstartaddress = DllCall($kernel32, "DWORD", "GetProcAddress", "DWORD", $hmodule[0], "str", "LoadLibraryA")
If @error Then Return SetError(8, "", False)
$lpparameter = DllCall($kernel32, "DWORD", "VirtualAllocEx", "int", $hprocess[0], "int", 0, "ULONG_PTR", DllStructGetSize($dll_path4), "DWORD", 12288, "int", 4)
If @error Then Return SetError(9, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $lpparameter[0], "str", DllStructGetData($dll_path4, 1), "ULONG_PTR", DllStructGetSize($dll_path4), "int", 0)
If @error Then Return SetError(10, "", False)
$hthread = DllCall($kernel32, "int", "CreateRemoteThread", "DWORD", $hprocess[0], "int", 0, "int", 0, "DWORD", $lpstartaddress[0], "DWORD", $lpparameter[0], "int", 0, "int", 0)
If @error Then Return SetError(11, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
DllClose($kernel32)
Return SetError(0, "", True)
EndFunc
Exit
Func _injectdll5($processid, $dllpath5)
If $processid == 0 Then Return SetError(1, "", False)
If NOT (FileExists($dllpath5)) Then Return SetError(2, "", False)
If NOT (StringRight($dllpath5, 4) == ".dll") Then Return SetError(3, "", False)
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(4, "", False)
$dll_path5 = DllStructCreate("char[255]")
DllCall($kernel32, "DWORD", "GetFullPathNameA", "str", $dllpath5, "DWORD", 255, "ptr", DllStructGetPtr($dll_path5), "int", 0)
If @error Then Return SetError(5, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 2035711, "int", 0, "DWORD", $processid)
If @error Then Return SetError(6, "", False)
$hmodule = DllCall($kernel32, "DWORD", "GetModuleHandleA", "str", "kernel32.dll")
If @error Then Return SetError(7, "", False)
$lpstartaddress = DllCall($kernel32, "DWORD", "GetProcAddress", "DWORD", $hmodule[0], "str", "LoadLibraryA")
If @error Then Return SetError(8, "", False)
$lpparameter = DllCall($kernel32, "DWORD", "VirtualAllocEx", "int", $hprocess[0], "int", 0, "ULONG_PTR", DllStructGetSize($dll_path5), "DWORD", 12288, "int", 4)
If @error Then Return SetError(9, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $lpparameter[0], "str", DllStructGetData($dll_path5, 1), "ULONG_PTR", DllStructGetSize($dll_path5), "int", 0)
If @error Then Return SetError(10, "", False)
$hthread = DllCall($kernel32, "int", "CreateRemoteThread", "DWORD", $hprocess[0], "int", 0, "int", 0, "DWORD", $lpstartaddress[0], "DWORD", $lpparameter[0], "int", 0, "int", 0)
If @error Then Return SetError(11, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
DllClose($kernel32)
Return SetError(0, "", True)
EndFunc
Exit
Func _injectdll6($processid, $dllpath6)
If $processid == 0 Then Return SetError(1, "", False)
If NOT (FileExists($dllpath6)) Then Return SetError(2, "", False)
If NOT (StringRight($dllpath6, 4) == ".dll") Then Return SetError(3, "", False)
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(4, "", False)
$dll_path6 = DllStructCreate("char[255]")
DllCall($kernel32, "DWORD", "GetFullPathNameA", "str", $dllpath6, "DWORD", 255, "ptr", DllStructGetPtr($dll_path6), "int", 0)
If @error Then Return SetError(5, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 2035711, "int", 0, "DWORD", $processid)
If @error Then Return SetError(6, "", False)
$hmodule = DllCall($kernel32, "DWORD", "GetModuleHandleA", "str", "kernel32.dll")
If @error Then Return SetError(7, "", False)
$lpstartaddress = DllCall($kernel32, "DWORD", "GetProcAddress", "DWORD", $hmodule[0], "str", "LoadLibraryA")
If @error Then Return SetError(8, "", False)
$lpparameter = DllCall($kernel32, "DWORD", "VirtualAllocEx", "int", $hprocess[0], "int", 0, "ULONG_PTR", DllStructGetSize($dll_path6), "DWORD", 12288, "int", 4)
If @error Then Return SetError(9, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $lpparameter[0], "str", DllStructGetData($dll_path6, 1), "ULONG_PTR", DllStructGetSize($dll_path6), "int", 0)
If @error Then Return SetError(10, "", False)
$hthread = DllCall($kernel32, "int", "CreateRemoteThread", "DWORD", $hprocess[0], "int", 0, "int", 0, "DWORD", $lpstartaddress[0], "DWORD", $lpparameter[0], "int", 0, "int", 0)
If @error Then Return SetError(11, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
DllClose($kernel32)
Return SetError(0, "", True)
EndFunc
Exit
Func _InjectDll($ProcessId, $DllPath)
If $ProcessId == 0 Then Return SetError(1, "", False)
If Not(FileExists($DllPath)) Then Return SetError(2, "", False)
If Not(StringRight($DllPath, 4) == ".dll") Then Return SetError(3, "", False)
$Kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(4, "", False)
$DLL_Path = DllStructCreate("char[255]")
DllCall($Kernel32, "DWORD", "GetFullPathNameA", "str", $DllPath, "DWORD", 255, "ptr", DllStructGetPtr($DLL_Path), "int", 0)
If @error Then Return SetError(5, "", False)
$hProcess = DllCall($Kernel32, "DWORD", "OpenProcess", "DWORD", 0x1F0FFF, "int", 0, "DWORD", $ProcessId)
If @error Then Return SetError(6, "", False)
$hModule = DllCall($Kernel32, "DWORD", "GetModuleHandleA", "str", "kernel32.dll")
If @error Then Return SetError(7, "", False)
$lpStartAddress = DllCall($Kernel32, "DWORD", "GetProcAddress", "DWORD", $hModule[0], "str", "LoadLibraryA")
If @error Then Return SetError(8, "", False)
$lpParameter = DllCall($Kernel32, "DWORD", "VirtualAllocEx", "int", $hProcess[0], "int", 0, "ULONG_PTR", DllStructGetSize($DLL_Path), "DWORD", 0x3000, "int", 4)
If @error Then Return SetError(9, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hProcess[0], "DWORD", $lpParameter[0], "str", DllStructGetData($DLL_Path, 1), "ULONG_PTR", DllStructGetSize($DLL_Path), "int", 0)
If @error Then Return SetError(10, "", False)
$hThread = DllCall($Kernel32, "int", "CreateRemoteThread", "DWORD", $hProcess[0], "int", 0, "int", 0, "DWORD", $lpStartAddress[0], "DWORD", $lpParameter[0], "int", 0, "int", 0)
If @error Then Return SetError(11, "", False)
DllCall($Kernel32, "BOOL", "CloseHandle", "DWORD", $hProcess[0])
DllClose($Kernel32)
Return SetError(0, "", True)
EndFunc