Hello.
so, i'm tring to do a simple troll hack for a game, S4League.
whenever im trying to open the process,it wont let me o_o
Screen:
[Only registered and activated users can see links. Click Here To Register...]
Source Code:
Any help is appreciated :3
so, i'm tring to do a simple troll hack for a game, S4League.
whenever im trying to open the process,it wont let me o_o
Screen:
[Only registered and activated users can see links. Click Here To Register...]
Source Code:
Code:
#include <iostream>
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "user32.lib")
using namespace std;
bool SetPrivilege(LPCTSTR privilege, bool enablePriv) {
LUID luid = {0};
if (LookupPrivilegeValue(NULL, privilege, &luid) == FALSE)
return false;
HANDLE hToken = NULL;
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken) == FALSE)
return false;
TOKEN_PRIVILEGES tokenPriv = {0};
tokenPriv.PrivilegeCount = 1;
tokenPriv.Privileges[0].Luid = luid;
tokenPriv.Privileges[0].Attributes = enablePriv ? SE_PRIVILEGE_ENABLED : 0;
if (AdjustTokenPrivileges(hToken, FALSE, &tokenPriv, NULL, NULL, NULL) != FALSE) {
CloseHandle(hToken);
return GetLastError() == ERROR_SUCCESS;
}
CloseHandle(hToken);
return false;
}
int main()
{
////////////////////////////////////////////////////////////////////////////////////////////
int test = SetPrivilege(SE_DEBUG_NAME, true);
if (!test)
{
cout << "Failed to set SE_DEBUG_NAME Privilege" <<endl << endl;
}
else
{
cout << "Setted SE_DEBUG_NAME Privilege succesfuly!"<<endl;
}
////////////////////////////////////////////////////////////////////////////////////////////
int newValue = 2348565979;
HWND hWnd = FindWindowA(0, "S4 Client");
Sleep(150);
if (hWnd == 0) {
cout << "Cannot find the S4Client Window * o *" << endl;
cout << "" << endl;
cout << "Press [ENTER] to close the application ";
std::cin.get();
return 0;
} else {
DWORD pId = GetWindowThreadProcessId(hWnd, &pId);
Sleep(100);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
cout << "S4Client pId: " << pId << endl<<endl;
if (!hProc) {
cout << "Can't open process." << endl;
cout << "Press [ENTER] to close the application ";
std::cin.get();
return 0;
} else {
int isSuccessful = WriteProcessMemory(hProc, (LPVOID)0x19951880, (LPVOID)2348565979, sizeof(2348565979),
NULL);
if (isSuccessful > 0) {
cout << "WriteProcessMemory Succesful!" << endl;
MessageBoxA(NULL, "54", "200 HP by Hybrid @ www.elitepvpers.com", MB_OK);
} else {
cout << "Cannot write process memory." << endl;
cout << "Press [ENTER] to close the application ";
std::cin.get();
return 0;
}
CloseHandle(hProc);
}
}
return 0;
}