Today, I’ll take you to a topic of crypto Cryptography (Morse of crypto from xctf)
Crack this password
11 111 010 000 0 1010 111 100 0 00 000 000 111 00 10 1 0 010 0 000 1 00 10 110
The first step is to analyze the class from the name. You can know that this is the Morse code, so first turn it into the Morse code and separate the spaces. 1 representative_ 0 yes wo you
Offer Python code (you can also find online websites)
bin = input(“binary”)
morse = bin. replace(“1”,”-“). replace(“0”,”.”)
print(morse)
Get —-…. –…. –…. –…. –…. –…. –…. –
Next code
Morse code is used_ And Different permutations represent different letters. Morse password table:
A:·—
B:—···
C:—·—·
D:—··
E:·
F:··—·
G:——·
H:····
I:··
J:·———
K:—·—
L:·—··
M:——
N:—·
O:———
P:·——·
Q:——·—
R:·—·
S:···
T:—
U:··—
V:···—
W:·——
X:—··—
Y:—·——
Z:——··
m = {‘a’: ‘.-‘, ‘b’: ‘-…’, ‘c’: ‘-.-.’, ‘d’: ‘-..’, ‘e’: ‘.’,
‘f’: ‘..-.’, ‘ g’: ‘–.’, ‘ h’: ‘….’, ‘ i’: ‘..’, ‘ j’: ‘.—‘,
‘k’: ‘-.-‘, ‘ l’: ‘.-..’, ‘ m’: ‘–’, ‘n’: ‘-.’, ‘ o’: ‘—‘,
‘p’: ‘.–.’, ‘ q’: ‘–.-‘, ‘ r’: ‘.-.’, ‘ s’: ‘…’, ‘ t’: ‘-‘,
‘u’: ‘..-‘, ‘ v’: ‘…-‘, ‘ w’: ‘.–’, ‘ x’: ‘-..-‘, ‘ y’: ‘-.–’, ‘ z’: ‘–..’,
‘0’: ‘—–’, ‘1’: ‘.—-‘, ‘ 2’: ‘..—‘, ‘ 3’: ‘…–’, ‘ 4’: ‘….-‘,
‘5’: ‘…..’, ‘ 6’: ‘-….’, ‘ 7’: ‘–…’, ‘ 8’: ‘—..’, ‘ 9’: ‘—-.’
}
text = input()
morse_ key = text. strip(). split(“ “)
w = [m[key] for key in morse_ key]
w = “”. join(w)
print(plain_text)
Finally, morseissointereting is obtained
PS: I don’t know why you can’t put parentheses in the code. You can understand it yourself
chris jiace zhao
Cover picture by Chris_ jiace_ zhao(Dalian)
Previous
morse_cry_cn
2021-05-21
Current
morse_cry_en
2021-01-21