mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 15:31:45 +00:00
Update server.py
This commit is contained in:
parent
e3e1dc63a9
commit
b0d9c7fb6b
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user