ndpiReader: slight simplificaton of the output (#1378)

This commit is contained in:
Ivan Nardi
2021-11-27 17:32:23 +01:00
committed by GitHub
parent 320bcfafa2
commit b1e9245d94
131 changed files with 2293 additions and 2309 deletions
+1 -17
View File
@@ -1421,14 +1421,7 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
if(flow->telnet.username) fprintf(out, "[Username: %s]", flow->telnet.username);
if(flow->telnet.password) fprintf(out, "[Password: %s]", flow->telnet.password);
if((flow->detected_protocol.master_protocol != NDPI_PROTOCOL_TLS)
&& (flow->detected_protocol.app_protocol != NDPI_PROTOCOL_TLS)
&& (flow->detected_protocol.master_protocol != NDPI_PROTOCOL_QUIC)
&& (flow->detected_protocol.app_protocol != NDPI_PROTOCOL_QUIC)
&& (flow->detected_protocol.app_protocol != NDPI_PROTOCOL_SSH)
&& (flow->detected_protocol.master_protocol != NDPI_PROTOCOL_SSH)) {
if(flow->host_server_name[0] != '\0') fprintf(out, "[Host: %s]", flow->host_server_name);
}
if(flow->host_server_name[0] != '\0') fprintf(out, "[Hostname/SNI: %s]", flow->host_server_name);
if(flow->info[0] != '\0') fprintf(out, "[%s]", flow->info);
if(flow->flow_extra_info[0] != '\0') fprintf(out, "[%s]", flow->flow_extra_info);
@@ -1490,15 +1483,6 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
if(flow->ssh_tls.ssl_version != 0) fprintf(out, "[%s]", ndpi_ssl_version2str(flow->ndpi_flow, flow->ssh_tls.ssl_version, &known_tls));
if((flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS)
|| (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_TLS)
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_QUIC)
|| (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_QUIC)
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_SSH)
|| (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_SSH)) {
if(flow->host_server_name[0] != '\0') fprintf(out, "[Client: %s]", flow->host_server_name);
}
if(flow->ssh_tls.client_hassh[0] != '\0') fprintf(out, "[HASSH-C: %s]", flow->ssh_tls.client_hassh);
if(flow->ssh_tls.ja3_client[0] != '\0') fprintf(out, "[JA3C: %s%s]", flow->ssh_tls.ja3_client,