Crypto: The Emperor’s Crypto Weapon

topic

After downloading the zip, you can get the prompt text

Combining the question name and text prompts, it can be seen that it is the Caesar cipher

Use script to blast the number of bits of displacement

str1 = 'FRPHEVGL'
str2 = str1.lower()
num = 1
for i in range(26):
    print("{:<2d}".format(num),end = ' ')
    for j in str2:
        if(ord(j)+num > ord('z')):
            print(chr(ord(j)+num-26),end='')
        else:
            print(chr(ord(j)+num),end='')
    num += 1
    print('')

available

Only the 13th one is a word, so the key is 13, and then the plain text can be encrypted to obtain

Reference article link:
https://www.cnblogs.com/scarecr0w7/p/17377117.html

Guess you like

Origin blog.csdn.net/gsumall04/article/details/133418419