Welcome to hackvshack.net Forum!
Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, and More!
Register

C++ simple game version check (for external hacks)

simv0lofficial

t.me/s1legendirl
Forum Contributor
User ID:
20083
Messages:
156
Reactions:
10,794
Badges:
19
REP:
−0/3+
Level:
231
C++:
Expand Collapse Copy
std::string processPath;
wchar_t buffer[MAX_PATH];
DWORD size = MAX_PATH;
if (QueryFullProcessImageName(/*cs2 process handle*/, 0, buffer, &size))   
    processPath = WStringToString(buffer);   
else // failed to get process path
    return;

int pos = processPath.rfind("bin");
if (pos != std::string::npos)
    processPath = processPath.substr(0, pos + 3) + "\\built_from_cl.txt";
else // failed to find version file
    return;


std::ifstream file(processPath);
if (file.is_open())
{
    std::string gameVersion;
    std::getline(file, gameVersion);
    file.close();

    if (gameVersion != /*something*/)           
        return;   
}
 

Who has read this thread (Total: 0) in last 1 hours View details