Send Error Report

Posts 1–8 of 8 · Page 1 of 1
Send Error Report
Here's kind of a mini intro for me cuz none of you probably know me. I am a c++ programmer that has been programming for over a year now, and i have made some pretty cool hacks for assault cube, but it got boring since i don't get a rush when hacking anymore because it's just too easy. I need something to challenge me, so that's when i decided that i need to find something more challenging. Something with an anti cheat, like crossfire. I tried to make just a simple no fall damage hack, but there are some problems (which is good because it means i will learn something new shortly). So without further a do:


Ok so here is my code that i just wrote for no fall damage:



Code:
#include <Windows.h>
#include <iostream>
using namespace std;

void hack();

#define base (DWORD) GetModuleHandleA("CShell.dll")
#define NoFallDamageoffset 0xA2A7CC

DWORD *nfd = (DWORD*) (base + NoFallDamageoffset);






void hack()
{
	
	while(true)
	{
		if(GetAsyncKeyState(VK_NUMPAD1)&1)
		{
		*nfd = 0;
		}		
	
	
		
	}
}


BOOL _stdcall DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved)
{
	switch(reason)
	{
	case DLL_PROCESS_ATTACH:
		MessageBoxA(NULL, "Mikey's First Crossfire Hack.", "Finally I hacked crossfire.", MB_OK);
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)hack, NULL, NULL, NULL);
		break;
	}
	return true;
}
I don't understand why it isn't working. When i press 1 it closes game and asks me if i wanted to send an error report. It's frustrating, but i am pretty sure someone knows what i am doing wrong. I would greatly appreciate it if somebody pointed out my mistake. Thanks in advance.
LOL , man , totally wrong !
Quote Originally Posted by PrimeLove. View Post
LOL , man , totally wrong !
Would you care to explain what you mean by wrong? Saying wrong isn't helping. I already know that something is wrong, that's the reason why i posted here. Thank you.
just add a check for a valid pointer

Code:
for (;(base) == NULL; Sleep(100));

if ((base + NoFallDamageoffset))
        if (nfd)
                *nfd = 0;
not sure if it is going to work.

@258456
Oh, okay, so the theory is that i am writing to memory that isn't there? Well, ok i will add a check to it and report back.
well the same problem is occuring, but atleast i know that the addie exists. I am still curious as to how i could make this work.
Nevermind guys, I fixed it, the problem was the way I was dereferencing it. Thx for ur ur input giniyat, checking if the pointer is valid is a smart idea that I will be using from now on.
Quote Originally Posted by 258456 View Post
Nevermind guys, I fixed it, the problem was the way I was dereferencing it. Thx for ur ur input giniyat, checking if the pointer is valid is a smart idea that I will be using from now on.
@258456
always check if the pointer is valid.
as you see i waited for CShell first, then checked the pointer.

and i see it is solved.
@Jacket
@Shane
@Jigsaw // lol you are post banned again??
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us