mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
added pe pattern scan
This commit is contained in:
@@ -26,7 +26,7 @@ namespace omath
|
||||
{
|
||||
INVALID_PATTERN_STRING
|
||||
};
|
||||
class PatternScanner
|
||||
class PatternScanner final
|
||||
{
|
||||
friend unit_test_pattern_scan_read_test_Test;
|
||||
friend unit_test_pattern_scan_corner_case_1_Test;
|
||||
|
||||
22
include/omath/utility/pe_pattern_scan.hpp
Normal file
22
include/omath/utility/pe_pattern_scan.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by Vlad on 10/7/2025.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
#include <filesystem>
|
||||
namespace omath
|
||||
{
|
||||
class PePatternScanner final
|
||||
{
|
||||
public:
|
||||
[[nodiscard]]
|
||||
static std::optional<std::uintptr_t> scan_for_pattern_in_loaded_module(const std::string_view& module_name,
|
||||
const std::string_view& pattern);
|
||||
|
||||
[[nodiscard]]
|
||||
static std::optional<std::uintptr_t> scan_for_pattern_in_file(const std::filesystem::path& path_to_file);
|
||||
};
|
||||
} // namespace omath
|
||||
Reference in New Issue
Block a user