Normalization of host_server_name (#2299)
* Normalization of host_server_name The ndpi_hostname_sni_set() function replaces all non-printable characters with the "?" character and removing whitespace characters at the end of the line. * Added conditional hostname normalization.
This commit is contained in:
@@ -42,7 +42,7 @@ static void ndpi_search_whois_das(struct ndpi_detection_module_struct *ndpi_stru
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_WHOIS_DAS, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
|
||||
|
||||
if((dport == 43) || (dport == 4343)) { /* Request */
|
||||
ndpi_hostname_sni_set(flow, &packet->payload[0], packet->payload_packet_len - 2); /* Skip \r\n */
|
||||
ndpi_hostname_sni_set(flow, &packet->payload[0], packet->payload_packet_len - 2, NDPI_HOSTNAME_NORM_ALL); /* Skip \r\n */
|
||||
NDPI_LOG_INFO(ndpi_struct, "[WHOIS/DAS] %s\n", flow->host_server_name);
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user