| View previous topic :: View next topic |
| Author |
Message |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Sat Jan 31, 2009 7:35 pm Post subject: [Delphi] Automatic dll injection |
|
|
I don't know if this is the right way to go about it. But I've coded a dll in c++ since you cant use wpm with maplestory. Would anyone know how to inject it without user confirmation. Or any other methods that i can use to call this dll from my delphi application.
_________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Jan 31, 2009 7:47 pm Post subject: Re: [Delphi] Automatic dll injection |
|
|
| angerist wrote: | | I don't know if this is the right way to go about it. But I've coded a dll in c++ since you cant use wpm with maplestory. Would anyone know how to inject it without user confirmation. Or any other methods that i can use to call this dll from my delphi application. |
http://forum.cheatengine.org/viewtopic.php?t=145682
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Jan 31, 2009 7:54 pm Post subject: |
|
|
| It's very easy to inject a DLL with SetWindowsHookEx.
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Jan 31, 2009 7:56 pm Post subject: |
|
|
| slovach wrote: | | It's very easy to inject a DLL with SetWindowsHookEx. |
Thats all processes...
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Jan 31, 2009 7:57 pm Post subject: |
|
|
| dnsi0 wrote: | | slovach wrote: | | It's very easy to inject a DLL with SetWindowsHookEx. |
Thats all processes... |
You don't have to inject it to every process.
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Jan 31, 2009 7:58 pm Post subject: |
|
|
| slovach wrote: | | dnsi0 wrote: | | slovach wrote: | | It's very easy to inject a DLL with SetWindowsHookEx. |
Thats all processes... |
You don't have to inject it to every process.  |
How? Cause when I use that, it injects into every single process and when my dll bugs... T.T
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Jan 31, 2009 8:05 pm Post subject: |
|
|
I just used WH_GETMESSAGE as my hook procedure, got the thread of what I wanted to inject into, and called SetWindowsHookEx.
That is about all there is to it..
If you leave dwThreadId as 0, you will end up all over the place.
|
|
| Back to top |
|
 |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Sat Jan 31, 2009 8:15 pm Post subject: |
|
|
This part of code appears to be giving me a weird error.
| Code: |
begin
PhraseINI();
Writeln('- DLL Injector -'+#$0A+#$0D+'----------------');
DLLLocation:=GetCurrentDir()+'\'+DName;
if not FileExists(DLLLocation) then
begin
Writeln('Unable to locate the DLL');
sleep(7000);
exitprocess(0);
end;
Writeln('Waiting for process: '+PName);
GetPID();
Writeln(' - Process found'+#$0A+#$0D);
Writeln('Injecting '+DName+' into '+PName);
InjectDLL();
Writeln(' - DLL injected');
sleep(7000);
end. |
When I click continue:
Full screen :
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Jan 31, 2009 8:20 pm Post subject: |
|
|
| Run it in debug, and see where it breaks.
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sat Jan 31, 2009 8:33 pm Post subject: |
|
|
Don't Just cut and paste the code...
Take what you need...
|
|
| Back to top |
|
 |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Sat Jan 31, 2009 8:57 pm Post subject: |
|
|
I just deleted that whole part of code. It doesn't do anything just tells you if it failed or not.
_________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sun Feb 01, 2009 8:35 am Post subject: |
|
|
I get your error now...
Create a settings.ini...
|
|
| Back to top |
|
 |
|