Enhanced DHCP fingerprint

Exported it with -E
This commit is contained in:
Luca Deri 2024-09-15 20:21:32 +02:00
parent fda3730cf0
commit b77d3e3ab6
3 changed files with 31 additions and 12 deletions

View file

@ -1057,8 +1057,19 @@ static void dump_raw_fingerprint(struct ndpi_workflow * workflow,
/* ****************************************************** */
static void dump_flow_fingerprint(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow) {
if(flow->ndpi_flow->protos.tls_quic.ja4_client_raw != NULL)
dump_raw_fingerprint(workflow, flow, "JA4r", flow->ndpi_flow->protos.tls_quic.ja4_client_raw);
if(is_ndpi_proto(flow, NDPI_PROTOCOL_TLS) || is_ndpi_proto(flow, NDPI_PROTOCOL_QUIC)) {
if(flow->ndpi_flow->protos.tls_quic.ja4_client_raw != NULL)
dump_raw_fingerprint(workflow, flow, "JA4r", flow->ndpi_flow->protos.tls_quic.ja4_client_raw);
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_DHCP)
&& (flow->ndpi_flow->protos.dhcp.fingerprint[0] != '\0')) {
char buf[256];
snprintf(buf, sizeof(buf), "%s_%s",
flow->ndpi_flow->protos.dhcp.options,
flow->ndpi_flow->protos.dhcp.fingerprint);
dump_raw_fingerprint(workflow, flow, "DHCP_r", buf);
}
}
/* ****************************************************** */