RealGamehack
RealGamehack
RealGamehack
Would you like to react to this message? Create an account in a few clicks or log in to continue.


RealGameHack!
 
HomeGeneralSearchLatest imagesRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» SF PH wallhack and exp hack
 [Source Code] Simple Injector Source Code ... Icon_minitimeThu Jan 12, 2017 1:49 pm by metadeliz@yahoo.com

» Global announcement:
 [Source Code] Simple Injector Source Code ... Icon_minitimeSat Jun 04, 2016 1:12 pm by NONESTOP

» Soldier Front Client (DownLoad)
 [Source Code] Simple Injector Source Code ... Icon_minitimeWed Jul 22, 2015 4:12 am by jhong_10

» Black Shot XorrRapidFire
 [Source Code] Simple Injector Source Code ... Icon_minitimeWed Jul 22, 2015 4:06 am by jhong_10

» [Release]PHO Private Wallhack
 [Source Code] Simple Injector Source Code ... Icon_minitimeSun Mar 01, 2015 11:51 am by tianloria

» Elsword Hack
 [Source Code] Simple Injector Source Code ... Icon_minitimeTue Feb 24, 2015 7:10 am by jeneses

» New Cheat Release Wallhack +xp sp Hack November 6 2013 Release Is Now Working!@@@@@@
 [Source Code] Simple Injector Source Code ... Icon_minitimeFri Oct 10, 2014 10:59 am by khit

» HOW TO USE CHEAT!
 [Source Code] Simple Injector Source Code ... Icon_minitimeMon Sep 15, 2014 5:12 am by ahriman

» SFDFI Free Public VIP v23 1 Hit Kill Auto Glitch
 [Source Code] Simple Injector Source Code ... Icon_minitimeThu Dec 26, 2013 2:42 am by rhaikien28

Top posters
[-LNL-J-Hero-23-^_^]
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
NONESTOP
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
rderamos65
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
melvinpogi123
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
robin_03
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
russel72
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
jeneses
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
reymar123
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
vincent23
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
ahriman
 [Source Code] Simple Injector Source Code ... Vote_lcap [Source Code] Simple Injector Source Code ... Voting_bar [Source Code] Simple Injector Source Code ... Vote_rcap 
May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendarCalendar

 

  [Source Code] Simple Injector Source Code ...

Go down 
AuthorMessage
NONESTOP
Admin
Admin
NONESTOP


Posts : 55
Credits : 85350
Reputation : 51
Join date : 14/11/2013
Age : 27
Location : maulawinst

 [Source Code] Simple Injector Source Code ... Empty
PostSubject: [Source Code] Simple Injector Source Code ...    [Source Code] Simple Injector Source Code ... Icon_minitimeThu Dec 05, 2013 6:20 am

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:
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!!
Back to top Go down
 
[Source Code] Simple Injector Source Code ...
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
RealGamehack :: D3D Coding(s)-
Jump to: