HelpLogger !

Posts 1–6 of 6 · Page 1 of 1
Logger !
What's wrong with my Addy Logger Code !

Code:
#include <process.h>
#include <Windows.h>
#include <fstream>
#include <iostream>
using namespace std;
using std::ofstream;
using std::ios;
using std::hex;
using std::dec;
using std::endl;

void Logger ()
{
	while(1)
	{
		if(GetModuleHandleW(L"CShell.dll") && GetModuleHandleW(L"ClientFx.fxd"))
		{
			Sleep(100);

				DWORD cshell = (DWORD)GetModuleHandleA( "CShell.dll" );
					std::ofstream file;
					file.open("Logger.txt");
		
				for(int i = 0; i < 600; i++) 
					
					{ //You can see later how many weapons there are. Then you can lower the loop.
						  DWORD wapens = *(DWORD*)(weapon +(4*i));
						  char * weaponname = (char*)(wapens + 0x0008);
						  file << "Item number: " << i << " ID: " << hex << i << " Name: " << (LPCTSTR)weaponname << ".\n";
					}
		}
	}
}

BOOL WINAPI DllMain ( HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved )
{
	if (dwReason == DLL_PROCESS_ATTACH)
	{
		DisableThreadLibraryCalls(hDll);
		file.open("myLog.txt", ios::trunc); // this line
        CreateThread(0,0,(LPTHREAD_START_ROUTINE)Func,0,0,0);
	}
	
	if ( reason == DLL_PROCESS_DETACH)
	{
		file.close;
	}
	return 0;
}
GREAT CODE
You don't close the file and you log it in an infinite loop
Quote Originally Posted by derh.acker View Post
You don't close the file and you log it in an infinite loop
don't understand ! xD
I think you can see it while crossfire is running cuz you dont save the looped things ..
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?