bugku 白哥的鸽子
链接
思路
winhex查看结尾有这样一段
看起来flag{}这些都有,挺齐全的,尝试栅栏加密:
flag:flag{w22_is_v3ry_cool}@@
脚本
# 栅栏加密
def crypto():
plain = input("输入明文:")
n = eval(input("输入分组字数:"))
res = ''
for i in range(n):
for j in range(int(len(plain) / n + 1)):
try:
res += plain[j * n + i]
except:
pass
print(res)
def decrypto():
plain = input('输入密文:')
for n in range(2, len(plain)-1):
res = ''
for i in range(n):
for j in range(int(plain.__len__() / n + 1)):
try:
res += plain[j * n + i]
except:
pass
print(res)
decrypto()
文章评论