2023-12-23 21:09:41 +01:00
|
|
|
#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;
|
|
|
|
|
2024-02-21 23:17:12 +01:00
|
|
|
namespace hex::plugin::yara {
|
2023-12-23 21:09:41 +01:00
|
|
|
|
2024-02-21 23:17:12 +01:00
|
|
|
void registerDataInformationSections();
|
2023-12-23 21:09:41 +01:00
|
|
|
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();
|
2024-02-21 23:17:12 +01:00
|
|
|
registerDataInformationSections();
|
2023-12-23 21:09:41 +01:00
|
|
|
}
|