-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Moved constants to Shared.Inc file
- Added InjectApi Hook - some cleanup
- Loading branch information
1 parent
c72d6ae
commit d7ffe89
Showing
16 changed files
with
1,860 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
::::::::::::: Place in All Config all Platform PostBuild ::::::::::::: | ||
:: Set PLATFORM=$(Platform) | ||
:: Set OUTPUTPATH=$(OUTPUTPATH) | ||
:: Set OUTPUTNAME=$(OUTPUTNAME) | ||
:: Set OUTPUTEXT=$(OUTPUTEXT) | ||
:: Set OUTPUTDIR=$(OUTPUTDIR) + any redirect like: $(OUTPUTDIR)\..\.. | ||
:: "Append Bitness.cmd" | ||
:::::::::::::::::::::::::::: END :::::::::::::::::::::::::::: | ||
|
||
:: Strip Bitness from Platform (Win32/Win64) | ||
SET BITNESS=%PLATFORM:~3,2% | ||
:: Copy so the original stays intact for Debugging | ||
COPY /Y "%OUTPUTPATH%" "%OUTPUTDIR%\%OUTPUTNAME%%BITNESS%%OUTPUTEXT%" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
{********************************************************************************************** | ||
MIT License | ||
Copyright (c) 2019 Fred Schetterer ([email protected]) | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
**********************************************************************************************} | ||
|
||
unit Unit1; | ||
|
||
interface | ||
|
@@ -8,6 +32,8 @@ interface | |
Vcl.Forms, Vcl.ActnList, Vcl.StdCtrls, Vcl.Controls, | ||
HooksMadeEasy.Common; | ||
|
||
{$I HooksMadeEasy.GetMsg.Shared.inc} | ||
|
||
/// <summary> | ||
/// Uncomment to use a DLL but its not required for Current Thread Hooks | ||
/// </summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{********************************************************************************************** | ||
MIT License | ||
Copyright (c) 2019 Fred Schetterer ([email protected]) | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
**********************************************************************************************} | ||
|
||
Library Hook; | ||
|
||
uses | ||
Winapi.Windows, | ||
HooksMadeEasy.InjectApi; | ||
|
||
/// <summary> | ||
/// Eporting this will call the record's class constructor | ||
/// for each instance loaded into a process | ||
/// </summary> | ||
function HookActive: Boolean; | ||
begin | ||
Result := TInjectApi.Active; | ||
end; | ||
|
||
Exports | ||
HookActive; | ||
|
||
begin | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/// <summary> | ||
/// Uses RemoteThread to load unload a Hook Dll from a single process. | ||
/// </summary> | ||
program HookLoadTest; | ||
|
||
uses | ||
Vcl.Forms, | ||
uHookLoadTest in 'uHookLoadTest.pas' {Form1}; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.MainFormOnTaskbar := True; | ||
Application.CreateForm(TForm1, Form1); | ||
Application.Run; | ||
end. |
Oops, something went wrong.