diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-03-15 17:54:56 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-03-15 17:54:56 +0100 |
commit | 64d3fae55148a333739260fcff83f24b0d25293a (patch) | |
tree | 03057c0b78e93bdfbc0dc5d23ee698dead2ceebb /MemDriverLib | |
parent | 48dc2c110bfba0803c8938def50935db844d9ba6 (diff) |
added address scan for PatternScanner
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'MemDriverLib')
-rw-r--r-- | MemDriverLib/PatternScanner.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/MemDriverLib/PatternScanner.cpp b/MemDriverLib/PatternScanner.cpp index 0e98c10..aa54a9b 100644 --- a/MemDriverLib/PatternScanner.cpp +++ b/MemDriverLib/PatternScanner.cpp @@ -214,4 +214,19 @@ bool PatternScanner::Scan(MODULE_DATA& module, const char * const pattern, std:: } return result; +} + +bool PatternScanner::ScanForAddress(HANDLE targetPID, MODULE_DATA& module, PatternScanner *pscan, const char * const pattern, std::function<bool(SIZE_T)> callback) +{ + std::vector<SIZE_T> foundAddresses; + + pscan->Scan(module, "48 8B 48 20 48 8B 01 FF 90 20 01 00 00", foundAddresses); + + for (auto& addr : foundAddresses) { + if (callback(addr)) { + return true; + } + } + + return false; }
\ No newline at end of file |