One line of code stops from compiling with admin priv?

Posts 1–7 of 7 · Page 1 of 1
One line of code stops from compiling with admin priv?
Been trying to make a basic cheat, but every time I add one this one line of code, I can't do any OpenProcess/elevation requiring functions!


I encourage you to try this code yourself, all my friends get the same issue. Please tell me I'm being dumb and just have a typo


Code:
bool good_coder() {
	DWORD ELEPHANT = sizeof(TOKEN_ELEVATION); HANDLE CHEEZE = NULL;
	TOKEN_ELEVATION PIZZA;
	if (OpenProcessToken(GetConsoleWindow(), PROCESS_ALL_ACCESS, &CHEEZE)) {
		if (GetTokenInformation(CHEEZE, TokenElevation, &PIZZA, sizeof(TOKEN_ELEVATION), &ELEPHANT)) {
			return PIZZA.TokenIsElevated;
		}
	}
}


int main() {
	if (!good_coder()) {
		cout << "NOT ADMIN! :(";
	}
	else { cout << "YES! :D"; }
	HWND walrus = NULL;
	LPCSTR GAMENAMEHERE = "U CANT STEAL MY PASTE";
	while (walrus == NULL) {
		walrus = FindWindowA(NULL, GAMENAMEHERE);
		Sleep(100);
	}


	LPDWORD AMIDUMB = NULL;
	GetWindowThreadProcessId(walrus, AMIDUMB); // try &AMIDUMB and change it do DWORD, same result
// PRETEND REST OF CHEAT IS HERE
}

also sorry for stupid names, ive tried to make this project like 10 times. i need something to keep me entertained
Quote Originally Posted by vidsac View Post
Been trying to make a basic cheat, but every time I add one this one line of code, I can't do any OpenProcess/elevation requiring functions!


I encourage you to try this code yourself, all my friends get the same issue. Please tell me I'm being dumb and just have a typo


Code:
bool good_coder() {
	DWORD ELEPHANT = sizeof(TOKEN_ELEVATION); HANDLE CHEEZE = NULL;
	TOKEN_ELEVATION PIZZA;
	if (OpenProcessToken(GetConsoleWindow(), PROCESS_ALL_ACCESS, &CHEEZE)) {
		if (GetTokenInformation(CHEEZE, TokenElevation, &PIZZA, sizeof(TOKEN_ELEVATION), &ELEPHANT)) {
			return PIZZA.TokenIsElevated;
		}
	}
}


int main() {
	if (!good_coder()) {
		cout << "NOT ADMIN! :(";
	}
	else { cout << "YES! :D"; }
	HWND walrus = NULL;
	LPCSTR GAMENAMEHERE = "U CANT STEAL MY PASTE";
	while (walrus == NULL) {
		walrus = FindWindowA(NULL, GAMENAMEHERE);
		Sleep(100);
	}


	LPDWORD AMIDUMB = NULL;
	GetWindowThreadProcessId(walrus, AMIDUMB); // try &AMIDUMB and change it do DWORD, same result
// PRETEND REST OF CHEAT IS HERE
}

also sorry for stupid names, ive tried to make this project like 10 times. i need something to keep me entertained
Did you writete this code or did you paste it?
haha,
Is this bait or are you retarded?
Quote Originally Posted by jonluke View Post
haha,
Is this bait or are you retarded?
What do you mean?
Quote Originally Posted by An0m4ly_15 View Post
Did you writete this code or did you paste it?
wrote it.
btw i figured out the issue: just reading with the wrong access type
Quote Originally Posted by jonluke View Post
It looks like OP is retarded and tried pasting stuff :|

- - - Updated - - -

Legit hacking with exspensive inventory xDDDDD
http://steamcommunity.com/id/FuckOff...s/#scrollTop=0
Hope you are kidding, cuz now you got more autistic than those variables. That skin doesn't even exist.
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us