-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
104 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
namespace hat { | ||
|
||
template<scan_alignment alignment> | ||
scan_result find_pattern(const signature_view signature, const hat::process::module_t mod) { | ||
const auto data = hat::process::get_module_data(mod); | ||
if (data.empty()) { | ||
return nullptr; | ||
} | ||
return find_pattern<alignment>(data.begin(), data.end(), signature); | ||
} | ||
|
||
template<scan_alignment alignment> | ||
scan_result find_pattern(const signature_view signature, const std::string_view section, const hat::process::module_t mod) { | ||
const auto data = hat::process::get_section_data(mod, section); | ||
if (data.empty()) { | ||
return nullptr; | ||
} | ||
return find_pattern<alignment>(data.begin(), data.end(), signature); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters