From f632a082a92c790447cb602cd1af2e2e2661ee0b Mon Sep 17 00:00:00 2001 From: Nardi Ivan Date: Fri, 27 Sep 2024 08:51:09 +0200 Subject: [PATCH] Fix unit tests --- .../pcap/bot.pcap | 0 .../result/bot.pcap.out | 4 ++-- .../pcap/iphone.pcap | 0 .../result/iphone.pcap.out | 22 ++++++++++--------- 4 files changed, 14 insertions(+), 12 deletions(-) rename tests/cfgs/{disable_use_client_port => disable_use_client_ip}/pcap/bot.pcap (100%) rename tests/cfgs/{disable_use_client_port => disable_use_client_ip}/result/bot.pcap.out (53%) rename tests/cfgs/{disable_use_client_ip => disable_use_client_port}/pcap/iphone.pcap (100%) rename tests/cfgs/{disable_use_client_ip => disable_use_client_port}/result/iphone.pcap.out (97%) diff --git a/tests/cfgs/disable_use_client_port/pcap/bot.pcap b/tests/cfgs/disable_use_client_ip/pcap/bot.pcap similarity index 100% rename from tests/cfgs/disable_use_client_port/pcap/bot.pcap rename to tests/cfgs/disable_use_client_ip/pcap/bot.pcap diff --git a/tests/cfgs/disable_use_client_port/result/bot.pcap.out b/tests/cfgs/disable_use_client_ip/result/bot.pcap.out similarity index 53% rename from tests/cfgs/disable_use_client_port/result/bot.pcap.out rename to tests/cfgs/disable_use_client_ip/result/bot.pcap.out index 5088cfbdf6c..1a9f583a5f3 100644 --- a/tests/cfgs/disable_use_client_port/result/bot.pcap.out +++ b/tests/cfgs/disable_use_client_ip/result/bot.pcap.out @@ -17,11 +17,11 @@ Patricia risk mask: 2/0 (search/found) Patricia risk mask IPv6: 0/0 (search/found) Patricia risk: 1/1 (search/found) Patricia risk IPv6: 0/0 (search/found) -Patricia protocols: 2/1 (search/found) +Patricia protocols: 1/0 (search/found) Patricia protocols IPv6: 0/0 (search/found) HTTP 402 431124 1 Acceptable 402 431124 1 - 1 TCP 40.77.167.36:64768 <-> 89.31.72.220:80 [VLAN: 77][proto: 7/HTTP][IP: 276/Azure][ClearText][Confidence: DPI][FPC: 276/Azure, Confidence: IP address][DPI packets: 6][cat: Web/5][115 pkts/7672 bytes <-> 287 pkts/423452 bytes][Goodput ratio: 4/96][5.66 sec][Hostname/SNI: atlanteditorino.it][bytes ratio: -0.964 (Download)][IAT c2s/s2c min/avg/max/stddev: 0/0 58/3 4532/106 489/16][Pkt Len c2s/s2c min/avg/max/stddev: 64/64 67/1475 374/1498 29/171][URL: atlanteditorino.it/quartieri/img/S.Donato_M.Vittoria1930_B.jpg][StatusCode: 200][Content-Type: image/jpeg][Server: Apache][User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)][Risk: ** Crawler/Bot **][Risk Score: 10][Risk Info: UA Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/b][PLAIN TEXT (GET /quartieri/im)][Plen Bins: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0] + 1 TCP 40.77.167.36:64768 <-> 89.31.72.220:80 [VLAN: 77][proto: 7/HTTP][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 0/Unknown, Confidence: Unknown][DPI packets: 6][cat: Web/5][115 pkts/7672 bytes <-> 287 pkts/423452 bytes][Goodput ratio: 4/96][5.66 sec][Hostname/SNI: atlanteditorino.it][bytes ratio: -0.964 (Download)][IAT c2s/s2c min/avg/max/stddev: 0/0 58/3 4532/106 489/16][Pkt Len c2s/s2c min/avg/max/stddev: 64/64 67/1475 374/1498 29/171][URL: atlanteditorino.it/quartieri/img/S.Donato_M.Vittoria1930_B.jpg][StatusCode: 200][Content-Type: image/jpeg][Server: Apache][User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)][Risk: ** Crawler/Bot **][Risk Score: 10][Risk Info: UA Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/b][PLAIN TEXT (GET /quartieri/im)][Plen Bins: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0] diff --git a/tests/cfgs/disable_use_client_ip/pcap/iphone.pcap b/tests/cfgs/disable_use_client_port/pcap/iphone.pcap similarity index 100% rename from tests/cfgs/disable_use_client_ip/pcap/iphone.pcap rename to tests/cfgs/disable_use_client_port/pcap/iphone.pcap diff --git a/tests/cfgs/disable_use_client_ip/result/iphone.pcap.out b/tests/cfgs/disable_use_client_port/result/iphone.pcap.out similarity index 97% rename from tests/cfgs/disable_use_client_ip/result/iphone.pcap.out rename to tests/cfgs/disable_use_client_port/result/iphone.pcap.out index 78232d523ea..3e2e47ea1e8 100644 --- a/tests/cfgs/disable_use_client_ip/result/iphone.pcap.out +++ b/tests/cfgs/disable_use_client_port/result/iphone.pcap.out @@ -1,9 +1,7 @@ -Guessed flow protos: 1 - DPI Packets (TCP): 107 (7.13 pkts/flow) DPI Packets (UDP): 55 (1.77 pkts/flow) DPI Packets (other): 5 (1.00 pkts/flow) -Confidence Match by port : 1 (flows) +Confidence Unknown : 1 (flows) Confidence DPI : 50 (flows) Num dissector calls: 356 (6.98 diss/flow) LRU cache ookla: 0/0/0 (insert/search/found) @@ -22,9 +20,10 @@ Patricia risk mask: 42/0 (search/found) Patricia risk mask IPv6: 0/0 (search/found) Patricia risk: 1/0 (search/found) Patricia risk IPv6: 5/0 (search/found) -Patricia protocols: 46/10 (search/found) -Patricia protocols IPv6: 5/0 (search/found) +Patricia protocols: 82/10 (search/found) +Patricia protocols IPv6: 10/0 (search/found) +Unknown 2 120 1 MDNS 17 7012 5 SSDP 2 336 2 DHCP 9 3078 2 @@ -36,11 +35,11 @@ Apple 150 55443 17 AppleiCloud 217 127654 9 AppleiTunes 74 25151 8 Spotify 2 172 1 -NAT-PMP 2 120 1 Safe 150 55443 17 -Acceptable 260 140186 25 +Acceptable 258 140066 24 Fun 76 25323 9 +Unrated 2 120 1 JA3 Host Stats: IP Address # JA3C @@ -95,6 +94,9 @@ JA3 Host Stats: 46 UDP 169.254.225.216:60538 -> 239.255.255.250:1900 [proto: 12/SSDP][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 12/SSDP, Confidence: DPI][DPI packets: 1][cat: System/18][1 pkts/168 bytes -> 0 pkts/0 bytes][Goodput ratio: 75/0][< 1 sec][Hostname/SNI: 239.255.255.250:1900][PLAIN TEXT (SEARCH )][Plen Bins: 0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 47 UDP 192.168.2.1:51411 -> 239.255.255.250:1900 [proto: 12/SSDP][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 12/SSDP, Confidence: DPI][DPI packets: 1][cat: System/18][1 pkts/168 bytes -> 0 pkts/0 bytes][Goodput ratio: 75/0][< 1 sec][Hostname/SNI: 239.255.255.250:1900][PLAIN TEXT (SEARCH )][Plen Bins: 0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 48 ICMPV6 [fe80::823:3f17:8298:a29c]:0 -> [ff02::2]:0 [proto: 102/ICMPV6][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 102/ICMPV6, Confidence: DPI][DPI packets: 1][cat: Network/14][2 pkts/132 bytes -> 0 pkts/0 bytes][Goodput ratio: 6/0][4.21 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - 49 UDP 192.168.2.1:5351 -> 224.0.0.1:5350 [proto: 312/NAT-PMP][IP: 0/Unknown][ClearText][Confidence: Match by port][FPC: 0/Unknown, Confidence: Unknown][DPI packets: 2][cat: Network/14][2 pkts/120 bytes -> 0 pkts/0 bytes][Goodput ratio: 30/0][< 1 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - 50 ICMPV6 [::]:0 -> [ff02::1:ff98:a29c]:0 [proto: 102/ICMPV6][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 102/ICMPV6, Confidence: DPI][DPI packets: 1][cat: Network/14][1 pkts/86 bytes -> 0 pkts/0 bytes][Goodput ratio: 28/0][< 1 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - 51 IGMP 192.168.2.17:0 -> 224.0.0.22:0 [proto: 82/IGMP][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 82/IGMP, Confidence: DPI][DPI packets: 1][cat: Network/14][1 pkts/54 bytes -> 0 pkts/0 bytes][Goodput ratio: 0/0][< 1 sec][Plen Bins: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 49 ICMPV6 [::]:0 -> [ff02::1:ff98:a29c]:0 [proto: 102/ICMPV6][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 102/ICMPV6, Confidence: DPI][DPI packets: 1][cat: Network/14][1 pkts/86 bytes -> 0 pkts/0 bytes][Goodput ratio: 28/0][< 1 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 50 IGMP 192.168.2.17:0 -> 224.0.0.22:0 [proto: 82/IGMP][IP: 0/Unknown][ClearText][Confidence: DPI][FPC: 82/IGMP, Confidence: DPI][DPI packets: 1][cat: Network/14][1 pkts/54 bytes -> 0 pkts/0 bytes][Goodput ratio: 0/0][< 1 sec][Plen Bins: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + + +Undetected flows: + 1 UDP 192.168.2.1:5351 -> 224.0.0.1:5350 [proto: 0/Unknown][IP: 0/Unknown][ClearText][Confidence: Unknown][FPC: 0/Unknown, Confidence: Unknown][DPI packets: 2][2 pkts/120 bytes -> 0 pkts/0 bytes][Goodput ratio: 30/0][< 1 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]