From 56bfb439f85b3e4054bd7c6b849a6e06e5c2ac27 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Wed, 3 Mar 2021 00:41:07 +0100 Subject: Improved DGA detection with trigrams. Disadvantage: slower startup time Reworked Tor dissector embedded in TLS (fixes #1141) Removed false positive on HTTP User-Agent --- src/lib/ndpi_utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib/ndpi_utils.c') diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 75f7b903d..8c2af79da 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -2450,3 +2450,12 @@ int ndpi_hash_add_entry(ndpi_str_hash *h, char *key, u_int8_t key_len, u_int8_t return(0); } +/* ******************************************************************** */ + +void ndpi_set_risk(struct ndpi_flow_struct *flow, ndpi_risk_enum r) { + u_int32_t v = 1 << r; + + // NDPI_SET_BIT(flow->risk, (u_int32_t)r); + flow->risk |= v; + +} -- cgit v1.2.3