1
0
mirror of synced 2024-11-17 20:37:13 +01:00
ImHex/plugins/builtin/include/content/views/view_yara.hpp

37 lines
770 B
C++
Raw Normal View History

#pragma once
#include <hex.hpp>
#include <imgui.h>
#include <hex/views/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;
void drawMenu() override;
private:
struct YaraMatch {
std::string identifier;
std::string variable;
i64 address;
i32 size;
bool wholeDataMatch;
};
std::vector<std::pair<std::string, std::string>> m_rules;
std::vector<YaraMatch> m_matches;
u32 m_selectedRule = 0;
bool m_matching = false;
std::vector<char> m_errorMessage;
void reloadRules();
void applyRules();
};
}