2019-03-21 20:18:31 +01:00
|
|
|
#pragma once
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "fwddec.hpp"
|
|
|
|
#include "handle.hpp"
|
|
|
|
|
2019-03-21 20:18:31 +01:00
|
|
|
#include <cstdint>
|
|
|
|
#include <optional>
|
|
|
|
#include <string_view>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace memory
|
|
|
|
{
|
|
|
|
class pattern
|
|
|
|
{
|
|
|
|
friend pattern_batch;
|
|
|
|
friend range;
|
2023-03-01 21:27:15 +00:00
|
|
|
|
2019-03-21 20:18:31 +01:00
|
|
|
public:
|
|
|
|
pattern(std::string_view ida_sig);
|
2023-03-01 21:27:15 +00:00
|
|
|
explicit pattern(const void* bytes, std::string_view mask);
|
2019-03-21 20:18:31 +01:00
|
|
|
|
|
|
|
inline pattern(const char* ida_sig) :
|
2023-03-01 21:27:15 +00:00
|
|
|
pattern(std::string_view(ida_sig))
|
|
|
|
{
|
|
|
|
}
|
2022-11-12 18:35:28 +00:00
|
|
|
|
2023-07-20 22:46:32 +02:00
|
|
|
std::vector<std::optional<uint8_t>> m_bytes;
|
2019-03-21 20:18:31 +01:00
|
|
|
};
|
|
|
|
}
|