Better DGA detection (slightly decreased accuracy)

This commit is contained in:
Luca Deri
2021-03-20 17:56:24 +01:00
parent 6333bb1702
commit 627299e4dd
5 changed files with 38 additions and 39 deletions
+3 -5
View File
@@ -1444,11 +1444,9 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
#endif
if((len >= 4)
&& strcmp(&sni[len-4], ".com") /* Check if it ends in .com or .net */
&& strcmp(&sni[len-4], ".net")
&& strncmp(sni, "www.", 4)) /* Not starting with www.... */
;
else
/* Check if it ends in .com or .net */
&& ((strcmp(&sni[len-4], ".com") == 0) || (strcmp(&sni[len-4], ".net") == 0))
&& (strncmp(sni, "www.", 4) == 0)) /* Not starting with www.... */
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TOR, NDPI_PROTOCOL_TLS);
} else {
#ifdef DEBUG_TLS