https://buuoj.cn/challenges#[NPUCTF2020]%E4%BD%A0%E5%A5%BDsao%E5%95%8A

查表转化成数字,4 个 6 bit base 到 3 个 8 bit 再检验

key = [0x9E, 0x9B, 0x9C, 0xB5, 0xFE, 0x70, 0xD3, 0x0F, 0xB2, 0xD1,
       0x4F, 0x9C, 0x02, 0x7F, 0xAB, 0xDE, 0x59, 0x65, 0x63, 0xE7,
       0x40, 0x9D, 0xCD, 0xFA, 0x04, 0x00, 0x00]
 
l = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234{}789+/="
 
 
def chrrot(a: int, n: int):
    print(l[(a >> n) & 0x3f],end="")
 
for i in range(0,len(key),3):
    now = (key[i]<<16)+(key[i+1]<<8)+key[i+2]
    chrrot(now,18)
    chrrot(now,12)
    chrrot(now,6)
    chrrot(now,0)
npuctf{w0w+y0U+cAn+r3lllY+dAnc3}