# uncompyle6 version 3.8.0 # Python bytecode 3.8.0 (3413) # Decompiled from: Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] # Embedded file name: not_a_like.py # Compiled at: 1995-09-28 00:18:56 # Size of source mod 2**32: 272 bytes import libnum, base64, hashlib from ctypes import *
defencrypt(text): data_xor_iv = bytearray() sbox = [] j = 0 x = y = k = 0 key = '911dcd09ad021d68780e3efed1aa8549' for i inrange(256): sbox.append(i) else: for i inrange(256): j = j + sbox[i] + ord(key[(i % len(key))]) & 255 sbox[i], sbox[j] = sbox[j], sbox[i] else: for idx in text: x = x + 1 & 255 y = y + sbox[x] & 255 sbox[x], sbox[y] = sbox[y], sbox[x] k = sbox[(sbox[x] + sbox[y] & 255)] data_xor_iv.append(idx ^ k) else: return data_xor_iv
if __name__ == '__main__': flag = input('请输入flag> ') pub_key = [19252067118061066631831653736874168743759225404757996498452383337816071866700225650384181012362739758314516273574942119597579042209488383895276825193118297972030907899188520426741919737573230050112614350868516818112742663713344658825493377512886311960823584992531185444207705213109184076273376878524090762327, 76230002233243117494160925838103007078059987783012242668154928419914737829063294895922280964326704163760912076151634681903538211391318232043295054505369037037489356790665952040424073700340441976087746298068796807069622346676856605244662923296325332812844754859450419515772460413762564695491785275009170060931] m = libnum.s2n(flag) c = str(pow(m, pub_key[0], pub_key[1])) q = b'EeJWrgtF+5ue9MRiq7drUAFPtrLATlBZMBW2CdWHRN73Hek7DPVIYDHtMIAfTcYiEV87W7poChqpyUXYI3+/zf5yyDOyE9ARLfa5qilXggu60lmQzFqvFv+1uOaeI2hs2wx+QZtxqGZzC0VCVWvbTQ52nA2UdUtnk8VezRMPMfmf7rOqPxDTv/aacLnI3RdLG2TbT52qtN4+naejI7Xe8HLOL765OZKdDBERKwd5ARQ3UL6YPbuOKOQahIFddnIX6rZ7dTNqCUDOjfJbMdrzJVDNjmNlkLNtYFo7M65Wfwj6PV5vvtT33FsmH50/YLEasnlCiJujYOgi2KCdf5msz1dPEvrXDDL6Csnjo+6m/44RzlluzcqMS5ZJFdrHEh68LIqtu+HCO+69Dyq4e22APq8wgN9kU6R8kikXSn/Ej0N/jOvomFCbkHskRl8xP1KgWFW0SMVDlaDCM4EKG812VgDWgSYOUnVhVpz65uOtg4Z8PrPI+BW4398dQYhD24D9EIPgvtmhNrHiEHouB46ElTGQgZBhtn6y9tL1sw==' v = encrypt(base64.b64encode(c.encode('utf-8'))) v = base64.b64encode(v) if v == q: print('You are right!') input('') else: print('winer winer winnie dinner') print('Do you think the encryption and decryption are the same?') # okay decompiling not_a_like.pyc