CTF cryptography ciphertext script decryption and WP (Caesar decryption)
The source of the topic is the experiment.
Analyze the meaning of the title and say it is trapped in the fence, so decrypt the character fence to see what it has, use the tool CTFcraktools
Get three ciphertexts
Then it is said that the password is Caesar. In decoding the four columns of Caesar in turn to find a possible key, it is obvious that when trying the first one, there is a column with the word "CTF {}" in the plaintext.
The problem was solved successfully.
At this time, I was thinking that there are so many results that the answer is not easy to find. So I wrote a given ciphertext and the degree of offset can write the only result. After saying so much, put on the code.
#! / usr/bin/python#encoding=utf-8import stringimport sysz= [] for i in string.lowercase: # string.lowercase represents all the letters z.append (I) zifu=raw_input ("zifu chuan:") n=raw_input ("pian yi du:") str1=''for I in zifu:if ord (I) + int (n) > 122: # ord () function gives the ASCII code a=96+ord (I) + int (n)-122else : a=ord (I) + int (n) str1+=chr (a) # gives the corresponding letter print str1 of ASCII code
Execution result:
The script is just so-so, afraid you don't understand, and use Pinyin (ahem, admit that your English is not good)
To take care of.