Description
"I'm going to learn some new words..." *opens book
Attachments
nc oreos.imaginaryctf.org 10069
Writeup
Solve script by Firepony
from pwn import *
p = remote("imaginary.ml", 10069)
p.readline()
encrypted_flag = p.readline()
encrypted_flag = encrypted_flag.decode()
encrypted_flag = encrypted_flag.strip()
p.readline()
chars = ["1","2","3","4","5","6","7","8","9","0","!","@","#","$","%","^","&","*","(",")","q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m","{","}","_","'"]
values = {}
for n in chars:
p.sendline(str(n))
p.readline()
char = p.readline()
char = char.strip()
char = char.decode()
values[char] = n
p.readline()
result = ""
for n in str(encrypted_flag):
n = values[n]
result += n
print(result)
Solve script by Et3rnos
from pwn import *
import string
c = remote("imaginary.ml", 10069)
c.readline()
flag = c.readline().strip()
flag = [flag[i:i+2] for i in range(len(flag)) if i % 2 == 0]
log.info(f"[FLAG] {flag}")
c.read()
c.sendline(string.printable)
c.readline()
enc = c.readline().strip()
enc = [enc[i:i+2] for i in range(len(enc)) if i % 2 == 0]
log.info(f"[ENC] {enc}")
tmp = "".join([string.printable[enc.index(i)] for i in flag])
log.info(f"[RESULT] {tmp}")
Flag
ictf{d1ct10n@ri3s_m@k3_y0u_sm@r73r}