Skip to content

Instantly share code, notes, and snippets.

View TechhDan's full-sized avatar
🏠
Working from home

TechhDan

🏠
Working from home
View GitHub Profile
@TechhDan
TechhDan / memscan.cpp
Last active January 30, 2024 01:46
Memory Scanner
#include <iostream>
#include <Windows.h>
#include <vector>
bool ReadMemory(HANDLE hProcess, DWORD64 address, int& value) {
SIZE_T bytesRead;
return ReadProcessMemory(hProcess, (LPCVOID)address, &value, sizeof(value), &bytesRead) && bytesRead == sizeof(value);
}
void InitialScan(HANDLE hProcess, const int targetValue, std::vector<DWORD64>& foundAddresses, const SYSTEM_INFO& si) {