チームsuperflipです。 14問、1604点、19位。 Welcome (welcome) Discord。 CakeCTF{hav3_s0m3_cak3_t0_r3fr3sh_y0ur_pa1at3} Country DB (web, warmup) 2文字のコードから国名を検索。スコアサーバーの実装で必要になったのかもしれない。 : def db_search(code): with sqlite3.connect('database.db') as conn: cur = conn.cursor() cur.execute(f"SELECT name FROM country WHERE code=UPPER('{code}')") found = cur.fetchone() return None if found is None else found[0] :
![CakeCTF 2023 writeup - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/a1777ceb53ccaa6e368bf9b4d2e41e6bfb673f7c/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-9f5428127621718a910c8b63951390ad.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTkxNiZoPTMzNiZ0eHQ9Q2FrZUNURiUyMDIwMjMlMjB3cml0ZXVwJnR4dC1jb2xvcj0lMjMyMTIxMjEmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9NTYmdHh0LWNsaXA9ZWxsaXBzaXMmdHh0LWFsaWduPWxlZnQlMkN0b3Amcz02OTI2MDQyODQ3ZjI5YjNkNTU0MTY3NzllNmM3ZTZkNA%26mark-x%3D142%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTYxNiZ0eHQ9JTQwa3VzYW5vX2smdHh0LWNvbG9yPSUyMzIxMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT0zNiZ0eHQtYWxpZ249bGVmdCUyQ3RvcCZzPTdhMGVlMzJjNTY1ZTJkNzA0NTA5ODhhNWUyMzgyYTM2%26blend-x%3D142%26blend-y%3D491%26blend-mode%3Dnormal%26s%3Dd566926d5d80332949fb1d92ac7c9e28)