#include <fast_filter.h>
Public Member Functions | |
| Engine () | |
| Engine (const Config &c) | |
| bool | load_patterns_file (const std::string &path) |
| bool | load_regex_file (const std::string &path) |
| bool | load_patterns_sqlite (const std::string &db_path, const std::string &table="phishing_rules") |
| Verdict | check_url (const std::string &url) |
| size_t | get_pattern_count () const |
Private Member Functions | |
| void | build_bloom (size_t n) |
Static Private Member Functions | |
| static void | trim (std::string &s) |
| static void | tolower_inplace (std::string &s) |
| static std::string | lowercase (const std::string &s) |
Private Attributes | |
| Config | cfg |
| Bloom | bloom |
| Automaton | ac |
| LRUCache | cache |
| size_t | total_patterns =0 |
Definition at line 150 of file fast_filter.h.
|
inline |
Definition at line 152 of file fast_filter.h.
|
inlineexplicit |
|
inlineprivate |
Definition at line 199 of file fast_filter.h.
References bloom, fastfilter::Config::bloom_fp_rate, cfg, and fastfilter::Bloom::init().
Referenced by load_patterns_file(), and load_patterns_sqlite().
|
inline |
Definition at line 176 of file fast_filter.h.
References fastfilter::Verdict::AC, ac, fastfilter::Verdict::BLOOM, bloom, cache, fastfilter::LRUCache::get(), lowercase(), fastfilter::Bloom::m_bits, fastfilter::Bloom::might_contain(), fastfilter::murmur3_64(), fastfilter::Verdict::NONE, fastfilter::LRUCache::put(), fastfilter::Verdict::REGEX, and fastfilter::Automaton::search_any().
|
inline |
|
inline |
Definition at line 156 of file fast_filter.h.
References ac, fastfilter::Automaton::add(), fastfilter::Bloom::add(), bloom, fastfilter::Automaton::build(), build_bloom(), tolower_inplace(), total_patterns, and trim().
|
inline |
Definition at line 207 of file fast_filter.h.
References ac, fastfilter::Automaton::add(), fastfilter::Bloom::add(), bloom, fastfilter::Automaton::build(), build_bloom(), tolower_inplace(), total_patterns, and trim().
|
inline |
Definition at line 162 of file fast_filter.h.
References trim().
|
inlinestaticprivate |
Definition at line 203 of file fast_filter.h.
References tolower_inplace().
Referenced by check_url().
|
inlinestaticprivate |
Definition at line 202 of file fast_filter.h.
Referenced by load_patterns_file(), load_patterns_sqlite(), and lowercase().
|
inlinestaticprivate |
Definition at line 201 of file fast_filter.h.
Referenced by load_patterns_file(), load_patterns_sqlite(), and load_regex_file().
|
private |
Definition at line 194 of file fast_filter.h.
Referenced by check_url(), load_patterns_file(), and load_patterns_sqlite().
|
private |
Definition at line 194 of file fast_filter.h.
Referenced by build_bloom(), check_url(), load_patterns_file(), and load_patterns_sqlite().
|
private |
Definition at line 194 of file fast_filter.h.
Referenced by check_url(), Engine(), and Engine().
|
private |
Definition at line 194 of file fast_filter.h.
Referenced by build_bloom(), Engine(), and Engine().
|
private |
Definition at line 194 of file fast_filter.h.
Referenced by get_pattern_count(), load_patterns_file(), and load_patterns_sqlite().