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 


How to attach to 'dynamic-process-name' and make a trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
anh7codon
How do I cheat?
Reputation: 0

Joined: 23 Apr 2018
Posts: 9

PostPosted: Thu May 02, 2019 12:46 pm    Post subject: How to attach to 'dynamic-process-name' and make a trainer Reply with quote

Let say a game has a Launcher.
When the launcher launched, It coppy actual Game.exe into a random-name.exe and execute random-name.exe. The launcher also create a random key and send to random-name-game.exe as parameter.
I can hack the game with cheat-table normally but I have to change process-name in script every single time the game started. It means that I can not make a trainer with dynamic process name.

Is there anyone that faced this problem? I need suggestion.


Last edited by anh7codon on Thu May 02, 2019 9:55 pm; edited 2 times in total
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu May 02, 2019 4:49 pm    Post subject: Reply with quote

ehm, what a dirty solution to prevent trainer makers to do their jobs.
who came with such idea needs to get hard slap on their nuts, f*ck.

have you tried launching the game manually without the launcher? if so did you got any error messages?

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu May 02, 2019 8:00 pm    Post subject: Reply with quote

If you are coding a trainer yourself, you can hook on to the launcher instead. Monitor for it creating the process (generally CreateProcess/ShellExecute) and then you'll have the name needed etc. along with all the process information already.

Otherwise, just emulate how the launcher works to make the game run normally while keeping full control of it as the parent process.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
anh7codon
How do I cheat?
Reputation: 0

Joined: 23 Apr 2018
Posts: 9

PostPosted: Thu May 02, 2019 10:34 pm    Post subject: Reply with quote

I have a solution but I'm stuck in lua script:

First, when the trainer start, it will find a right process by md5, I think md5memory will help but I could not find any example for that.

Code:

for(var process from processlist)
 if(md5memory(process,8192) = 'md5checksum')
   attach-to-process
Back to top
View user's profile Send private message
anh7codon
How do I cheat?
Reputation: 0

Joined: 23 Apr 2018
Posts: 9

PostPosted: Mon May 06, 2019 2:47 am    Post subject: Reply with quote

Finally I'm done with my solution. Run slowly, but it works
Code:
showMessage("Scanning for Game Process, please wait")
local bProcessFound = false
for pid,name in pairs(getProcessList()) do
    if string.find(name, "cheatengine") or string.find(name, "++") then
        print ("Ignore Cheat Engine Process or NotePad++ with F*ck weird name.")
    else
        openProcess(pid)
        local txtMD5 = md5memory(process,4096)
        if(txtMD5 == "75f7a4c47791f089ce23c3e0ef22456f") then
           print ("Game Process Found");
           bProcessFound = true
           break
        end
    end
end

if(bProcessFound == false) then
  showMessage ("Game Process Not Found");
end
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue May 07, 2019 3:25 pm    Post subject: Reply with quote

Just keep in mind any small adjustment to the executable from the game will break the md5 as you are reading the PE header of the process. There are a ton of small/simple values that can change from a recompile of the game that will break your checksum if it is ever updated.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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