diff options
author | Toni <matzeton@googlemail.com> | 2024-05-09 15:24:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-09 15:24:11 +0200 |
commit | 18e03a26ca781490f06bfdbd34628614fcb65ca9 (patch) | |
tree | 8f2d7033aa0fe3a695134e7554c624be3e8fb472 /src/lib/protocols | |
parent | b65a755e8569d428732f54bc72f7da3ffb94a3ff (diff) |
Add extra entropy checks and more precise(?) analysis. (#2383)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/protocols')
-rw-r--r-- | src/lib/protocols/http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 8fc82dd67..c73bd47fe 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -222,8 +222,12 @@ static void ndpi_validate_http_content(struct ndpi_detection_module_struct *ndpi if(len >= 8 /* 4 chars for \r\n\r\n and at least 4 charts for content guess */) { double_ret += 4; + len -= 4; ndpi_http_check_human_redeable_content(ndpi_struct, flow, double_ret, len); + if (flow->skip_entropy_check == 0) { + flow->entropy = ndpi_entropy(double_ret, len); + } } } |