Check DGA on domain name (as it should be) rather than on the host name

This commit is contained in:
Luca Deri
2024-01-27 20:46:00 +01:00
parent 7a7df2b7d7
commit ec83a592b8
+4
View File
@@ -10061,6 +10061,10 @@ static int ndpi_is_vowel(char c) {
int ndpi_check_dga_name(struct ndpi_detection_module_struct *ndpi_str,
struct ndpi_flow_struct *flow,
char *name, u_int8_t is_hostname, u_int8_t check_subproto) {
/* Get domain name if ndpi_load_domain_suffixes(..) has been called */
name = (char*)ndpi_get_host_domain(ndpi_str, name);
if(ndpi_dga_function != NULL) {
/* A custom DGA function is defined */
int rc = ndpi_dga_function(name, is_hostname);