View previous topic :: View next topic |
Author |
Message |
vitalityedge42 How do I cheat? Reputation: 0
Joined: 06 Aug 2021 Posts: 8
|
Posted: Tue Aug 10, 2021 1:58 pm Post subject: Growtopia has some sort of anti-cheat |
|
|
I have tried 3 different methods (shown below) to read/write data to a memory from a game called "Growtopia" and apparently, they all fail to attach to the handle of its process. Cheat engine has no problem attaching processes to it and I am even able to modify addresses so I think there could be a solution to this.
Method 1: Using ReadWriteMemory (Python)
Code:
Code: | from ReadWriteMemory import ReadWriteMemory
rwm = ReadWriteMemory()
process = rwm.get_process_by_name("Growtopia.exe") |
Output:
Code: | Traceback (most recent call last):
File "C:\Users\Vincent\PycharmProjects\GrowtopiaWorldExtractor\main.py", line 5, in <module>
process = rwm.get_process_by_name("Growtopia.exe")
File "C:\Users\Vincent\AppData\Local\Programs\Python\Python39\lib\site-packages\ReadWriteMemory\__init__.py", line 172, in get_process_by_name
raise ReadWriteMemoryError(f'Process "{self.process.name}" not found!')
ReadWriteMemory.ReadWriteMemoryError: Process "" not found! |
Method 2: Using PyMem (Python)
Code:
Code: | import pymem
pm = pymem.Pymem('Growtopia.exe') |
Output:
Code: | Traceback (most recent call last):
File "C:\Users\Vincent\PycharmProjects\GrowtopiaWorldExtractor\main.py", line 3, in <module>
pm = pymem.Pymem('Growtopia.exe')
File "C:\Users\Vincent\AppData\Local\Programs\Python\Python39\lib\site-packages\pymem\__init__.py", line 44, in __init__
self.open_process_from_name(process_name)
File "C:\Users\Vincent\AppData\Local\Programs\Python\Python39\lib\site-packages\pymem\__init__.py", line 204, in open_process_from_name
self.open_process_from_id(self.process_id)
File "C:\Users\Vincent\AppData\Local\Programs\Python\Python39\lib\site-packages\pymem\__init__.py", line 226, in open_process_from_id
raise pymem.exception.CouldNotOpenProcess(self.process_id)
pymem.exception.CouldNotOpenProcess: Could not open process: 16704
Process finished with exit code 1 |
Method 3: Using the Windows API (C++)
Code:
Code: | #include <iostream>
#include <windows.h>
#include <TlHelp32.h>
using namespace std;
HANDLE hProc = NULL;
DWORD pID;
bool attachProc(char* procName)
{
PROCESSENTRY32 procEntry32;
procEntry32.dwSize = sizeof(PROCESSENTRY32);
auto hProcSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hProcSnap == INVALID_HANDLE_VALUE)
{
std::cout << "Failed to take snapshot of processes!" << std::endl;
return false;
}
while (Process32Next(hProcSnap, &procEntry32))
{
std::cout << procEntry32.szExeFile << std::endl;
if (!strcmp(procName, (char*)procEntry32.szExeFile))
{
std::cout << "Found process " << procEntry32.szExeFile << "with process ID of " << procEntry32.th32ProcessID << std::endl;
hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procEntry32.th32ProcessID);
pID = procEntry32.th32ProcessID;
if (hProc == NULL)
{
std::cout << "Failed getting handle to process." << std::endl;
}
CloseHandle(hProcSnap);
return true;
}
}
std::cout << "Couldn't find " << procName << " in the process snapshot" << std::endl;
CloseHandle(hProc);
return false;
}
int main()
{
attachProc((char*)"Growtopia.exe");
return EXIT_SUCCESS;
} |
Output:
Code: | Found process Growtopia.exe with process ID of 16704
Failed getting handle to process. |
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Tue Aug 10, 2021 2:16 pm Post subject: |
|
|
are you running as admin ?
_________________
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 |
|
|
vitalityedge42 How do I cheat? Reputation: 0
Joined: 06 Aug 2021 Posts: 8
|
Posted: Tue Aug 10, 2021 4:52 pm Post subject: |
|
|
Dark Byte wrote: | are you running as admin ? |
Neither running it as admin does not work, unfortunately. It works fine without a single problem with other program such as AssaultCube untill I try it with Growtopia.
|
|
Back to top |
|
|
DanyDollaro Master Cheater Reputation: 3
Joined: 01 Aug 2019 Posts: 334
|
Posted: Tue Aug 10, 2021 6:05 pm Post subject: |
|
|
Try calling GetLastError after calling OpenProcess, just add this line:
Code: | std::cout << "[" << GetLastError() << "]"<< std::endl; |
after this one:
Code: | hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procEntry32.th32ProcessID); |
(And show us the output)
|
|
Back to top |
|
|
vitalityedge42 How do I cheat? Reputation: 0
Joined: 06 Aug 2021 Posts: 8
|
Posted: Tue Aug 10, 2021 6:26 pm Post subject: |
|
|
DanyDollaro wrote: | Try calling GetLastError after calling OpenProcess, just add this line:
Code: | std::cout << "[" << GetLastError() << "]"<< std::endl; |
after this one:
Code: | hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procEntry32.th32ProcessID); |
(And show us the output) |
"[5]" shows up
Code: | Found process Growtopia.exewith process ID of 12768
[5]
Failed getting handle to process. |
|
|
Back to top |
|
|
DanyDollaro Master Cheater Reputation: 3
Joined: 01 Aug 2019 Posts: 334
|
Posted: Tue Aug 10, 2021 8:21 pm Post subject: |
|
|
vitalityedge42 wrote: | "[5]" shows up |
That's weird, 5 stand for ERROR_ACCESS_DENIED [https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-], If you are running it as administrator it means that there is actually something that prevents you from opening that process in particular, but I don't know the game so I don't know what to tell you.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Wed Aug 11, 2021 4:45 am Post subject: |
|
|
try obtaining SeDebugPrivilege before calling OpenProcess
_________________
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 |
|
|
vitalityedge42 How do I cheat? Reputation: 0
Joined: 06 Aug 2021 Posts: 8
|
Posted: Wed Aug 11, 2021 8:23 am Post subject: |
|
|
Dark Byte wrote: | try obtaining SeDebugPrivilege before calling OpenProcess |
Thank you so much, giving it debug privilege and running it as admin fixed the problem!
|
|
Back to top |
|
|
|