您的位置:首页 > 大数据 > 人工智能

[WeChall] Training: Crypto - Caesar I (Crypto, Training)

2014-11-09 11:10 866 查看
Question:

Crypto - Caesar I
As on most challenge sites, there are some beginner cryptos, and often you get started with the good old caesar
cipher.

I welcome you to the WeChall style of these training challenges :)

Enjoy!

IWT FJXRZ QGDLC UDM YJBEH DKTG IWT APON SDV DU RPTHPG PCS NDJG JCXFJT HDAJIXDC XH CTGHPCDRCVDG

Solution:

It's a simply example of  caesar cipher, When encrypting, a person looks up each letter of the message in the "plain" line and writes down the corresponding letter in the "cipher" line. Deciphering
is done in reverse, with a right shift of 3. I decode this By python:

#!/usr/bin/env python
f = file('key.txt','r+')
s = f.read()
l = []
for i in s:
l.append(i)
leng = len(l)
print 'l:'%l
for i in range(leng):
l[i] = ord(l[i])

new = []
for i in l:
new.append(chr(i+3))

cryptos = ""
for i in new:
cryptos += i

print cryptos.lower()

key.txt is the string to Decode.and result s :
thewquickwbrownwfoxwjumpswoverwthewlazywdogwofwcaesarwandwyourwuniquewsolutionwiswnersanocngor


ignore the char 'w', we can see the words:
the  quick brown fox jumps over the lazy dog of caesar and your unique solution is nersanocngor

submit the string "nersanocngor", SUCCESS!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ctf