From 0b0f255cc2b4ef18b9c1b51cf71e86de5b2c462b Mon Sep 17 00:00:00 2001 From: Chiara Maggi <83759140+ChiaraMaggi@users.noreply.github.com> Date: Tue, 11 Jul 2023 22:45:19 +0200 Subject: added feature to extract filename from http attachment (#2037) * added feature to extract filename from http attachment * fixed some issues * added check for filename format * added check for filename format * remove an unnecessary print * changed the size from 952 to 960 * modified some test result files * small changes string size * comment removed and mallocs checked --- example/ndpiReader.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index f3daeaad6..be85bf0cc 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1769,6 +1769,9 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa if(flow->http.user_agent[0] != '\0') fprintf(out, "[User-Agent: %s]", flow->http.user_agent); + if(flow->http.filename[0] != '\0') + fprintf(out, "[Filename: %s]", flow->http.filename); + if(flow->risk) { u_int i; u_int16_t cli_score, srv_score; -- cgit v1.2.3