diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-09-10 18:27:20 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-09-10 18:27:20 -0300 |
| commit | 7880f4f0636cd79fa3dbab04bb862d48cf93a68e (patch) | |
| tree | ec70c60f28aea21d57aacdb76bc491448bf0398a /memscan.cc | |
| parent | 2bf0920cc573d7067e2f5dad4b108d24f5a886f9 (diff) | |
| download | ipchanger-7880f4f0636cd79fa3dbab04bb862d48cf93a68e.tar.gz ipchanger-7880f4f0636cd79fa3dbab04bb862d48cf93a68e.zip | |
fix problem when compiling in 32-bit + add license
Diffstat (limited to 'memscan.cc')
| -rw-r--r-- | memscan.cc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2,6 +2,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <inttypes.h> #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> @@ -28,7 +29,7 @@ void DebugPrintBuf(uintptr Address, const uint8 *Buffer, int Count){ int Remainder = Count % BytesPerLine; for(int i = 0; i < FullLines; i += 1){ - printf("%16llX | ", (Address + i * BytesPerLine)); + printf("%16" PRIXPTR " | ", (Address + i * BytesPerLine)); for(int j = 0; j < BytesPerLine; j += 1){ if(j > 0) putchar(' '); @@ -46,7 +47,7 @@ void DebugPrintBuf(uintptr Address, const uint8 *Buffer, int Count){ } if(Remainder > 0){ - printf("%16llX | ", (Address + FullLines * BytesPerLine)); + printf("%16" PRIXPTR " | ", (Address + FullLines * BytesPerLine)); for(int j = 0; j < BytesPerLine; j += 1){ if(j > 0) putchar(' '); @@ -225,7 +226,7 @@ int main(int argc, char **argv){ uintptr BaseAddr = 0; MEMORY_BASIC_INFORMATION Info; while(VirtualQueryEx(Process, (void*)BaseAddr, &Info, sizeof(Info)) != 0){ - if(Info.State & MEM_COMMIT && !(Info.Protect & PAGE_NOACCESS) && !(Info.Protect & PAGE_GUARD)){ + if((Info.State & MEM_COMMIT) && !(Info.Protect & PAGE_NOACCESS) && !(Info.Protect & PAGE_GUARD)){ ScanProcessMemory(Process, (uintptr)Info.BaseAddress, Info.RegionSize, Data, DataSize, ContextWindow); } BaseAddr = (uintptr)Info.BaseAddress + Info.RegionSize; |
