diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2021-11-27 17:32:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-27 17:32:23 +0100 |
commit | b1e9245d946533054e22c39370599b2d7c86c306 (patch) | |
tree | bf88c46440238ecdf7d5c6aad747c54d30405f49 /example | |
parent | 320bcfafa227de7f98e972fcda5a32055b036477 (diff) |
ndpiReader: slight simplificaton of the output (#1378)
Diffstat (limited to 'example')
-rw-r--r-- | example/ndpiReader.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 0938de127..cbcbec881 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -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, |