https://www.ichunqiu.com/battalion
#!/usr/bin/env python 3.8
# -*- encoding: utf-8 -*-
#fileName : decry.py
#createTime: 2020/09/21 15:45:26
#author : 乔悟空
#purpose : 此脚本用于凯撒偏移
miwen = "TW5650Y - 0TS UZ50S S0V LZW UZ50WKW 9505KL4G 1X WVMUSL510 S001M0UWV 910VSG S0 WFLW0K510 1X LZW54 WF5KL50Y 2S4L0W4KZ52 L1 50U14214SLW X5L0WKK S0V TSK7WLTS88 VWNW8129W0L 50 W8W9W0LS4G, 95VV8W S0V Z5YZ KUZ118K SU41KK UZ50S.LZW S001M0UW9W0L ESK 9SVW SL S K5Y050Y UW4W910G L1VSG TG 0TS UZ50S UW1 VSN5V KZ1W9S7W4 S0V FM LS1, V54WUL14 YW0W4S8 1X LZW 50LW40SL510S8 U112W4SL510 S0V WFUZS0YW VW2S4L9W0L 1X LZW 9505KL4G 1X WVMUSL510.\"EW S4W WFU5LWV L1 T41SVW0 1M4 2S4L0W4KZ52 E5LZ LZW 9505KL4G 1X WVMUSL510 L1 9S7W S 810Y-8SKL50Y 592SUL 10 LZW 85NWK 1X UZ50WKW KLMVW0LK LZ41MYZ S 6150L8G-VWK5Y0WV TSK7WLTS88 UM445UM8M9 S0V S E5VW 4S0YW 1X KUZ118 TSK7WLTS88 241Y4S9K,\" KS5V KZ1W9S7W4. \"LZ5K U1995L9W0L 9S47K S01LZW4 958WKL10W 50 LZW 0TS‘K G1MLZ S0V TSK7WLTS88 VWNW8129W0L WXX14LK 50 UZ50S.\" X8SY { YK182V9ZUL9STU5V}"
res = ‘‘
offset = 18 # 偏移量是18
for i, enu in enumerate(miwen):
tem = ord(enu)
if tem>=65 and tem<=90:
if tem-offset>=65:
res += chr(tem-offset)
else:
res += chr(tem+26-offset)
else:
res += enu
print(res)
F8AG { GS182D9HCT9ABC5D}
8肯定是L,找到一个有129的单词DEVE8129E0T
,把不知道的变成-
,也就是DEVEL---E-T
,放到网站得到development
,所以9就是M,flag就是FLAG { GSOLPDMHCTMABC5D}
,同理得到5对应I,最终结果去掉空格是FLAG {GSOLPDMHCTMABCID}
CTF-i春秋-Web-偏移、置换密码-破译-2016全国大学生信息安全竞赛
原文:https://www.cnblogs.com/qiaowukong/p/13706345.html