[Help] Cheat Engine help
Auto attaching to chrome process via lua in a trainer.
Cheat Engine help Posted on: 04/20/2015 10:21pm
Quote Post

So sure this belongs more on cheat engines forums, but they are taking too long to give an answer, and they don't have anything already on the subject.

So since many of us here are very familiar with hacks and cheat engine, I figured I would ask here since maybe one or more of you might know how to do it.

I have a couple cheat engine trainers that I use. One I use personally, the other I put select private hacks in and share with a select few others.

As Tim and a few others know I use the firefox browser which I have used for many years because I like the plugins, and I like how easy it is to hack with.

Now that said: many people like Chrome because FireFox can become a bit laggy with flash after a while where apparently Chrome does not get so laggy.

So lets get down and dirty to the situation and my question:

In my trainers I use the following line of code to automatically attach the trainer to the correct flash process in FireFox:

openProcess("FlashPlayerPlugin")

Well the problem is: that doesn't work in Chrome because Chrome does not reveal the flash player process like firefox does. Chrome tries to be sneaky and hide it.

So my question is: how do I automatically detect and attach the correct chrome process in a cheat engine trainer without manual intervention to attach the process?

I basically have that line of code in every on click function for my buttons so if the browser is refreshed: there is no need to re-open the trainer to re-attach to the correct process.


I know KHUT can do this, so perhaps a similar method can be used with cheat engine?

Yes I could manually attach it, but that defeats the whole purpose of a stand alone trainer doesn't it?!

Any help would be much appreciated! :)

RE: Cheat Engine help Posted on: 04/20/2015 10:55pm
Quote Post
Never let a computer tell me shit.

it really couldnt be easier. I dont remember the exact code for cheat engine, but the process is bascially this:

get array of all chrome processes
check the modules of each process in the array to see if it contains a module with a file name containing flash

 




I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"

RE: Cheat Engine help Posted on: 04/21/2015 12:34am
Quote Post

Hi, 
here a demo of a ce process selector.(fix a unnecessarily loop, should be better performance)
I added auto-select after thenewcomer's question

It is slow on my machine.

To test, execute the Lua Script Window.

Click the popup 'Click me' one time, wait a while (because low performance)

Another popup should show process list, click one non flash process for testing purpose.

The ce should select the process, and 1st popup should show the pid and name.

Click the popup again, this time no popup should show, and the 1st 'flash' process should be slected and attached.
This is to test for the autoAttach.

Check the usage inside the script.

gl~

========================

usage example:

pidDialog(doPid,autoSelectFirst,pn,dn) 
--- 
doPid(pid,name,desc) - function to execute when the process is selected. 
autoSelectFirst - type boolean or string 
 -- if boolean = true, select the 1st (highest weight) process from the list without display the process list box, even the process name is not in plugname or dllname, it may select svchost.exe if it is the 1st process enumerated; 
 -- if string, and is one of string inside dllname, it will not show the popup and return the 1st process with match *.dll from enumModule if possible. If such string is not found, the popup will still show; 
 -- in case not to select 1st process but manual select from popup, but also want to change the default plugname, dllname, set this as false or nil; 
 -- *this auto-select function may be more unreliable and lower performance as more process there(eg. user playing multiple unity instance of a game in different browser) 
pn,dn -- these to modify the default plugname and dllname. If the respective type is table, the corresponding table is replaced ; if the type is string, the string is added to the table 



eg.1 
suppose cowon broswer or whatever has part of the module name as 'cowon', this added the weight of the cowon process in the list. 

Code:
pidDialog(function(pid,...) end, false,'cowon')


eg.2 suppose there are 2 button to auto select 'chrome' unity and 'firefox' flash plugins, their respective call can be: 
Code:

chrom-unity: 
pidDialog(function(pid,...) end, 'unity',{'chrome'})  -- last is a table, so enumModule run on chrome process only, should be better performance 
firefox-flash: 
pidDialog(function(pid,...) end, 'flash',{"flashplayerplugin","plugin-container"}) 



for auto select some known *.exe, 
Code:
pidDialog(function(pid,...) end, true,{"GxmOfWxrs.exe"}

... but it may be better use ce auto Attach function: getAutoAttachList().add("GxmOfWxrs.exe") at the beginning of the lua script 
 

Attached Files
Filename Filesize Downloads
proclist3.ct 6.26 KB 456



No +karma or thanks post please,
we shall exchange appreciation via telepathy ;)
 

RE: Cheat Engine help Posted on: 04/21/2015 5:38pm
Quote Post

Thanks haenawolf.

Whole lotta code there, but I can incorporate it into a button click at the top of the trainer.

It does take longer than the firefox process attach which is to be expected with the amount of code involved just to auto attach the flash process lol. So I can't really have it called by each hack button as it takes too long to run and the hack attempts to run before the function completes causing the hack to fail. Sure I could put delays in there, but I can't guess how long someone elses machine is going to take to run this, so better off just making it have its own button :)

Thanks again man! You're a big help as always!!!