Update server.py

This commit is contained in:
Namhyeon Go 2024-02-21 02:11:32 +09:00 committed by GitHub
parent e3e1dc63a9
commit b0d9c7fb6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -173,7 +173,7 @@ def proxy_check_filtered(data, webserver, port, scheme, method, url):
data_length = len(data) data_length = len(data)
text = data.decode(client_encoding, errors='ignore') text = data.decode(client_encoding, errors='ignore')
error_rate = (data_length - len(text)) / data_length error_rate = (data_length - len(text)) / data_length
if error_rate > 0.9: # it is a binary data if error_rate > 0.2: # it is a binary data
return False return False
# check ID with K-Anonymity strategy # check ID with K-Anonymity strategy