打开这道题就有点厉害,
百度了一下,这个人物,发现是轮转密码或者比尔密码【并不懂
首先观察了一下,最开始的1-14应该表示的是密码表,然后有密钥,就是用密钥的顺序调整密码表,然后用密文进行旋转。
例:第一个调整后的密码表为 2: < KPBELNACZDTRXMJQOYHGVSFUWI <
密钥的第一位为H,找到密码表中的H
2: < KPBELNACZDTRXMJQOYHGVSFUWI <
将H后面的字符放到前面去
2: < KPBELNACZDTRXMJQOYHGVSFUWI <
变为
2: < HGVSFUWIKPBELNACZDTRXMJQOY <
以此类推,其实原理很简单,将其他的也这样加密即可。
使用大佬的脚本,
#coding:utf-8
#密钥
key="2,5,1,3,6,4,9,7,8,14,10,13,11,12"
#密文
cipher_text = "HCBTSXWCRQGLES"
f = open("C:\\Users\\Administrator\\Desktop\\1.txt",encoding='utf-8')
str_first_encry = []
for line in f:
line = line.strip()
str_first_encry.append(line)
key_index = key.split(",")
str_second_encry=[]
for k in key_index:
str_second_encry.append(str_first_encry[int(k)-1])
print(str_first_encry[int(k)-1])
for i,ch in enumerate(cipher_text):
line = str_second_encry[i]
split_index = line.index(ch)
temp=[]
temp[0:len(line)-split_index+1] = line[split_index:len(line)]
temp[len(temp):] = line[0:split_index]
str_second_encry[i] = "".join(temp)
print("-------------------------------------")
for plain in str_second_encry:
print(plain)
来源:https://blog.csdn.net/weixin_43726480/article/details/104444527
整理之后,
HGVSFUWIKPBELNACZDTRXMJQOY
CPMNZQWXYIHFRLABEUOTSGJVDK
BVIQHKYPNTCRMOSFEZWAXJGDLU
TEQGYXPLOCKBDMAIZVRNSJUWFH
SLOQXVETAMKGHIWPNYCJBFZDRU
XQYIZMJWAORPLNDVHGFCUKTEBS
WATDSRFHENYVUBMCOIKZGJXPLQ
CEONJQGWTHSPYBXIZULVKMRAFD
RJLXKISEFAPMYGHBQNOZUTWDCV
QWXPHKZGJTDSENYVUBMLAOIRFC
GOIKFHENYVUWABMCXPLTDSRJQZ
LTDENQWAOXPYVUIKZGJBMCSRFH
ENYSRUBMCQWVJXPLTDAOIKFZGH
SWAYXPLVUBOIKZGJRFHENMCQTD
其实这时候出来并不知道该怎么找明文,根据提示,在竖行
HGVSFUWIKPBELNACZDTRXMJQOY
CPMNZQWXYIHFRLABEUOTSGJVDK
BVIQHKYPNTCRMOSFEZWAXJGDLU
TEQGYXPLOCKBDMAIZVRNSJUWFH
SLOQXVETAMKGHIWPNYCJBFZDRU
XQYIZMJWAORPLNDVHGFCUKTEBS
WATDSRFHENYVUBMCOIKZGJXPLQ
CEONJQGWTHSPYBXIZULVKMRAFD
RJLXKISEFAPMYGHBQNOZUTWDCV
QWXPHKZGJTDSENYVUBMLAOIRFC
GOIKFHENYVUWABMCXPLTDSRJQZ
LTDENQWAOXPYVUIKZGJBMCSRFH
ENYSRUBMCQWVJXPLTDAOIKFZGH
SWAYXPLVUBOIKZGJRFHENMCQTD
试了大写的不对,试试小写就正确了。
flag{xsxsbugkuadmin}
欢迎关注我的微信公众号!!~~
一起快落学习CTF吧!!~~ (*^▽^*)
路漫漫其修远兮,吾将上下而求索。