mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-12 22:53:27 +00:00
* added some code * improvement * visit * added scanner code * update * fixed naming * added const * added type casting * added file * patch * added unlikely * added in module scanner * fixing test * fix * remove * improvement * fix * Update source/utility/elf_pattern_scan.cpp Co-authored-by: Saikari <lin@sz.cn.eu.org> * rev * fix * patch * decomposed method * fix * fix * improvement * fix * fix * commented stuff --------- Co-authored-by: Saikari <lin@sz.cn.eu.org>
27 lines
811 B
C++
27 lines
811 B
C++
//
|
|
// Created by Vlad on 10/7/2025.
|
|
//
|
|
|
|
#pragma once
|
|
#include <cstdint>
|
|
#include <filesystem>
|
|
#include <optional>
|
|
#include <string_view>
|
|
#include "section_scan_result.hpp"
|
|
namespace omath
|
|
{
|
|
|
|
class PePatternScanner final
|
|
{
|
|
public:
|
|
[[nodiscard]]
|
|
static std::optional<std::uintptr_t>
|
|
scan_for_pattern_in_loaded_module(const void* module_base_address, const std::string_view& pattern,
|
|
const std::string_view& target_section_name = ".text");
|
|
|
|
[[nodiscard]]
|
|
static std::optional<SectionScanResult>
|
|
scan_for_pattern_in_file(const std::filesystem::path& path_to_file, const std::string_view& pattern,
|
|
const std::string_view& target_section_name = ".text");
|
|
};
|
|
} // namespace omath
|