el_beta How do I cheat?
Reputation: 0
Joined: 05 Apr 2019 Posts: 9
|
Posted: Wed Apr 17, 2019 5:26 am Post subject: How do I get thread count of every process named "xxxxx |
|
|
As of now, my radar hack requires manually attaching CE to the target process. There's multiple processes with the same name. I get the process ID of the one with the highest thread count (also consuming the highest system resources) using Process Hacker and then attach CE to that process. The process takes some time, although small.
I wanted to make this process automated. What are the possible ways?
----------------------------------------------------------------------------------
Edit: I came up with this solution. I guess there can be some room for some improvement. There may even be a better method that I'm unaware of.
Code: |
function attachToTarget()
local procList = getProcesslist()
local targetPID = nil
local maxThreadCount = 0
local threadlist = createStringlist()
for pid, name in pairs(procList) do
if name == "xxxxxx" then
openProcess(pid)
getThreadlist(threadlist)
if threadlist.Count >= maxThreadCount then
maxThreadCount = threadlist.Count
targetPID = pid
end
end
end
openProcess(targetPID)
return targetPID
end
print(attachToTarget())
|
|
|