basic-mod1
This commit is contained in:
1
basic_mod1/message.txt
Executable file
1
basic_mod1/message.txt
Executable file
@@ -0,0 +1 @@
|
||||
128 322 353 235 336 73 198 332 202 285 57 87 262 221 218 405 335 101 256 227 112 140
|
||||
19
basic_mod1/sol.py
Executable file
19
basic_mod1/sol.py
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/home/maxime/.pyvenv/bin/python3
|
||||
|
||||
with open("message.txt", 'r') as f:
|
||||
text = f.read().strip()
|
||||
|
||||
cipher = text.split(' ')
|
||||
|
||||
dec = ""
|
||||
for i in cipher:
|
||||
i = int(i)
|
||||
i %= 37
|
||||
if i <= 25:
|
||||
dec += chr(ord('a') + i)
|
||||
elif i <= 35:
|
||||
dec += chr(ord('0') + i - 26)
|
||||
elif i == 36:
|
||||
dec += '_'
|
||||
print(dec)
|
||||
|
||||
Reference in New Issue
Block a user