To maintain the green and healthy development of the network , Related encryption hidden , The code is for learning and communication only , Do not use for illegal purposes
import execjs
js = '''
..............
'''
ctx = execjs.compile(js)
def decrypt(s):
'''
Decryption function
:param s: Ciphertext
:return:
'''
return ctx.call("decrypt", s)
def encrypt(s):
'''
Encryption function
:param s: Encrypted string
:return:
'''
return ctx.call("encrypt", s)
def demo():
# Ciphertext
ens = "0THGXMwZPKbEUQC/1kYmIawK+nzKcQiAK22sXWoIekiD674vQL9sf6JyWRTwY3vgpmPbd8bHNRFloug2K8ElX93BMw8t9+bmrFuRsINBeXMQEcDyQd/JvyxhD9T2vjvuw4oSjzEt3X1mDRX8YJn7vA=="
print(decrypt(ens))
# Plaintext
data = '{"cityId":"","name":"","orderBys":[{"columnName":"","dir":0}],"page":1,"pageSize":10,"search":""}'
print(encrypt(data))
if __name__ == '__main__':
demo()
author : Zhu Han China electro
In fact, this is an article th