跳转至

[SWPUCTF 2021 新生赛]简简单单的逻辑

  1. 审计源码 因为异或的逆运算就是异或 所以可以直接编写exp
  2. 编写exp
def decode(cipher):
    flag = ''
    for i in range(len(list)):
        key = (list[i]>>4)+((list[i] & 0xf)<<4)
        now = cipher[2*i:2*i+2]
        print(now)
        now = int(now,16)
        print(now)
        now^=key
        flag+=chr(now)
    print(flag)
decode(result)

评论