Add categories test PCAP
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Format: name\tcategory_id
|
||||
internetbadguys.com 100
|
||||
144.139.247.220 100
|
||||
@@ -1897,7 +1897,7 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
|
||||
int fields[4];
|
||||
|
||||
|
||||
if(verbose) printf("[Category] Loading %s\t%s\n", name, category);
|
||||
if(verbose && !quiet_mode) printf("[Category] Loading %s\t%s\n", name, category);
|
||||
|
||||
if(sscanf(name, "%d.%d.%d.%d", &fields[0], &fields[1], &fields[2], &fields[3]) == 4)
|
||||
ndpi_load_ip_category(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
READER="../example/ndpiReader -p ../example/protos.txt"
|
||||
READER="../example/ndpiReader -p ../example/protos.txt -c ../example/categories.txt"
|
||||
|
||||
RC=0
|
||||
PCAPS=`cd pcap; /bin/ls *.pcap`
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
DNS 2 216 1
|
||||
HTTP 1 66 1
|
||||
ICMP 1 98 1
|
||||
|
||||
1 UDP 192.168.7.7:42370 <-> 1.1.1.1:53 [proto: 5/DNS][cat: Malware/100][1 pkts/106 bytes <-> 1 pkts/110 bytes][Host: www.internetbadguys.com][PLAIN TEXT (internetbadguys)]
|
||||
2 ICMP 192.168.7.7:0 -> 144.139.247.220:0 [proto: 81/ICMP][cat: Malware/100][1 pkts/98 bytes -> 0 pkts/0 bytes]
|
||||
3 TCP 192.168.7.7:33706 -> 144.139.247.220:80 [proto: 7/HTTP][cat: Malware/100][1 pkts/66 bytes -> 0 pkts/0 bytes]
|
||||
Reference in New Issue
Block a user