Skip to content

Commit

Permalink
修复None
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Aug 29, 2023
1 parent 0c3e8b3 commit 2b66b96
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/scripts/auto_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion web_fingerprint/kong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ fingerprint:
request_data: ''
status_code: 0
headers:
X-Kong-Response-Latency: None
X-Kong-Response-Latency: '*'
keyword: []
favicon_hash: []
2 changes: 1 addition & 1 deletion web_fingerprint_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -19368,7 +19368,7 @@
"request_data": "",
"status_code": 0,
"headers": {
"X-Kong-Response-Latency": "None"
"X-Kong-Response-Latency": "*"
},
"keyword": [],
"priority": 3,
Expand Down
2 changes: 1 addition & 1 deletion web_fingerprint_v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -20904,7 +20904,7 @@
"request_data": "",
"status_code": 0,
"headers": {
"X-Kong-Response-Latency": "None"
"X-Kong-Response-Latency": "*"
},
"keyword": [],
"favicon_hash": [],
Expand Down

0 comments on commit 2b66b96

Please sign in to comment.