Weapon Logger

Posts 1–9 of 9 · Page 1 of 1
Weapon Logger
I found in ollydbg the string WeaponName and i noticed that the name of the weapon is stored at weaponptr + 0x8. So i decided to make a weapon logger but it won't work, my program shuts down when i press the hotkey to output the names, it says that it stopped responding. Here is my loop that does it:

Code:
while(true)
	{
	if(GetAsyncKeyState(VK_NUMPAD1)&1)
		{
			
			
			for(int i = 0; i<512; i++)
			{
			
			if(((*(DWORD*)((*(DWORD*)(base +  0xA314B0 ) + (4*i))) != NULL)))  weaponname = (char*)((*(DWORD*)((*(DWORD*) (base + 0xA314B0)) + (4*i))) + 0x8);
			cout<<weaponname<<"\n";
		   
			}
		
		}
	}
Any idea of what i am doing wrong?
Please, can someone tell me what's wrong?
Just log them into file
Code:
//some globals
#include <fstream>
using namespace std;
ofstream ofile;	
char dlldir[320];
char* GetDirectoryFile(char* filename)
{
	char path[320];
	strcpy(path, dlldir);
	strcat(path, filename);
	return path;
}

//in your dllmain (under DLL_PROCESS_ATTACH)
GetModuleFileNameA(hDll, dlldir, 512);
		for(int i = strlen(dlldir); i > 0; i--) { if(dlldir[i] == '\\') { dlldir[i+1] = 0; break; } }
		ofile.open(GetDirectoryFile("Weapon Log.txt"), ios::app);

//in dllmain (under DLL_PROCESS_DETACH)
ofile.close();

//in weapon loop
char* WepName = (char*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + 8);

ofile << "index: " << i << " name: " << WepName << "\n";
easy isn't it?
thanks giniyat. It turns out that my problem was that i put myfile.close(), at the wrong spot so the anti hack sensed memory change, i already had all the code though. Thanks for your help.
Quote Originally Posted by giniyat101 View Post
//in weapon loop
char* WepName = (char*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + 8);

ofile << "index: " << i << " name: " << WepName << "\n";
what is the 8?
Quote Originally Posted by AwesomeHacker96 View Post
what is the 8?
weapon name.
Quote Originally Posted by giniyat101 View Post
//in weapon loop
char* WepName = (char*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + 8);
then the (4*i) are offset or value??
lolz ThreadStarted 1 year ago )
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us