Join 300,470 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,734 people online right now. Registration is fast and FREE... Join Now!
You'll need to find the process id. I wrote this program a few years ago, but it was written to run on Windows 98, so I have no idea what it would do on XP. You don't really have to have your program in a DLL, any reason why you want to write it as such? It sounds complicated enough without forcing to to be a DLL.
I don't like the sound of the content of this thread and the way it appears to be going. Words such as"... so it cannot be detected by the user ..." seem to imply that you are attempting to write some Trojan type of process and I don't think anyone on here should be assisting in such activities.
I don't like the sound of the content of this thread and the way it appears to be going. Words such as"... so it cannot be detected by the user ..." seem to imply that you are attempting to write some Trojan type of process and I don't think anyone on here should be assisting in such activities.
Not really, if it's a game hack he probably won't be concerned with the user, more anti-cheats for said game.
Will give you my code shortly... Just gonna tie it up in a console app.
EDIT: Here you go... http://www.muppetalert.com/InjectionNutshell.rar It will be much better if you start the process that you want to inject into from the EXE also, but this is just an example.
This post has been edited by MageUK: 5 Jul, 2009 - 03:43 AM
I'm not writing a trojan virus . Why would i ? Doesn't benefit me at all .
Anyways . The code that i provide above used psapi to detect processes and kill it . But the sad thing is when i try to compile it gave me errors.
@MageUK Thank you for the DLLinjector But the thing now is i cant compile the code as it has numerous Errors .
PLus injectors need to manually inject the dlls into the Exe right ? If that's the case , how can i make it auto inject or something .
As i said before , it serves as a anti-hack dll . It will search the process list find the hack.exe . Once found , it will kill the process thus safe-guarding the game.exe
Your Help is very very much appreciated . I'm grateful to all members that helped me . I now can see the end of the path clearly already =) .
If you want it to auto-inject.. You'd have to create another process which would monitor for the game process to inject the hack... Which kindof defeats the object of having a DLL since you'd still have another application running for the "auto-inject".
The DLL Injector/DLL works fine.. You're compiling with VS, right?
Well I'll be blunt and say that if a cheater wanted to get around your "anti-cheat", unless you have significant knowledge in code randomisation (ie. polymorphing), using virtual addresses/functions (that are constructed at runtime etc) it will be easily gotten around.