Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 848 Bytes

ase.md

File metadata and controls

45 lines (39 loc) · 848 Bytes
name event category description layout
ASE (2022)
Imaginary CTF 2022
Crypto
Writeup for ASE (Crypto) - Imaginary CTF (2022) 💜
title description tableOfContents outline pagination
visible
true
visible
true
visible
true
visible
true
visible
true

ASE

Solution

{% code overflow="wrap" %}

from pwn import *

host = 'chal.imaginaryctf.org'
port = 42050

io = remote(host, port)

for i in range(200):
    io.recvuntil(b'Your lucky number is: ')
    key = int(p.recvuntil(b'\n'))
    key = key + 10000000000
    key = int(key) ^ 1337
    key = list(str(key))
    chars = ''
    for x in range(0, len(key), 2):
        chars += chr(int(''.join(key[x:x + 2])))
    info((chars))
    io.sendlineafter(b'? ', chars.encode())
io.interactive()

{% endcode %}