1
0
mirror of synced 2024-12-11 07:26:00 +01:00
ImHex/plugins/builtin/include/content/views/view_yara.hpp

39 lines
807 B
C++
Raw Normal View History

#pragma once
#include <hex.hpp>
#include <imgui.h>
#include <hex/ui/view.hpp>
2021-12-07 22:47:41 +01:00
namespace hex::plugin::builtin {
class ViewYara : public View {
public:
ViewYara();
~ViewYara() override;
void drawContent() override;
private:
struct YaraMatch {
std::string identifier;
std::string variable;
2022-02-02 21:08:46 +01:00
u64 address;
size_t size;
bool wholeDataMatch;
2022-02-02 21:08:46 +01:00
u32 highlightId;
};
std::vector<std::pair<std::string, std::string>> m_rules;
std::vector<YaraMatch> m_matches;
u32 m_selectedRule = 0;
2022-02-01 22:09:44 +01:00
bool m_matching = false;
std::vector<std::string> m_consoleMessages;
void reloadRules();
void applyRules();
void clearResult();
};
}