aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-04-11 13:36:26 +0200
committerToni Uhlig <matzeton@googlemail.com>2024-05-09 13:43:12 +0200
commitf8f669a7ce92da582f0dbef7337639bf060ef47d (patch)
tree8f2d7033aa0fe3a695134e7554c624be3e8fb472 /src/lib/protocols
parentb65a755e8569d428732f54bc72f7da3ffb94a3ff (diff)
Add extra entropy checks and more precise(?) analysis.add/more-and-detailed-entropy-checks
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/http.c4
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);
+ }
}
}