Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CTF cryptography ciphertext script decryption and WP (Caesar decryption)

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report