View previous topic :: View next topic |
Author |
Message |
RecoXD How do I cheat? Reputation: 0
Joined: 26 Jul 2022 Posts: 8
|
Posted: Tue Jul 26, 2022 11:17 am Post subject: How to inject any dll in cetrainers with button ? |
|
|
i just made a cetrainer for a game, but i need to a button in trainer that injects
specific dll to cetrainer when you click the button
i added a basic cepanelbutton to trainer and added it this function:
Code: | function UDF1_CEPanel6Click(sender)
injectDLL([[c:\Users\%username%\Desktop\tabg\DLL.dll]])
end |
but it doesnt work, am i doing it wrong?
( i tried to send screenshot but i dont have permission )
|
|
Back to top |
|
|
RecoXD How do I cheat? Reputation: 0
Joined: 26 Jul 2022 Posts: 8
|
Posted: Wed Jul 27, 2022 2:52 am Post subject: |
|
|
50 views and no reply
Okay, lets change question like that,
How can i write a lua script that auto injects a specific dll to itself when trainer starts
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Jul 27, 2022 3:21 am Post subject: |
|
|
wait until the process has fully started. If you try to inject a dll while it's still loading, it'll fail
_________________
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 |
|
|
RecoXD How do I cheat? Reputation: 0
Joined: 26 Jul 2022 Posts: 8
|
Posted: Wed Jul 27, 2022 6:48 am Post subject: |
|
|
to be short, im using that method which called "access without real handle" this method allows me to read games memorry that normally not allowed cuz of game's A-C
(thats why i have to inject dll)
so to use that method i have to inject a dll to cheat engine or cetrainer or a exe that i generated from cheatengine..
what would you suggest I do?
( the point is im not injecting that dll to game, im injecting it to trainer which commands doing "detecting it self and injecting dll" how can i do it)
( by the way, is the code i wrote at the beginning correct? )
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1260
|
Posted: Wed Jul 27, 2022 7:00 am Post subject: |
|
|
From past memories. (Maybe it will give you a goal start to walk)
Dark Byte wrote: | Just create your own form and write the script that is usually automatically generated for you manually (The trainerscript generator is as it's name says, just a simple script generator based on the config you give)
Just make sure that your script when executed at least shows one form (CE picks the icon of the first visible form for the taskbar)
as for checking if a dll is injected try to keep track of that yourself (e.g a global variable that when injected is true)
also, it's not really a problem if a dll gets injected multiple times, loading a dll a second time just increases it's reference count
(alternatively, run an aa script that accesses a dll export and check if it fails or not)
You can add the dll as a tablefile which you can extract when loaded.
Code: |
yourdllTF=findTableFile('yourdll.dll')
tablefile_saveToFile(yourdllTF, "Pathtodllextraction\\yourdll.dll")
injectdll("Pathtodllextraction\\yourdll.dll")
|
You can make use of getCheatEngineDir() if you wish to write it to the place CE's exe is
tip:
You can make use of [[ ]] as strings
e.g:
Code: |
autoAssemble([[
globalalloc(tempfunc, 1024)
tempfunc:
mov eax, my_init
call eax
ret
]]);
|
as for
Quote: |
I also want to check if this is BP when running a function in the DLL from Lua
|
No idea what you mean with BP (breakpoint?)
(tip2: No need to set eax to the address of my_init, you can directly call my_init) |
Here is an example you should test;
Code: | newdllpath = getCheatEngineDir()..[[clibs64]] --or clibs32
--print(newdllpath)
mydll = "yourAddTableDLLname.dll"
findTableFile(mydll).saveToFile(newdllpath..'\\'..mydll)
injectdll(newdllpath..'\\'..mydll)
--loadlibrary(newdllpath..'\\'..mydll) |
_________________
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Wed Jul 27, 2022 7:16 am Post subject: |
|
|
From the generated exe view, GetCheatEngineDir() <it end with \ >is its temporary root directory (not the installed cheat engine directory of the user).
So, if you include the dll in extra files while generating the trainer, the path to it should be,
GetCheatEngineDir()..[[DLL.dll]]
Also %username% will not automatic expand if you means it the os environment variable.
_________________
- Retarded. |
|
Back to top |
|
|
RecoXD How do I cheat? Reputation: 0
Joined: 26 Jul 2022 Posts: 8
|
Posted: Wed Jul 27, 2022 7:41 am Post subject: |
|
|
AylinCE
panraven
First of all, AylinCE if you are from turkish, can you explain me all this with Turkish language ? Or some social media like discord.. or i will try to do as much as i can in english version
(((( Here is my tag: recoxd#0088 if you cant contact me here empty server: gg/j4bgs6hbTk )))))
panraven yes i put dll to extra files, but how can i make it to inject dll to itself not the game. i have to inject dll the trainer (itself)
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1260
|
Posted: Wed Jul 27, 2022 9:15 am Post subject: |
|
|
TR = [ Bu yöntemi daha önce hiç kullanmadım. Verdiğim bilgi veya kodlar araştırma sonucudur. Daha fazla yarımcı olamıyorum. ]
EN = [ I think you can find more examples in the CEF search section.
https://forum.cheatengine.org/search.php ]
_________________
|
|
Back to top |
|
|
RecoXD How do I cheat? Reputation: 0
Joined: 26 Jul 2022 Posts: 8
|
Posted: Wed Jul 27, 2022 9:55 am Post subject: |
|
|
Discorddan felan biyerden ekran açsam yardımcı olsan olurmu tek istediğim cheat engineden buildliceğim exenin açılışta process olarak kendini seçip kendine dll injectlemesi :/ veya bir buton aracalığıyla
|
|
Back to top |
|
|
RecoXD How do I cheat? Reputation: 0
Joined: 26 Jul 2022 Posts: 8
|
Posted: Thu Jul 28, 2022 5:22 am Post subject: Panraven |
|
|
Panraven
@panraven
according to what you said, then will this lua code work in exe?
(i added the dll.dll to extra files )
Code: | function UDF1_CEPanel6Click(sender)
openProcess(getCheatEngineProcessID())
GetCheatEngineDir()[[DLL.dll]]
injectDLL[[DLL.dll]]
end |
( im bad at lua so please explain me all )[/b]
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Thu Jul 28, 2022 9:46 am Post subject: |
|
|
Have you run the code? If there are error, the error message may be the hint to fix it.
Anyway, the .. in the expression GetCheatEngineDir()..[[DLL.dll]] is lua infix operator for string concatenation, to join 2 string to form a new string.
In this case it return the string of the full path to the dll files.
Now since you are attaching a dll to the trainer/ce, you don't need to wait/place the relevant code inside a button handle function.
They should be execute in very beginning code, directly.
For instance,
Code: |
-- in the beginning lines
openProcess(getCheatEngineProcessID())
injectDLL( GetCheatEngineDir()..[[DLL.dll]])
... other code ...
|
_________________
- Retarded. |
|
Back to top |
|
|
RecoXD How do I cheat? Reputation: 0
Joined: 26 Jul 2022 Posts: 8
|
Posted: Thu Jul 28, 2022 12:01 pm Post subject: |
|
|
panraven
@panraven
can you help me very quick on discord please ?? it will take only minutes please[/b]
|
|
Back to top |
|
|
|