HideToSee
This commit is contained in:
BIN
hide_to_see/atbash.jpg
Executable file
BIN
hide_to_see/atbash.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
1
hide_to_see/encrypted.txt
Normal file
1
hide_to_see/encrypted.txt
Normal file
@@ -0,0 +1 @@
|
||||
krxlXGU{zgyzhs_xizxp_zx751vx6}
|
||||
20
hide_to_see/sol.py
Executable file
20
hide_to_see/sol.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/home/maxime/.pyvenv/bin/python3
|
||||
|
||||
def decode(char):
|
||||
char = ord(char)
|
||||
a = ord('a')
|
||||
z = ord('z')
|
||||
A = ord('A')
|
||||
Z = ord('Z')
|
||||
|
||||
if a <= char and char <= z:
|
||||
return chr(z - (char - a))
|
||||
if A <= char and char <= Z:
|
||||
return chr(Z - (char - A))
|
||||
return chr(char)
|
||||
|
||||
with open("encrypted.txt", 'r') as f:
|
||||
text = f.read()
|
||||
dec = ''.join(map(decode, text))
|
||||
print(dec)
|
||||
|
||||
Reference in New Issue
Block a user