From 2b66b96378d8fa580a22023c798ff8bfdeb7a47e Mon Sep 17 00:00:00 2001 From: cn-kali-team Date: Tue, 29 Aug 2023 10:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DNone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/scripts/auto_update.py | 7 ++++++- web_fingerprint/kong.yaml | 2 +- web_fingerprint_v2.json | 2 +- web_fingerprint_v3.json | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/scripts/auto_update.py b/.github/scripts/auto_update.py index d22471f93..e58e2877f 100644 --- a/.github/scripts/auto_update.py +++ b/.github/scripts/auto_update.py @@ -57,12 +57,17 @@ def valid_fingerprint_v3(rule): 'headers': 5, 'keyword': 6, 'favicon_hash': 7, 'priority': 8} fields = {'path': '/', 'status_code': 0, 'keyword': [], 'headers': {}, 'favicon_hash': [], 'priority': 1, 'request_method': 'get', 'request_headers': {}, 'request_data': ''} + # 弹出无关的字段 for key in list(rule): if key not in fields: rule.pop(key) headers = rule.get("headers", {}) # 转字符串 for k in list(headers): - headers[k] = str(headers[k]) + v = headers.pop(k) + if v is None or v == "None": + headers[k] = "*" + else: + headers[k] = str(v) rule["headers"] = headers for key in fields: if key not in rule: diff --git a/web_fingerprint/kong.yaml b/web_fingerprint/kong.yaml index a539cdb81..8980fcae2 100644 --- a/web_fingerprint/kong.yaml +++ b/web_fingerprint/kong.yaml @@ -27,6 +27,6 @@ fingerprint: request_data: '' status_code: 0 headers: - X-Kong-Response-Latency: None + X-Kong-Response-Latency: '*' keyword: [] favicon_hash: [] diff --git a/web_fingerprint_v2.json b/web_fingerprint_v2.json index 4d1cee182..cb4078430 100644 --- a/web_fingerprint_v2.json +++ b/web_fingerprint_v2.json @@ -19368,7 +19368,7 @@ "request_data": "", "status_code": 0, "headers": { - "X-Kong-Response-Latency": "None" + "X-Kong-Response-Latency": "*" }, "keyword": [], "priority": 3, diff --git a/web_fingerprint_v3.json b/web_fingerprint_v3.json index 7e5000cee..182fb263f 100644 --- a/web_fingerprint_v3.json +++ b/web_fingerprint_v3.json @@ -20904,7 +20904,7 @@ "request_data": "", "status_code": 0, "headers": { - "X-Kong-Response-Latency": "None" + "X-Kong-Response-Latency": "*" }, "keyword": [], "favicon_hash": [],