def make_zerobin_payload(string_content):
compress = zlib.compressobj(
0, zlib.DEFLATED, -zlib.MAX_WBITS, zlib.DEF_MEM_LEVEL, 4)
compressed_data = compress.compress(bytes(mangle_string(string_content)))
compressed_data += compress.flush()
encoded_data = base64.b64encode(compressed_data)
key = os.urandom(32)
encoded_key = base64.urlsafe_b64encode(key)
encrypted_data = sjcl.SJCL().encrypt(encoded_data, encoded_key)
return encrypted_data, encoded_key
评论列表
文章目录