Removed some Tor false positives (more work necessary)
This commit is contained in:
@@ -19,7 +19,7 @@ static void ndpi_int_tor_add_connection(struct ndpi_detection_module_struct
|
||||
|
||||
int ndpi_is_ssl_tor(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow, char *certificate) {
|
||||
int prev_num = 0, numbers_found = 0, num_found = 0, i;
|
||||
int prev_num = 0, numbers_found = 0, num_found = 0, i, len;
|
||||
char dummy[48], *dot, *name;
|
||||
|
||||
if((certificate == NULL)
|
||||
@@ -37,6 +37,9 @@ int ndpi_is_ssl_tor(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
if((dot = strrchr(dummy, '.')) == NULL) return(0);
|
||||
name = &dot[1];
|
||||
|
||||
len = strlen(name);
|
||||
|
||||
if(len > 6) {
|
||||
for(i = 0; name[i+1] != '\0'; i++) {
|
||||
if((name[i] >= '0') && (name[i] <= '9')) {
|
||||
|
||||
@@ -73,6 +76,7 @@ int ndpi_is_ssl_tor(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user