Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- #RequireAdmin
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #include <EditConstants.au3>
- #include <GUIListView.au3>
- #include <StaticConstants.au3>
- #include <String.au3>
- #include <Process.au3>
- #include <ColorConstants.au3>
- #include <File.au3>
- $Width = 800
- $Height = 425
- $b_HoverBanner = False
- $LastDirectory = @DesktopDir
- $Processname = "Broihon.exe"
- $PID = 0
- $Delay = 0
- $WindowTitle = "Guided Hacking - Injector"
- $ConfigPath = @TempDir & "\GH Injector Config.ini"
- $BannerPath = "GH Banner.jpg"
- $Version = "1.1"
- $h_GUI = GUICreate($WindowTitle, $Width, $Height, 100, 100)
- GUISetIcon("GH Icon.ico")
- $h_P_Banner = GUICtrlCreatePic($BannerPath, 0, 0, $Width, 66)
- GUICtrlSetCursor($h_P_Banner, 0)
- $h_G_Settings = GUICtrlCreateGroup("Settings", 10, 80, $Width / 3 - 15, $Height - 95, $SS_SUNKEN)
- GUICtrlSetFont(-1, 11, 700)
- $h_L_ProcName = GUICtrlCreateLabel("Process:", 20, 105, 75, 20)
- $h_I_ProcName = GUICtrlCreateInput($Processname, 65, 102, $Width / 3 - 100, 20)
- $h_L_PID = GUICtrlCreateLabel("PID:", 20, 135, 75, 20)
- $h_I_PID = GUICtrlCreateInput($PID, 65, 132, $Width / 3 - 100, 20, $ES_NUMBER)
- GUICtrlSetState(-1, $GUI_DISABLE)
- GUIStartGroup()
- $h_R_ProcName = GUICtrlCreateRadio("", $Width / 3 - 25, 102, 15, 20)
- GUICtrlSetState(-1, $GUI_CHECKED)
- $h_R_PID = GUICtrlCreateRadio("", $Width / 3 - 25, 132, 15, 20)
- $h_G_InjDelay = GUICtrlCreateLabel("Delay:", 20, 165, 35, 20)
- $h_I_InjDelay = GUICtrlCreateInput($Delay, 65, 162, $Width / 3 - 80, 20, $ES_NUMBER)
- $h_C_CloseAI = GUICtrlCreateCheckbox("Close after injection", 68, 185)
- GUICtrlSetState(-1, $GUI_CHECKED)
- $h_C_AutoI = GUICtrlCreateCheckbox("Auto", 185, 185)
- $h_G_Method = GUICtrlCreateGroup("Injection method", 15, 210, $Width / 3 - 25, 80, $SS_SUNKEN)
- GUICtrlSetFont(-1, 9, 700)
- GUIStartGroup()
- $h_R_LoadLib = GUICtrlCreateRadio("LoadLibraryA", 20, 235)
- GUICtrlSetState(-1, $GUI_CHECKED)
- $h_R_LdrDll = GUICtrlCreateRadio("LdrLoadDll", 102, 235)
- $h_R_MMap = GUICtrlCreateRadio("Manual Map", 175, 235)
- $h_C_THJ = GUICtrlCreateCheckbox("Thread hijacking", 20, 260)
- $h_G_PostInj = GUICtrlCreateGroup("Post injection", 15, 295, $Width / 3 - 25, 80, $SS_SUNKEN)
- GUICtrlSetFont(-1, 9, 700)
- GUIStartGroup()
- $h_R_KeepH = GUICtrlCreateRadio("Keep PEH", 20, 320)
- GUICtrlSetState(-1, $GUI_CHECKED)
- $h_R_EraseH = GUICtrlCreateRadio("Erase PEH", 102, 320)
- $h_R_FakeH = GUICtrlCreateRadio("Fake PEH", 175, 320)
- $h_C_Unlink = GUICtrlCreateCheckbox("Unlink from PEB", 20, 345)
- $h_B_Reset = GUICtrlCreateButton("Reset", $Width/24 + 3, $Height - 45, $Width / 4, 22)
- $h_G_DllList = GUICtrlCreateGroup("Files", $Width / 3 + 5, 80, 2 * $Width / 3 - 15, $Height - 145, $SS_SUNKEN)
- GUICtrlSetFont(-1, 11, 700)
- $h_L_Dlls = GUICtrlCreateListView("Active|Filename|Path", $Width / 3 + 10, 95, 2 * $Width / 3 - 25, $Height - 200, 0, $LVS_EX_CHECKBOXES)
- _GUICtrlListView_RegisterSortCallBack($h_L_Dlls)
- _GUICtrlListView_SetColumnWidth($h_L_Dlls, 0, 50)
- _GUICtrlListView_SetColumnWidth($h_L_Dlls, 1, 100)
- _GUICtrlListView_SetColumnWidth($h_L_Dlls, 2, 2 * $Width / 5)
- $h_B_Add = GUICtrlCreateButton("Add files", $Width / 3 + 15, $Height - 95, $Width / 6, 22)
- $h_B_Inject = GUICtrlCreateButton("Inject", 2 * $Width / 3 - $Width / 12, $Height - 95, $Width / 6, 22)
- $h_B_Remove = GUICtrlCreateButton("Remove selected", $Width - $Width / 6 - 20, $Height - 95, $Width / 6, 22)
- $h_G_Info = GUICtrlCreateGroup("Info", $Width / 3 + 5, $Height - 62, 2 * $Width / 3 - 15, 47, $SS_SUNKEN)
- GUICtrlSetFont(-1, 11, 700)
- $h_L_Version = GUICtrlCreateLabel("Version " & $Version, $Width / 3 + 15, $Height - 45, $Width / 8, 22, BitOR($SS_SUNKEN, $SS_CENTER))
- GUICtrlSetFont(-1, 12, 700)
- GUICtrlSetColor(-1, 0x555555)
- GUICtrlSetBkColor(-1, 0xCCCCAA)
- $h_B_Help = GUICtrlCreateButton("Help", 37 * $Width / 72 + 10/3, $Height - 45, $Width / 8, 22)
- $h_B_About = GUICtrlCreateButton("About", 25 * $Width / 36 - 25/3, $Height - 45, $Width / 8, 22)
- $h_B_Broihon = GUICtrlCreateButton("Broihon", 7 * $Width / 8 - 20, $Height - 45, $Width / 8, 22)
- GUISetState(@SW_SHOW)
- Func UpdateGUI()
- If (BitAND(GUICtrlRead($h_R_Procname), $GUI_CHECKED) AND (BitAND(GUICtrlGetState($h_I_PID), $GUI_ENABLE))) Then
- GUICtrlSetState($h_I_PID, $GUI_DISABLE)
- GUICtrlSetState($h_I_ProcName, $GUI_ENABLE)
- ElseIf (BitAND(GUICtrlRead($h_R_PID), $GUI_CHECKED) AND (BitAND(GUICtrlGetState($h_I_Procname), $GUI_ENABLE))) Then
- GUICtrlSetState($h_I_Procname, $GUI_DISABLE)
- GUICtrlSetState($h_I_PID, $GUI_ENABLE)
- EndIf
- If (BitAND(GUICtrlGetState($h_I_ProcName), $GUI_ENABLE)) Then
- $Processname = GUICtrlRead($h_I_ProcName)
- $PID = ProcessExists($Processname)
- GUICtrlSetData($h_I_PID, $PID)
- Else
- $PID = GUICtrlRead($h_I_PID)
- $Processname = _ProcessGetName($PID)
- GUICtrlSetData($h_I_ProcName, $Processname)
- EndIf
- If (BitAND(GUICtrlRead($h_C_AutoI), $GUI_CHECKED) AND (BitAND(GUICtrlGetState($h_C_CloseAI), $GUI_ENABLE))) Then
- GUICtrlSetState($h_C_CloseAI, BitOR($GUI_DISABLE, $GUI_CHECKED))
- ElseIf (BitAND(GUICtrlRead($h_C_AutoI), $GUI_UNCHECKED) AND (BitAND(GUICtrlGetState($h_C_CloseAI), $GUI_DISABLE))) Then
- GUICtrlSetState($h_C_CloseAI, BitOr($GUI_ENABLE, $GUI_CHECKED))
- EndIf
- If (BitAND(GUICtrlRead($h_R_MMap), $GUI_CHECKED) AND (BitAND(GUICtrlGetState($h_R_KeepH), $GUI_ENABLE))) Then
- GUICtrlSetState($h_R_KeepH, BitOR($GUI_DISABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_R_EraseH, BitOR($GUI_ENABLE, $GUI_CHECKED))
- GUICtrlSetState($h_R_FakeH, BitOR($GUI_DISABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_C_Unlink, BitOR($GUI_DISABLE, $GUI_UNCHECKED))
- ElseIf (BitAND(GUICtrlRead($h_R_MMap), $GUI_UNCHECKED) AND (BitAND(GUICtrlGetState($h_R_KeepH), $GUI_DISABLE))) Then
- GUICtrlSetState($h_R_KeepH, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_R_FakeH, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_C_Unlink, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- EndIf
- Local $CursorInfo = GUIGetCursorInfo($h_GUI)
- If (NOT @error) Then
- If (($CursorInfo[4] = $h_P_Banner) AND NOT $b_HoverBanner AND WinActive($WindowTitle)) Then
- $b_HoverBanner = True
- ToolTip("www.guidedhacking.com")
- ElseIf (($CursorInfo[4] = $h_P_Banner) AND $b_HoverBanner) Then
- If ($CursorInfo[2] = 1) Then
- ;ShellExecute("http://www.guidedhacking.com")
- ToolTip("")
- Sleep(100)
- EndIf
- ElseIf (($CursorInfo[4] <> $h_P_Banner) AND $b_HoverBanner) Then
- ToolTip("")
- $b_HoverBanner = False
- EndIf
- EndIf
- EndFunc
- Func AddFile($Path)
- If (NOT FileExists($ConfigPath)) Then
- Reset()
- Else
- Local $Files = IniReadSection($ConfigPath, "FILES")
- If (@error) Then
- IniWrite($ConfigPath, "FILES", 1, $Path)
- Else
- $Max = $Files[0][0]
- $MaxID = $Files[$Files[0][0]][0]
- IniWrite($ConfigPath, "FILES", $MaxID + 1, $Path)
- EndIf
- EndIf
- Local $Split = StringSplit($Path, "\")
- $Count = _GUICtrlListView_GetItemCount($h_L_Dlls)
- _GUICtrlListView_AddItem($h_L_Dlls, "", $Count)
- _GUICtrlListView_AddSubItem($h_L_Dlls, $Count, $Split[$Split[0]], 1, 1)
- _GUICtrlListView_AddSubItem($h_L_Dlls, $Count, $Path, 2, 2)
- $FullPath = 0
- For $i = 0 To $Split[0] - 1 Step 1
- $FullPath = $FullPath & $Split[$i + 1]
- Next
- $LastDirectory = $FullPath
- EndFunc
- Func AddFiles()
- $Files = FileOpenDialog("Select dll files", $LastDirectory, "Dynamic Link Libraries (*.dll)|All Files(*.*)", $FD_MULTISELECT)
- If (@error) Then
- Return
- EndIf
- Local $Chars = StringSplit($Files, "|")
- If (@error = 1) Then
- AddFile($Files)
- Return
- EndIf
- For $i = 2 To $Chars[0] Step 1
- AddFile($Chars[1] & "\" & $Chars[$i])
- Next
- EndFunc
- Func RemoveFiles()
- $Count = _GUICtrlListView_GetItemCount($h_L_Dlls)
- For $i = 0 To $Count Step 1
- If (_GUICtrlListView_GetItemChecked($h_L_Dlls, $i)) Then
- Local $Files = IniReadSection($ConfigPath, "FILES")
- IniDelete($ConfigPath, "FILES", $Files[$i + 1][0])
- _GUICtrlListView_DeleteItem($h_L_Dlls, $i)
- $i = $i - 1
- EndIf
- Next
- EndFunc
- Func InjectDll($DllPath)
- If (NOT FileExists(@WorkingDir & "\GH Injector - x86.exe")) Then
- MsgBox($MB_ICONERROR, "Error", '"GH Injector - x86.exe" is missing')
- Exit
- EndIf
- $_ThreadHJ = ""
- $_Method = 0
- $_Unlink = ""
- $_PostInj = 0
- If (BitAND(GUICtrlRead($h_C_THJ), $GUI_CHECKED)) Then
- $_ThreadHJ = " /t "
- EndIf
- If (BitAND(GUICtrlRead($h_R_MMap), $GUI_CHECKED)) Then
- $_Method = 2
- ElseIf (BitAND(GUICtrlRead($h_R_LdrDll), $GUI_CHECKED)) Then
- $_Method = 1
- EndIf
- If (BitAND(GUICtrlRead($h_C_Unlink), $GUI_CHECKED)) Then
- $_Unlink = " /u "
- EndIf
- If (BitAND(GUICtrlRead($h_R_EraseH), $GUI_CHECKED)) Then
- $_PostInj = 1
- ElseIf (BitAND(GUICtrlRead($h_R_FakeH), $GUI_CHECKED)) Then
- $_PostInj = 2
- EndIf
- Run('"' & @WorkingDir & "\GH Injector - x86.exe" & '"' & " /p " & $PID & " /f " & '"' & $DllPath & '"' & " /m " & $_Method & " /h " & $_PostInj & $_Unlink & $_ThreadHJ, "", @SW_HIDE)
- EndFunc
- Func Inject()
- If (NOT $PID OR NOT $Processname) Then
- MsgBox($MB_ICONERROR, "Error", "Process not active.")
- Return
- EndIf
- $Count = _GUICtrlListView_GetItemCount($h_L_Dlls)
- If (NOT $Count) Then
- Return
- EndIf
- $Delay = GUICtrlRead($h_I_InjDelay)
- Sleep($Delay)
- $Injected = False
- For $i = 0 To $Count Step 1
- If (_GUICtrlListView_GetItemChecked($h_L_Dlls, $i)) Then
- $DllFile = _GUICtrlListView_GetItemText($h_L_Dlls, $i, 2)
- InjectDll($DllFile)
- $Injected = True
- EndIf
- Next
- If (BitAND(GUICtrlRead($h_C_CloseAI), $GUI_CHECKED) AND $Injected) Then
- Exit
- EndIf
- EndFunc
- Func Load()
- If (NOT FileExists($ConfigPath)) Then
- IniWrite($ConfigPath, "CONFIG", "PROCESS", "Broihon.exe")
- EndIf
- $Processname = IniRead($ConfigPath, "CONFIG", "PROCESS", "Broihon.exe")
- GUICtrlSetData($h_I_ProcName, $ProcessName)
- $PID = IniRead($ConfigPath, "CONFIG", "PID", 1337)
- GUICtrlSetData($h_I_PID, $PID)
- $Delay = IniRead($ConfigPath, "CONFIG", "DELAY", 0)
- GUICtrlSetData($h_I_InjDelay, $Delay)
- $LastDirectory = IniRead($ConfigPath, "CONFIG", "LASTDIR", @DesktopDir)
- Local $Files = IniReadSection($ConfigPath, "FILES")
- If (@error) Then
- Return
- EndIf
- For $i = 0 To $Files[0][0] - 1 Step 1
- If (FileExists($Files[$i + 1][1])) Then
- Local $Split = StringSplit($Files[$i + 1][1], "\")
- _GUICtrlListView_AddItem($h_L_Dlls, "", $i)
- _GUICtrlListView_AddSubItem($h_L_Dlls, $i, $Split[$Split[0]], 1, 1)
- _GUICtrlListView_AddSubItem($h_L_Dlls, $i, $Files[$i + 1][1], 2, 2)
- Else
- IniDelete($ConfigPath, "FILES", $Files[$i + 1][0])
- EndIf
- Next
- $Count = _GUICtrlListView_GetItemCount($h_L_Dlls)
- For $i = 0 To $Count Step 1
- If (_GUICtrlListView_GetItemChecked($h_L_Dlls, $i)) Then
- Local $Files = IniReadSection($ConfigPath, "FILES")
- IniDelete($ConfigPath, "FILES", $Files[$i + 1][0])
- _GUICtrlListView_DeleteItem($h_L_Dlls, $i)
- $i = $i - 1
- EndIf
- Next
- EndFunc
- Func SelectAllFiles()
- _GUICtrlListView_SetItemChecked($h_L_Dlls, -1, 1)
- EndFunc
- Func Reset()
- FileDelete($ConfigPath)
- $Processname = "Broihon.exe"
- IniWrite($ConfigPath, "CONFIG", "PROCESS", $Processname)
- GUICtrlSetData($h_I_ProcName, $ProcessName)
- $PID = 1337
- IniWrite($ConfigPath, "CONFIG", "PID", $PID)
- GUICtrlSetData($h_I_PID, $PID)
- GUICtrlSetState($h_R_ProcName, $GUI_CHECKED)
- GUICtrlSetState($h_R_PID, $GUI_UNCHECKED)
- GUICtrlSetState($h_I_ProcName, $GUI_ENABLE)
- GUICtrlSetState($h_I_PID, $GUI_DISABLE)
- GUICtrlSetState($h_C_CloseAI, BitOR($GUI_DISABLE, $GUI_CHECKED))
- GUICtrlSetState($h_C_AutoI, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- $Delay = 0
- IniWrite($ConfigPath, "CONFIG", "DELAY", $Delay)
- GUICtrlSetData($h_I_InjDelay, $Delay)
- $LastDirectory = @DesktopDir
- IniWrite($ConfigPath, "CONFIG", "LASTDIR", $LastDirectory)
- IniWriteSection($ConfigPath, "FILES", "")
- GUICtrlSetState($h_R_LdrDll, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_R_MMap, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_C_THJ, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_R_LoadLib, BitOR($GUI_ENABLE, $GUI_CHECKED))
- GUICtrlSetState($h_R_EraseH, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_R_FakeH, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_C_Unlink, BitOR($GUI_ENABLE, $GUI_UNCHECKED))
- GUICtrlSetState($h_R_KeepH, BitOR($GUI_ENABLE, $GUI_CHECKED))
- _GUICtrlListView_DeleteAllItems($h_L_Dlls)
- UpdateGUI()
- EndFunc
- Func Save()
- $Processname = GUICtrlRead($h_I_ProcName)
- IniWrite($ConfigPath, "CONFIG", "PROCESS", $Processname)
- $PID = GUICtrlRead($h_I_PID)
- IniWrite($ConfigPath, "CONFIG", "PID", $PID)
- $Delay = GUICtrlRead($h_I_InjDelay)
- IniWrite($ConfigPath, "CONFIG", "DELAY", $Delay)
- IniWrite($ConfigPath, "CONFIG", "LASTDIR", $LastDirectory)
- EndFunc
- Load()
- While 1
- UpdateGUI()
- $Msg = GUIGetMsg()
- Select
- Case $Msg = $GUI_EVENT_CLOSE
- Save()
- ExitLoop
- Case $Msg = $h_B_Add
- AddFiles()
- Case $Msg = $h_B_Remove
- RemoveFiles()
- Case $Msg = $h_B_Inject
- Inject()
- Case $Msg = $h_B_Reset
- Reset()
- Case $Msg = $h_L_Dlls
- SelectAllFiles()
- Case $Msg = $h_B_Help
- ShellExecute("http://guidedhacking.com/showthread.php?8417&p=44654&viewfull=1#post44654")
- Case $Msg = $h_B_Broihon
- $Res = Random(0, 8, 1)
- If ($Res = 0) Then
- ShellExecute("http://www.instantcena.com")
- ElseIf ($Res = 1) Then
- ShellExecute("http://www.gaben.tv")
- ElseIf ($Res = 2) Then
- ShellExecute("http://www.youtube.com/watch?v=DLzxrzFCyOs")
- ElseIf ($Res = 3) Then
- ShellExecute("http://www.downloadmoreram.com/")
- ElseIf ($Res = 4) Then
- ShellExecute("http://www.nyan.cat/")
- ElseIf ($Res = 5) Then
- ShellExecute("http://www.staggeringbeauty.com/")
- ElseIf ($Res = 6) Then
- ShellExecute("http://www.loser.com/")
- ElseIf ($Res = 7) Then
- ShellExecute("http://www.gameoftheyear420blazeit.com/")
- ElseIf ($Res = 8) Then
- ShellExecute("http://www.youtube.com/watch?v=DO_B3OT7tcw")
- EndIf
- Case $Msg = $h_B_About
- MsgBox($MB_ICONINFORMATION, "About", "GH Injector V" & $Version & " by Broihon" & @CRLF & "For more information visit GuidedHacking")
- EndSelect
- If (BitAND(GUICtrlRead($h_C_AutoI), $GUI_CHECKED) AND $PID AND $Processname) Then
- Inject()
- EndIf
- Sleep(5)
- WEnd
Add Comment
Please, Sign In to add comment