from base64 import * b64_cipher = "igdydo19TVE13ogW1AT5DgjPzHwPDQle1X7kS8TzHK8S5KCu9mnJ0uCnAQ4aV3CSYUl6QycpibWSLmq m2y/GqW6PNJBZ/C2RZuu+DfQFCxvLGHT5goG8BNl1ji2XB3x9GMg9T8Clatc=" b64_key = "3F8gIsJ5GVY12otH0xn8VRTN0ntYWQlC3iy0SNnyG6lA4ab7/zjB1eLod3hvIgTmFj4MNVJc/cHlWRz Qrlqy3Rn4QuYsiVnlEZzIe4Fwf2+8bwKP9/TIcK4C+FvicggJb79LObXQHqM=" key = b64decode(b64_key) cipher = b64decode(b64_cipher) flag = [] for i in range(len(cipher)): flag.append(cipher[i] ^ key[i]) def fun(cipher): for i in range(len(cipher)): cipher[i] ^= 0x33 if i == 0or i == 1: cipher[i] += 1 if i == 4or i == 5: cipher[i] -= 1 if i == 6or i == 7: cipher[i] -= 2 return cipher for i in range(0, len(flag), 8): a = fun(flag[i:i + 8])//最开始八个一组 forj in a: print(chr(j), end='')
import base64 t = 'igdydo19TVE13ogW1AT5DgjPzHwPDQle1X7kS8TzHK8S5KCu9mnJ0uCnAQ4aV3CSYUl6QycpibWSLmqm2y/GqW6PNJBZ/C2RZuu+DfQFCxvLGHT5goG8BNl1ji2XB3x9GMg9T8Clatc=' t = base64.b64decode(t) t = bytearray(t) ########################print(t) a2 = b'3F8gIsJ5GVY12otH0xn8VRTN0ntYWQlC3iy0SNnyG6lA4ab7/zjB1eLod3hvIgTmFj4MNVJc/cHlWRzQrlqy3Rn4QuYsiVnlEZzIe4Fwf2+8bwKP9/TIcK4C+FvicggJb79LObXQHqM=' realkey = base64.b64decode(a2) for i in range(len(t)): t[i] ^= realkey[i] def dec2(x): x = bytearray(x) dd = -1 for i in range(len(x)): x[i] ^= 0x33 x[i] -= dd if i % 2 == 1: dd += 1 return bytes(x) for i in range(len(t) // 8): print(dec2(t[i*8:i*8+8]).decode('ascii'), end='')