Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > S4 League > S4 League Hacks, Bots, Cheats & Exploits
You last visited: Today at 05:21

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Source Code] Simple Injector Source Code ...

Discussion on [Source Code] Simple Injector Source Code ... within the S4 League Hacks, Bots, Cheats & Exploits forum part of the S4 League category.

Closed Thread
 
Old   #1
 
a.m.a.s's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 173
Received Thanks: 347
Arrow [Source Code] Simple Injector Source Code ...

Hi there

today i have found some source code for a simple injector and i want to share it with you
translated to English ( I know It's nothing , but i want to do something )

Code here

Code:
#RequireAdmin
#include <GUIConstants.au3>

GUICreate("Injector", 275, 100)
GUISetBkColor(0xFFFFFF)
GUICtrlCreateLabel("Process:", 10, 10, 50, 17)
$I_ProcessName = GUICtrlCreateInput("", 65, 10, 200, 21)
GUICtrlCreateLabel("DLL:", 10, 40, 50, 17)
$I_DllPath = GUICtrlCreateInput("", 65, 40, 150, 21)
$B_SearchDll = GUICtrlCreateButton("...", 225, 40, 40, 25)
$R_Auto = GUICtrlCreateRadio("Auto Inject", 10, 75, 75, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$R_Man = GUICtrlCreateRadio("Manual", 130, 75, 55, 17)
$B_Inject = GUICtrlCreateButton("Inject", 190, 70, 75, 25)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()

$Injected = False

Do
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $B_SearchDll
            GUICtrlSetData($I_DllPath, FileOpenDialog("Dll", @HomeDrive, "Dynamic Link Library (*.dll)", 3))
        Case $R_Auto
            GUICtrlSetState($B_Inject, $GUI_DISABLE)
        Case $R_Man
            GUICtrlSetState($B_Inject, $GUI_ENABLE)
        Case $B_Inject
            _InjectDll(ProcessExists(GUICtrlRead($I_ProcessName)), GUICtrlRead($I_DllPath))
            _Message(@error)
    EndSwitch

    If 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 = True
            ;Exit
        EndIf
    EndIf

    Sleep(10)
Until $Msg == $GUI_EVENT_CLOSE



Func _Message($ErrorCode)
    If $ErrorCode <> 0 Then
        MsgBox(48, "Error", "There was an error!" & @CRLF & "Fehlercode: " & @error)
    Else
        MsgBox(64, "Info", "Injection successfully!")
    EndIf
EndFunc


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
!!PLEASE DON'T RE-RELEASE IT IF YOU MADE SOMETHING USELESS!!

a.m.a.s is offline  
Thanks
4 Users
Old 06/05/2013, 19:40   #2
 
darkdoki2's Avatar
 
elite*gold: 0
Join Date: Nov 2012
Posts: 46
Received Thanks: 3
Wow very nice man thanks, can you put an auto close on inject on the code?
darkdoki2 is offline  
Old 06/05/2013, 19:41   #3
 
yuser's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 494
Received Thanks: 484
Wrong Section. Please Close And Re-Open The Thread In AutoIt Section.
yuser is offline  
Old 06/05/2013, 20:20   #4
 
~BlackLine~'s Avatar
 
elite*gold: 0
Join Date: Feb 2013
Posts: 568
Received Thanks: 252
Nice leech man...
~BlackLine~ is offline  
Thanks
1 User
Old 06/05/2013, 20:29   #5
 
elite*gold: 5
Join Date: Dec 2011
Posts: 3,930
Received Thanks: 1,918
schön und gut.
Aber was hat es mit S4 zutun?
Ruffу is offline  
Old 06/05/2013, 20:58   #6
 
a.m.a.s's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 173
Received Thanks: 347
Quote:
Originally Posted by ~BlackLine~ View Post
Nice leech man...
hey don't be that stupid!
i said i have found it on the internet
read before posting .
a.m.a.s is offline  
Thanks
1 User
Old 06/05/2013, 23:20   #7
 
elite*gold: 0
Join Date: Apr 2013
Posts: 528
Received Thanks: 522
BlackLine Do you have a prove? xD
►♪The*Smuggler♫◄ is offline  
Old 06/05/2013, 23:22   #8
 
Der-Eddy's Avatar
 
elite*gold: 400
Join Date: Nov 2008
Posts: 67,909
Received Thanks: 19,503
absolutely useless if you don't explain the code
there are enough Injectors, no need of more with the same code
Der-Eddy is offline  
Thanks
4 Users
Closed Thread


Similar Threads Similar Threads
dll injector source code?
08/13/2011 - Soldier Front - 7 Replies
I'm just downloaded VB 2010 and I'm willing to make injector for special force.. Do you guys know where I can find .dll injector source code? :):)
[C++ Source]Code Injector
03/28/2010 - Coding Releases - 3 Replies
hier habt ihr dann mal den source von meiner injection methode! sie kann eine funktion in den mainthread eines prozesse injizieren, und ausführen (gut geeignet um eine dll zu laden). hier habt ihr den code (geschnitten): __declspec(naked) void injStub() { __asm { push 0xDEADBEEF pushfd pushad
Source code gesucht >Injector<
01/23/2010 - WarRock - 3 Replies
hi ich suche einen source code für einen warrock injector :D er sollte bei den folgenden betriebssystemen funzen: Vista 64 bit und 32 bit Win 7 64 bit und 32 bit XP 64 bit und 32 bit PLS Postet rein wenn ihr den code habt.



All times are GMT +2. The time now is 05:21.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.