题目:
首先利用网站进行维吉尼亚解密(第一段和第二段密钥不同,两段无关,可只解密第二段)
第二段解密结果:
Please send this message to those people who mean something to you,to those who have touched your life in one way or another,to those who make you smile when you really need it,to those that make you see the brighter side of things when you are really down,to those who you want to let them know that you appreciate their friendship.And if you don’t, don’t worry,nothing bad will happen to you,you will just miss out on the opportunity to brighten someone’s day with this message.My password is not a regular Caesar password,and the enc flag=[86, 116, 128, 80, 98, 85, 139, 122, 134, 114, 125, 136, 117, 123, 129, 127, 128, 128, 142, 130, 140, 147, 127, 132, 131, 136, 151, 134, 152, 164] -Caesar
由最后一句话知道不是常规的凯撒加密,联想到变异凯撒。
比赛是litctf故开头应该是litctf{...}
解码的第一个是86而L对应的是76,退了10
第二个是116而i对应的是105,退了11
第三是128而t对应的是116,退了12
由此可以看出每一个以为都递增的移动,所以可以写个小脚本解码出来
EXP :
from Cryptodome.Util.number import *
import gmpy2
a=[86, 116, 128, 80, 98, 85, 139, 122, 134, 114, 125, 136, 117, 123, 129, 127, 128, 128, 142, 130, 140, 147, 127, 132, 131, 136, 151, 134, 152, 164]
b=''
for i in range(30):
b+=chr(a[i]-10-i)
print(b)