mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
Adds PE file header definitions
Defines `DosHeader` and `FileHeader` structures to represent PE file header information. Includes definitions for `MachineId` enum and `FileCharacteristics` union. These definitions are prerequisite for PE file parsing and analysis.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// Created by Vlad on 10/4/2025.
|
||||
//
|
||||
#include "omath/utility/pe_pattern_scan.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
#include <omath/utility/pattern_scan.hpp>
|
||||
#include <source_location>
|
||||
|
||||
|
||||
TEST(unit_test_pattern_scan, read_test)
|
||||
{
|
||||
const auto result = omath::PatternScanner::parse_pattern("FF ? ?? E9");
|
||||
@@ -49,6 +49,9 @@ TEST(unit_test_pattern_scan, corner_case_3)
|
||||
TEST(unit_test_pattern_scan, corner_case_4)
|
||||
{
|
||||
const auto result = omath::PatternScanner::parse_pattern("X ? ?? E9 ");
|
||||
|
||||
const auto result2 = omath::PePatternScanner::scan_for_pattern_in_file(
|
||||
std::filesystem::path{
|
||||
"C:\\Users\\Vlad\\CLionProjects\\l4bhop\\cmake-build\\build\\windows-release\\l4bhop.dll"},
|
||||
"4C 8B D1 B8 ? ? ? ? F6 04 25 ? ? ? ? ? 75 ? 0F 05 C3");
|
||||
EXPECT_FALSE(result.has_value());
|
||||
}
|
||||
Reference in New Issue
Block a user