 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
12103com Newbie cheater
Reputation: 0
Joined: 12 Jul 2014 Posts: 14
|
Posted: Sat Jul 12, 2014 5:01 am Post subject: Dll Injection With Lua |
|
|
What I want to do is automatically inject a DLL when a client starts.
For example, Instead of going to tools>inject DLL, i need a faster way.
This reason is because after the client starts, when you inject it, it will exit.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25816 Location: The netherlands
|
Posted: Sat Jul 12, 2014 6:27 am Post subject: |
|
|
If your client doesn't need a special launcher you can launch it yourself with debugging and change the entry point to a dll injector routine
e.g: this loads a dll in a program at specific paths (just change them yourself)
| Code: |
function debugger_onBreakpoint()
autoAssemble([[
alloc(function, 1024)
registersymbol(function)
alloc(cancontinue,4)
registersymbol(cancontinue)
alloc(dllpath, 1024)
dllpath:
db 'F:\svn\Cheat Engine\bin\speedhack-i386.dll',0
function:
cmp [cancontinue],1
jne function
push dllpath
call loadlibrarya
jmp ]]..string.format('%8x',EIP))
EIP=getAddress('function')
debug_continueFromBreakpoint(co_run)
return 1
end
errorOnLookupFailure(false)
createProcess([[F:\svn\Cheat Engine\bin\tutorial-i386.exe]], '', true, true)
--create a timer to check when the dll loader script has been injected as detachIfPossible() isn't possible from inside onBreakpoint
t=createTimer(nil)
t.Interval=1
t.OnTimer=function(sender)
if getAddress('cancontinue')~=0 then
detachIfPossible()
writeInteger('cancontinue',1)
sender.destroy()
end
end
t.Enabled=true
|
If it does require a launcher, then try a timer that constantly tries to open the process and when it succeeds call the injectDll function on it (it's less accurate though and you may be missing some things)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|
|
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
|
|