c3
This commit is contained in:
1
c3/ciphertext
Executable file
1
c3/ciphertext
Executable file
@@ -0,0 +1 @@
|
||||
DLSeGAGDgBNJDQJDCFSFnRBIDjgHoDFCFtHDgJpiHtGDmMAQFnRBJKkBAsTMrsPSDDnEFCFtIbEDtDCIbFCFtHTJDKerFldbFObFCFtLBFkBAAAPFnRBJGEkerFlcPgKkImHnIlATJDKbTbFOkdNnsgbnJRMFnRBNAFkBAAAbrcbTKAkOgFpOgFpOpkBAAAAAAAiClFGIPFnRBaKliCgClFGtIBAAAAAAAOgGEkImHnIl
|
||||
16
c3/convert.py
Executable file
16
c3/convert.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/home/maxime/.pyvenv/bin/python3
|
||||
import sys
|
||||
chars = "test"
|
||||
|
||||
lookup1 = "\n \"#()*+/1:=[]abcdefghijklmnopqrstuvwxyz"
|
||||
lookup2 = "ABCDEFGHIJKLMNOPQRSTabcdefghijklmnopqrst"
|
||||
|
||||
out = ""
|
||||
|
||||
prev = 0
|
||||
for char in chars:
|
||||
cur = lookup1.index(char)
|
||||
out += lookup2[(cur - prev) % 40]
|
||||
prev = cur
|
||||
|
||||
sys.stdout.write(out)
|
||||
19
c3/sol.py
Executable file
19
c3/sol.py
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/home/maxime/.pyvenv/bin/python3
|
||||
from pwn import *
|
||||
|
||||
lookup1 = "\n \"#()*+/1:=[]abcdefghijklmnopqrstuvwxyz"
|
||||
lookup2 = "ABCDEFGHIJKLMNOPQRSTabcdefghijklmnopqrst"
|
||||
|
||||
with open("ciphertext", 'r') as f:
|
||||
ciphertext = f.read()
|
||||
|
||||
out = ""
|
||||
prev = 0
|
||||
for char in ciphertext:
|
||||
pos = lookup2.index(char)
|
||||
out += lookup1[(pos+prev)%40]
|
||||
prev = (pos+prev)%40
|
||||
|
||||
print(out)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user