Okey, i have made 2 applications:
1x C# injector (i read that it was possible)
1x C dll file
Now, im trying to hack minesweeper(since im a noob and all). My C# application is the one doing the injection to the process MineSweeper.exe, i think its working, so i would like someone to comment my C dll please.
DLLfile:
Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
DWORD ThreadID;
int *mine1 = (int*)0x1F6C84C; //Offset for score1
int *mine2 = (int*)0x4485E8; //Offset for score1
DWORD WINAPI changeTime(LPVOID lParam) {
while(1)
{
*mine1 = 66;
*mine2 = 66;
}
ExitThread(0);
}
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
if(reason == DLL_PROCESS_ATTACH)
{
MessageBox(*(new HWND), LPWSTR("Dll Injection Successful! "), LPWSTR("Dll Injector"), MB_ICONEXCLAMATION | MB_OK);
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&changeTime, 0, 0, &ThreadID);
}
return TRUE;
}
Reason why i have 2 of the *mine (mine1 and mine2) is that i used TSearch on Minesweeper application and found that both of them yield the count on total mineflags left. (im trying to edit the number to 66 as you can see)