#!/usr/bin/env python3
from pwn import * # pip install pwntools
import json
HOST = "socket.cryptohack.org"
PORT = 11112
r = remote(HOST, PORT)
def json_recv():
line = r.readline()
return json.loads(line.decode())
def json_send(hsh):
request = json.dumps(hsh).encode()
r.sendline(request)
print(r.readline())
print(r.readline())
print(r.readline())
print(r.readline())
request = {
"buy": "clothes"
}
json_send(request)
response = json_recv()
print(response)
일단 그대로 복붙 후 실행…

이건 안된다, buy만 가능하다고 한다.
buy와 flags 안된다.
단수로 바꿔서 buy와 flag하면 나온다.

