Baby Encription
Platform: HTB.
Mission: Desencripte The especial message.
Unzip the carpet, you will have 2 files one python with the logic to encript the flag and the other with the flag encripted. descomprime la carpeta, encontraras dos archivos 1 sera el codigo python que tiene la logica de la encriptacion de la flag y la otra sera la flag encriptada.

La soluciΓ³n seria, cambiar la ecuacion para que la flag se otorgue en texto leible. the solution is change the ecuation so you can have the flag desencripte.
//
fd = open(β./msg.encβ,βrβ)
secret = fd.read()
ct = bytes.fromhex(secret)
decrypted_str = ββ
for char in ct:
for brute_val in range(33, 126):
if ((123 * brute_val + 18) % 256) == char:
decrypted_str += chr(brute_val)
break
print(decrypted_str)
Execute the script:
//
HTB{l00k_47_y0u_r3v3rs1ng_3qu4710n5_c0ngr475}
Y tendriamos la flag, and we get the flag.
Last updated