io.kent Posted February 17, 2014 Report Posted February 17, 2014 #AutoIt3Wrapper_UseUpx=n#AutoIt3Wrapper_UseX64=n#RequireAdminGlobal Const $gui_event_close = -3Global Const $gui_event_minimize = -4Global Const $gui_event_restore = -5Global Const $gui_event_maximize = -6Global Const $gui_event_primarydown = -7Global Const $gui_event_primaryup = -8Global Const $gui_event_secondarydown = -9Global Const $gui_event_secondaryup = -10Global Const $gui_event_mousemove = -11Global Const $gui_event_resized = -12Global Const $gui_event_dropped = -13Global Const $gui_rundefmsg = "GUI_RUNDEFMSG"Global Const $gui_avistop = 0Global Const $gui_avistart = 1Global Const $gui_aviclose = 2Global Const $gui_checked = 1Global Const $gui_indeterminate = 2Global Const $gui_unchecked = 4Global Const $gui_dropaccepted = 8Global Const $gui_nodropaccepted = 4096Global Const $gui_acceptfiles = $gui_dropacceptedGlobal Const $gui_show = 16Global Const $gui_hide = 32Global Const $gui_enable = 64Global Const $gui_disable = 128Global Const $gui_focus = 256Global Const $gui_nofocus = 8192Global Const $gui_defbutton = 512Global Const $gui_expand = 1024Global Const $gui_ontop = 2048Global Const $gui_fontitalic = 2Global Const $gui_fontunder = 4Global Const $gui_fontstrike = 8Global Const $gui_dockauto = 1Global Const $gui_dockleft = 2Global Const $gui_dockright = 4Global Const $gui_dockhcenter = 8Global Const $gui_docktop = 32Global Const $gui_dockbottom = 64Global Const $gui_dockvcenter = 128Global Const $gui_dockwidth = 256Global Const $gui_dockheight = 512Global Const $gui_docksize = 768Global Const $gui_dockmenubar = 544Global Const $gui_dockstatebar = 576Global Const $gui_dockall = 802Global Const $gui_dockborders = 102Global Const $gui_gr_close = 1Global Const $gui_gr_line = 2Global Const $gui_gr_bezier = 4Global Const $gui_gr_move = 6Global Const $gui_gr_color = 8Global Const $gui_gr_rect = 10Global Const $gui_gr_ellipse = 12Global Const $gui_gr_pie = 14Global Const $gui_gr_dot = 16Global Const $gui_gr_pixel = 18Global Const $gui_gr_hint = 20Global Const $gui_gr_refresh = 22Global Const $gui_gr_pensize = 24Global Const $gui_gr_nobkcolor = -2Global Const $gui_bkcolor_default = -1Global Const $gui_bkcolor_transparent = -2Global Const $gui_bkcolor_lv_alternate = -33554432Global Const $gui_ws_ex_parentdrag = 1048576If FileExists("hack.ini") ThenElseMsgBox(16, "Dll Injector", "hack.ini Bulunamadi Lütfen Dizine Ekleyiniz", 5)ExitEndIf$InjectEdilecekExeTitle = IniRead("hack.ini", "dll", "Procces", "default")$dllyeri = IniRead("hack.ini", "halo", "Dll", "default")GUICreate("Dll Injector", 275, 100)GUISetBkColor(16777215)GUICtrlCreateLabel("KO.exe:", 10, 10, 50, 17)$i_processname = GUICtrlCreateInput($InjectEdilecekExeTitle, 65, 10, 200, 21)GUICtrlCreateLabel("DLL:", 10, 40, 50, 17)$i_dllpath = GUICtrlCreateInput($dllyeri, 65, 40, 150, 21)$b_searchdll = GUICtrlCreateButton("...", 225, 40, 40, 25)$r_auto = GUICtrlCreateRadio("Otomatik", 10, 75, 75, 17)GUICtrlSetState(-1, $gui_checked)$r_man = GUICtrlCreateRadio("Elle", 130, 75, 55, 17)$b_inject = GUICtrlCreateButton("Injectle", 190, 70, 75, 25)GUICtrlSetState(-1, $gui_disable)GUISetState()$injected = FalseDo$msg = GUIGetMsg()Switch $msgCase $b_searchdllGUICtrlSetData($i_dllpath, FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))Case $r_autoGUICtrlSetState($b_inject, $gui_disable)Case $r_manGUICtrlSetState($b_inject, $gui_enable)Case $b_inject_injectdll(ProcessExists(GUICtrlRead($i_processname)), GUICtrlRead($i_dllpath))_message(@error)EndSwitchIf BitAND(GUICtrlRead($r_auto), $gui_checked) AND NOT $injected Then$processid = ProcessExists(GUICtrlRead($i_processname))If $processid > 0 Then_injectdll($processid, GUICtrlRead($i_dllpath))_message(@error)$injected = TrueEndIfEndIfSleep(10)Until $msg == $gui_event_closeFunc _message($errorcode)If $errorcode <> 0 ThenMsgBox(16, "Dll Injector", "Fatal Error" & @CRLF & "Hata Kodu: " & @error)ElseMsgBox(64, "TEST", "Inject Succesfull", 3)If WinWaitActive("Knight OnLine Client", "") ThenSleep(100)WinSetState("Direnish.net", "", @SW_HIDE)EndIfExitEndIfEndFuncFunc _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", 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_path), "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_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)EndFuncExit Quote