# username
x1 = "dqxqcius"
username = ""
for i in range(len(x1)):
if (ord(x1[i]) - 97) < 16:
username += chr(ord(x1[i]) - 16 + 26)
else:
username += chr(ord(x1[i]) - 16)
print("username:", username)
# password
x2 = "YeaTtgUnzezBqiwa2025"
k = "nahamcon"
password = ""
for i in range(len(x2)):
if ord(x2[i].lower()) < 97:
password += x2[i]
continue
n = ord(k[i % len(k)]) - 97
e = ord(x2[i].lower()) - 97
d = e - n
if d < 0:
d += 26
if x2[i].isupper():
password += chr(d+97).upper()
else:
password += chr(d+97)
print("password:", password)
The Oddyssey
オデュッセイアを読むプログラム
enter を押していくと次の節がロードされる形式
試しに文字列を送ってみると文字数分の節が進んだ
pwntools を用いて二分探索的に総節数を調べ, 全文をファイル形式で保存
from pwn import *
import time
host = $HOST
port = $PORT
sh = remote(host, port)
sh.sendline("a".encode() * 1172)
msg = sh.recvall().decode()
with open("./test.txt", "w") as f:
f.write(msg)
sh.interactive()
全文を保存したファイルから grep コマンドを用いて検索したところ flag を獲得
cat test.txt | grep flag
Quartet
quartet.z01 ~ quartet.z04 のファイルが配布された
file コマンドで調べてみると zip multi-volume archive という, zip ファイルを複数に分割した形式のファイルであることが判明