mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
feat: Allow selected yara rules to be saved to Project file
This commit is contained in:
@@ -79,6 +79,22 @@ namespace hex::plugin::builtin {
|
||||
struct Hashes {
|
||||
std::vector<ContentRegistry::Hashes::Hash::Function> hashFunctions;
|
||||
} hashes;
|
||||
|
||||
struct Yara {
|
||||
struct YaraMatch {
|
||||
std::string identifier;
|
||||
std::string variable;
|
||||
u64 address;
|
||||
size_t size;
|
||||
bool wholeDataMatch;
|
||||
|
||||
u32 highlightId;
|
||||
u32 tooltipId;
|
||||
};
|
||||
|
||||
std::vector<std::pair<std::fs::path, std::fs::path>> rules;
|
||||
std::vector<YaraMatch> matches;
|
||||
} yara;
|
||||
};
|
||||
|
||||
static Data& getCurrent() {
|
||||
|
||||
@@ -17,19 +17,6 @@ namespace hex::plugin::builtin {
|
||||
void drawContent() override;
|
||||
|
||||
private:
|
||||
struct YaraMatch {
|
||||
std::string identifier;
|
||||
std::string variable;
|
||||
u64 address;
|
||||
size_t size;
|
||||
bool wholeDataMatch;
|
||||
|
||||
u32 highlightId;
|
||||
u32 tooltipId;
|
||||
};
|
||||
|
||||
std::vector<std::pair<std::fs::path, std::fs::path>> m_rules;
|
||||
std::vector<YaraMatch> m_matches;
|
||||
u32 m_selectedRule = 0;
|
||||
TaskHolder m_matcherTask;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user