JA3 debug improvements

This commit is contained in:
Luca Deri
2021-03-19 19:10:31 +01:00
parent 9eed0a60d3
commit 61f7ec1696
+6 -4
View File
@@ -39,9 +39,11 @@ extern int is_version_with_var_int_transport_params(uint32_t version);
// #define DEBUG_TLS_MEMORY 1 // #define DEBUG_TLS_MEMORY 1
// #define DEBUG_TLS 1 // #define DEBUG_TLS 1
// #define DEBUG_TLS_BLOCKS 1 // #define DEBUG_TLS_BLOCKS 1
// #define DEBUG_CERTIFICATE_HASH // #define DEBUG_CERTIFICATE_HASH
// #define DEBUG_JA3C 1
/* #define DEBUG_FINGERPRINT 1 */ /* #define DEBUG_FINGERPRINT 1 */
/* #define DEBUG_ENCRYPTED_SNI 1 */ /* #define DEBUG_ENCRYPTED_SNI 1 */
@@ -1706,8 +1708,8 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc; if(rc > 0 && ja3_str_len + rc < JA3_STR_LEN) ja3_str_len += rc;
} }
#ifdef DEBUG_TLS #ifdef DEBUG_JA3C
printf("[JA3] Client: %s \n", ja3_str); printf("[JA3+] Client: %s \n", ja3_str);
#endif #endif
ndpi_MD5Init(&ctx); ndpi_MD5Init(&ctx);
@@ -1721,7 +1723,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
if(rc > 0) j += rc; else break; if(rc > 0) j += rc; else break;
} }
#ifdef DEBUG_TLS #ifdef DEBUG_JA3C
printf("[JA3] Client: %s \n", flow->protos.tls_quic_stun.tls_quic.ja3_client); printf("[JA3] Client: %s \n", flow->protos.tls_quic_stun.tls_quic.ja3_client);
#endif #endif