Python 代码翻译:解密加密算法
import base64\nimport string\n\ndef check():\n pass\n\ndef init():\n pass\n\ndef fun():\n pass\n\ndef encrypt1():\n pass\n\ndef encrypt2():\n pass\n\ndef encrypt():\n pass\n\nif name == "main":\n key = input('Please input your key:')\n if check(key) == 1:\n print('Right!')\n else:\n print('Wrong!')\n exit()\n\n msg = input('Please input your message:')\n box = init(key)\n encode = encrypt(msg, box)\n\n string1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n string2 = 'YRiAOe4PlGvxaCoNj2ZgX+q8t/5Em6IUpM9FrVb7BKwsT1n3fSydhDWuQHJ0ckzL'\n\n encode = base64.b64encode(bytes(encode)).decode().translate(str.maketrans(string1, string2))\n\n if encode == 'mWGFL24R/RSZY3pzK9H4FOmFOnXJKyCjXWbZ7Ijy11GbCBukDrjsiPPFiYB=':\n print('Congraduation!You get the right flag!')\n else:\n print('Wrong!')\n return None
原文地址: https://www.cveoy.top/t/topic/qvHi 著作权归作者所有。请勿转载和采集!