View previous topic :: View next topic |
Author |
Message |
MErtHRMKsE Newbie cheater Reputation: 0
Joined: 02 Jul 2012 Posts: 21
|
Posted: Mon Jul 02, 2012 2:36 pm Post subject: injectDLL() question |
|
|
Is there any way to choose what function it'll run?
Exactly like when you do Tools > Inject DLL, it asks which function you want to run.
Thank you
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Jul 02, 2012 2:58 pm Post subject: |
|
|
execute this:
Code: |
autoAssemble('CreateThread(Exportnameofyourdllfunction)')
|
_________________
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 |
|
|
MErtHRMKsE Newbie cheater Reputation: 0
Joined: 02 Jul 2012 Posts: 21
|
Posted: Mon Jul 02, 2012 3:18 pm Post subject: |
|
|
Thank you! But I also have another question, I want to inject the DLL when example a process named 'abc.exe' is opened. I can also store the ID in a table to make sure I don't inject it twice but...
I tried doing this :
Code: |
while true do
sleep(10)
end
|
but it also freezes CE and it crashes... help? :S
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Jul 02, 2012 3:36 pm Post subject: |
|
|
you could add a "function onOpenProcess(processid)" function so you know when it opens a process
Just make sure you call reinitializeSymbolhandler() if you use scripts that make use of symbols inside that function
Also, use a timer instead of a loop
Alternatively you could add a "processMessages()" in the while loop so that timers will work. (and buttons and other gui objects too)
And the third option would be to create a nativeThread that does that loop
_________________
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 |
|
|
MErtHRMKsE Newbie cheater Reputation: 0
Joined: 02 Jul 2012 Posts: 21
|
Posted: Mon Jul 02, 2012 3:50 pm Post subject: |
|
|
I know I didn't mention this but... I'm using the Lua engine :s
How can I create a timer?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Jul 02, 2012 4:23 pm Post subject: |
|
|
I know, and the functions and methods I mentioned are all lua functions (I implemented a lot of object pascal into lua)
to create a timer:
Code: |
function mycheck(sender)
--check stuff
--if found
object_destroy(sender)
end
t=createTimer(nil)
timer_setInterval(t, 10) --check every 10 milliseconds
timer_onTimer(t, mycheck) --set the function to call
timer_setEnabled(t,true) --activate it if it wasn't active yet
|
_________________
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 |
|
|
MErtHRMKsE Newbie cheater Reputation: 0
Joined: 02 Jul 2012 Posts: 21
|
Posted: Mon Jul 02, 2012 4:41 pm Post subject: |
|
|
Thank you so much !
|
|
Back to top |
|
|
|