base64

import base64

query = 'banner="Proxy-Agent: Privoxy" && country!="CN"'
print(query)
bytes_url = query.encode("utf-8")
base64_str = base64.b64encode(bytes_url).decode()
print(base64_str)  # YmFubmVyPSJQcm94eS1BZ2VudDogUHJpdm94eSIgJiYgY291bnRyeSE9IkNOIg==

bytes_str = base64.b64decode(base64_str)
print(bytes_str) # b'banner="Proxy-Agent: Privoxy" && country!="CN"'
str = bytes_str.decode(encoding='utf-8')
print(str) # banner="Proxy-Agent: Privoxy" && country!="CN"

更新参考

作者:海马  创建时间:2023-06-10 16:19
最后编辑:海马  更新时间:2026-02-10 17:26
上一篇:
下一篇: