1
0
mirror of synced 2024-11-13 18:50:53 +01:00
ImHex/plugins/yara_rules/source/plugin_yara.cpp

28 lines
638 B
C++

#include <hex/plugin.hpp>
#include <hex/api/content_registry.hpp>
#include <hex/helpers/logger.hpp>
#include <romfs/romfs.hpp>
#include "content/views/view_yara.hpp"
using namespace hex;
using namespace hex::plugin::yara;
namespace {
void registerViews() {
ContentRegistry::Views::add<ViewYara>();
}
}
IMHEX_PLUGIN_SETUP("Yara Rules", "WerWolv", "Support for matching Yara rules") {
hex::log::debug("Using romfs: '{}'", romfs::name());
for (auto &path : romfs::list("lang"))
hex::ContentRegistry::Language::addLocalization(nlohmann::json::parse(romfs::get(path).string()));
registerViews();
}