Skip to content

Commit 4018411

Browse files
committed
filter-out ja4-fingerprints of bad-requests
1 parent 30e2f4e commit 4018411

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/riskdb/builder/obj/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(self, raw: dict, reporters: list[Reporter]):
1515
self.user_agent = raw.get('ua', '')
1616
self.fingerprint_ja4 = raw.get('ja4', '')
1717

18-
if JA4_REGEX.match(self.fingerprint_ja4) is None:
18+
if JA4_REGEX.match(self.fingerprint_ja4) is None or self.fingerprint_ja4.startswith('d00'):
1919
self.fingerprint_ja4 = ''
2020

2121
self.reporter = self._init_reporter(token=raw['token'], reporters=reporters)

src/riskdb/lister/other_user_agent_ja4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def list_user_agents_ja4(tmp_dir: Path):
2626
ua_list.append(ua)
2727

2828
ja4 = r.get('ja4', None)
29-
if ja4 is not None:
29+
if ja4 is not None and ja4.strip() != '' and not ja4.startswith('d00'):
3030
if ja4 in ja4_ua:
3131
ja4_ua[ja4].append(ua.replace(',', ';'))
3232

0 commit comments

Comments
 (0)