-
Notifications
You must be signed in to change notification settings - Fork 1
/
YaraCC.h
40 lines (36 loc) · 979 Bytes
/
YaraCC.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Created by matt on 07/01/19.
//
#pragma once
#include <string>
#include <vector>
#include <map>
class YaraCC {
public:
YaraCC() = default;
struct resolved_match {
long long location;
long match_length;
std::string data;
std::string string_identifier;
long data_length;
};
struct meta {
std::string identifier;
std::string data;
};
struct matched_rule {
std::string rule_name;
std::vector<resolved_match> resolved_matches;
std::vector<meta> metadata;
};
struct compile_error {
std::string message;
int line_number;
bool warning;
};
std::vector<std::string> console_logs = std::vector<std::string>();
std::vector<matched_rule> matched_rules = std::vector<matched_rule>();
std::vector<compile_error> compile_errors = std::vector<compile_error>();
};
YaraCC run(const std::string &buf_str, const std::string &rules_str);