From ee63b260838abf52b803dbaa51d30ce45dc9f68b Mon Sep 17 00:00:00 2001 From: Timothy Noel Date: Wed, 24 Jan 2024 14:01:14 -0500 Subject: [PATCH] fix for #40 --- python/common.py | 2 +- python/ja4.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/python/common.py b/python/common.py index 45ec5c2..9103f06 100644 --- a/python/common.py +++ b/python/common.py @@ -106,7 +106,7 @@ def get_hex_sorted(entry, field, sort=True): actual_length = len(c) # now remove SNI and ALPN values - if field == 'extensions': + if field == 'extensions' and sort: c = [ x for x in c if x not in ['0000', '0010']] c.sort() if sort else None diff --git a/python/ja4.py b/python/ja4.py index 648543d..dbd5189 100644 --- a/python/ja4.py +++ b/python/ja4.py @@ -213,9 +213,6 @@ def to_ja4(x, debug_stream): cache_update(x, 'client_ciphers', x['ciphers'], debug_stream) x['signature_algorithms'] = [ y[2:] for y in get_signature_algorithms(x) ] - - # ignore SNI and ALPN extensions - x['extensions'] = [ x for x in x['extensions'] if x not in ['0x0000', '0x0010'] ] cache_update(x, 'client_extensions', x['extensions'], debug_stream) # Modified to include original rendering