Reworked human readeable string search in flows

Removed fragment manager code
This commit is contained in:
Luca Deri
2021-05-17 20:55:06 +02:00
parent 1ec621c85b
commit 43a8576efb
19 changed files with 93 additions and 770 deletions
+24 -22
View File
@@ -4244,7 +4244,7 @@ int original_main(int argc, char **argv) {
#else
int main(int argc, char **argv) {
#endif
int i;
int i, skip_unit_tests = 0;
#ifdef DEBUG_TRACE
trace = fopen("/tmp/ndpiReader.log", "a");
@@ -4266,37 +4266,39 @@ int original_main(int argc, char **argv) {
return(-1);
}
if(!skip_unit_tests) {
#ifndef DEBUG_TRACE
/* Skip tests when debugging */
/* Skip tests when debugging */
#ifdef HW_TEST
hwUnitTest2();
hwUnitTest2();
#endif
#ifdef STRESS_TEST
desUnitStressTest();
exit(0);
desUnitStressTest();
exit(0);
#endif
sesUnitTest();
desUnitTest();
sesUnitTest();
desUnitTest();
/* Internal checks */
// binUnitTest();
//hwUnitTest();
jitterUnitTest();
rsiUnitTest();
hashUnitTest();
dgaUnitTest();
hllUnitTest();
bitmapUnitTest();
automataUnitTest();
analyzeUnitTest();
ndpi_self_check_host_match();
analysisUnitTest();
rulesUnitTest();
/* Internal checks */
// binUnitTest();
//hwUnitTest();
jitterUnitTest();
rsiUnitTest();
hashUnitTest();
dgaUnitTest();
hllUnitTest();
bitmapUnitTest();
automataUnitTest();
analyzeUnitTest();
ndpi_self_check_host_match();
analysisUnitTest();
rulesUnitTest();
#endif
}
gettimeofday(&startup_time, NULL);
memset(ndpi_thread_info, 0, sizeof(ndpi_thread_info));
+2 -2
View File
@@ -1477,10 +1477,10 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_SSH))
) {
if((flow->src2dst_packets+flow->dst2src_packets) < 10 /* MIN_NUM_ENCRYPT_SKIP_PACKETS */)
skip = 1;
skip = 1; /* Skip initial negotiation packets */
}
if(!skip) {
if((!skip) && ((flow->src2dst_packets+flow->dst2src_packets) < 100)) {
if(ndpi_has_human_readeable_string(workflow->ndpi_struct, (char*)packet, header->caplen,
human_readeable_string_len,
flow->human_readeable_string_buffer,