Skip to content

Commit

Permalink
Add hints param to module section find_pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroMemes committed Jul 29, 2024
1 parent 0d9f446 commit fc8cae2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/libhat/Scanner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ namespace hat {
scan_result find_pattern(
signature_view signature,
std::string_view section,
process::module_t mod = process::get_process_module()
process::module_t mod = process::get_process_module(),
scan_hint hints = scan_hint::none
);

/// Root implementation of find_pattern
Expand Down
4 changes: 2 additions & 2 deletions include/libhat/Scanner.inl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namespace hat {
}

template<scan_alignment alignment>
scan_result find_pattern(const signature_view signature, const std::string_view section, const hat::process::module_t mod) {
scan_result find_pattern(const signature_view signature, const std::string_view section, const hat::process::module_t mod, const scan_hint hints) {
const auto data = hat::process::get_section_data(mod, section);
if (data.empty()) {
return nullptr;
}
return find_pattern<alignment>(data.begin(), data.end(), signature);
return find_pattern<alignment>(data.begin(), data.end(), signature, hints);
}
}

0 comments on commit fc8cae2

Please sign in to comment.