Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Automatic dll injection

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sat Jan 31, 2009 7:35 pm    Post subject: [Delphi] Automatic dll injection Reply with quote

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
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Jan 31, 2009 7:47 pm    Post subject: Re: [Delphi] Automatic dll injection Reply with quote

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
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Jan 31, 2009 7:54 pm    Post subject: Reply with quote

It's very easy to inject a DLL with SetWindowsHookEx.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Jan 31, 2009 7:56 pm    Post subject: Reply with quote

slovach wrote:
It's very easy to inject a DLL with SetWindowsHookEx.


Thats all processes...
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Jan 31, 2009 7:57 pm    Post subject: Reply with quote

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. Rolling Eyes
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Jan 31, 2009 7:58 pm    Post subject: Reply with quote

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. Rolling Eyes


How? Cause when I use that, it injects into every single process and when my dll bugs... T.T
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Jan 31, 2009 8:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sat Jan 31, 2009 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Jan 31, 2009 8:20 pm    Post subject: Reply with quote

Run it in debug, and see where it breaks.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Jan 31, 2009 8:33 pm    Post subject: Reply with quote

Don't Just cut and paste the code...

Take what you need...
Back to top
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sat Jan 31, 2009 8:57 pm    Post subject: Reply with quote

I just deleted that whole part of code. It doesn't do anything just tells you if it failed or not.
_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Feb 01, 2009 8:35 am    Post subject: Reply with quote

I get your error now...
Create a settings.ini...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites