old htb folders
This commit is contained in:
2023-08-29 21:53:22 +02:00
parent 62ab804867
commit 82b0759f1e
21891 changed files with 6277643 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import string
def encryption(msg):
ct = []
for char in msg:
ct.append((123 * ord(char) + 18) % 256)
return bytes(ct)
dict = {}
for elem in string.printable:
enc = encryption(elem)[0]
dict[elem] = enc
dict[enc] = elem
print(dict)
f = open('./msg.enc','r')
ct = f.readline()
ct = [int(ct[i:i+2],16) for i in range(0, len(ct), 2)]
solve = ""
for elem in ct:
solve += dict[elem]
print(solve)

View File

@@ -0,0 +1,15 @@
import string
from secret import MSG
def encryption(msg):
ct = []
for char in msg:
ct.append((123 * char + 18) % 256)
return bytes(ct)
ct = encryption(MSG)
f = open('./msg.enc','w')
f.write(ct.hex())
f.close()

View File

@@ -0,0 +1 @@
6e0a9372ec49a3f6930ed8723f9df6f6720ed8d89dc4937222ec7214d89d1e0e352ce0aa6ec82bf622227bb70e7fb7352249b7d893c493d8539dec8fb7935d490e7f9d22ec89b7a322ec8fd80e7f8921