[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!
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!
相关文章推荐
- WeChall Training: Crypto - Caesar I
- WeChall Training: Crypto - Caesar I
- WeChall Training: WWW-Robots
- [WeChall] Training: Stegano I
- [Wechall]Training:MySQL
- WeChall Training: ASCII
- [WeChall] Training: WWW-Robots (HTTP, Training)
- [WeChall] Training: ASCII (Training, Encoding)
- wechall php系列之Training: PHP LFI
- WeChall Training: WWW-Robots
- WeChall Training: ASCII
- WeChall Training: Stegano I
- XMAN2017选拔赛Crypto-Caesar
- 2017 Multi-University Training Contest - Team 2 1001 Is Derek lying?
- 2017 Multi-University Training Contest - Team 2 hdu6050 Funny Function 矩阵快速幂
- Crypto—一个类模块(转贴)
- HDU 6052 2017 Multi-University Training Contest - Team 2 1008 To My Boyfriend:计数问题
- 学习CRYPTO第三天
- 2017 Multi-University Training Contest - Team 1:1003. Colorful Tree
- Secure Programming Training Notes