这是《新年游戏 2024》的题解 by GPT-5.4
提示词
完成这个谜题的解谜(即使这个活动已经结束;已知没有公开的题解):https://imkero.net/posts/new-year-game-2024/
谜题中的图片文件我已经事先下载好了推理轨迹
• 我会先查看当前项目中的文件和你提到的图片资源,然后读取谜题页面,整理题面信息,再开始逐步解谜。• Ran pwd
└ /home/ubuntu/workspace/2024-new-year-game• Explored
└ List rg --files• Searched https://imkero.net/posts/new-year-game-2024/• 我已经读取了题面。第一步很明确:riddle-2024.png 里拼接了额外数据,我现在先检查这个 PNG 末尾是否带有压缩包,并提取下一步文件。• Ran xxd -g 1 -l 64 riddle-2024.png
└ 00000000: 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 .PNG........IHDR
00000010: 00 00 04 b0 00 00 02 a3 08 02 00 00 00 82 d1 61 ...............a
00000020: 97 00 00 00 01 73 52 47 42 01 d9 c9 2c 7f 00 00 .....sRGB...,...
00000030: 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 00 ..pHYs..........• Ran tail -c 256 riddle-2024.png | xxd -g 1
└ 00000000: 96 2d 53 22 08 29 ab a4 34 b8 4f bd 1c c6 98 58 .-S".)..4.O....X
00000010: 5f ae 26 93 c9 16 cf 9e 78 9f 94 4e a5 4a 7d ec _.&.....x..N.J}.
… +12 lines
000000e0: da 01 f2 38 74 00 eb 3a da 01 50 4b 05 06 00 00 ...8t..:..PK....
000000f0: 00 00 01 00 01 00 5d 00 00 00 30 01 00 00 00 00 ......]...0.....• Ran file riddle-2024.png
└ riddle-2024.png: PNG image data, 1200 x 675, 8-bit/color RGB, non-interlaced• Ran unzip -l riddle-2024.png
└ warning [riddle-2024.png]: 1946799 extra bytes at beginning or within zipfile
(attempting to process anyway)
… +4 lines
--------- -------
402 1 file• Ran unzip -o riddle-2024.png -d extracted
└ Archive: riddle-2024.png
warning [riddle-2024.png]: 1946799 extra bytes at beginning or within zipfile
(attempting to process anyway)
inflating: extracted/scan-me.png• 我已经把压缩包内容提取出来了。下一步文件是 scan-me.png,名字像是在提示扫码,我先查看图片内容并尝试直接识别其中的编码信息。• Viewed Image
└ extracted/scan-me.png• Ran file extracted/scan-me.png
└ extracted/scan-me.png: PNG image data, 1600 x 400, 1-bit colormap, non-interlaced• Ran identify extracted/scan-me.png
└ /bin/bash: line 1: identify: command not found• Ran zbarimg extracted/scan-me.png
└ /bin/bash: line 1: zbarimg: command not found• Ran python - <<'PY'
│ from PIL import Image
│ img=Image.open('extracted/scan-me.png')
│ … +10 lines
└ Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PIL'• 当前图片并不是二维码,而是一维条码。我先把 PNG 像素读出来,确定条码的黑白宽度序列和编码类型,再继续解码里面的文本。• Ran python - <<'PY'
│ import struct, zlib
│ from collections import Counter
│ … +90 lines
└ IHDR 1600 400 1 3
│ … +43 lines
└ bbox 224 1375 117 288
num runs 157 first [(1, 8), (0, 4), (1, 4), (0, 8), (1, 4), (0, 16), (1, 4), (0, 16), (1, 4), (0, 8), (1, 8), (0, 4), (1, 4), (0, 16), (1, 8), (0, 4), (1, 4), (0, 8), (1, 4), (0, 8)]
counts [(4, 76), (8, 49), (16, 18), (12, 14)]• Ran python - <<'PY'
│ import struct,zlib
│ path='extracted/scan-me.png'
24 [1, 1, 2, 3, 1, 3]
stop [2, 3, 3, 1, 1, 1, 2]• Searched Code 128 pattern table 211214 111323• Searched https://en.wikipedia.org/wiki/Code_128• Ran python - <<'PY'
│ patterns = {
│ '212222':0,'222122':1,'222221':2,'121223':3,'121322':4,'131222':5,'122213':6,'122312':7,'132212':8,
[104, 68, 73, 71, 13, 84, 88, 84, 13, 99, 20, 24, 100, 14, 73, 77, 75, 69, 82, 79, 14, 78, 69, 84, 36]
decoded tokens ['d', 'i', 'g', '-', 't', 'x', 't', '-', '<CodeC>', '20', '24', '<CodeB>', '.', 'i', 'm', 'k', 'e', 'r', 'o', '.', 'n', 'e', 't']
calc 36 checksum 36• Searched dig-txt-2024.imkero.net-- Worked for 1m 33s --• 条码已经解出来了,内容是 dig-txt-2024.imkero.net。这个名字像是在提示使用 dig TXT 查询 DNS TXT 记录,我现在直接对这个域名做解析,看看下一步文字藏在什么记录里。$ dig txt dig-txt-2024.imkero.net
; <<>> DiG 9.18.12-0ubuntu0.22.04.3-Ubuntu <<>> txt dig-txt-2024.imkero.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17556
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;dig-txt-2024.imkero.net. IN TXT
;; ANSWER SECTION:
dig-txt-2024.imkero.net. 600 IN TXT "Gur Erghea bs Fureybpx Ubyzrf, synt{GUR_?????????_BS_GUR_R????_?????}"
;; Query time: 44 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Mar 31 01:34:45 CST 2026
;; MSG SIZE rcvd: 134$ python - <<'PY'
import codecs
s='Gur Erghea bs Fureybpx Ubyzrf, synt{GUR_?????????_BS_GUR_R????_?????}'
print(codecs.decode(s,'rot_13'))
PY
The Return of Sherlock Holmes, flag{THE_?????????_OF_THE_E????_?????}• Searched The Return of Sherlock Holmes Empty House first story• 已经解出来了,最终谜底是:
flag{THE_ADVENTURE_OF_THE_EMPTY_HOUSE}
推理过程很短:
先从题面给出的 riddle-2024.png 中按提示提取出隐藏的 zip,得到 scan-me.png。这张图不是二维码,而是 Code 128 条码,解码后得到字符串 dig-txt-2024.imkero.net。接着对这个域名查询 DNS TXT 记录,拿到一段经过 ROT13 的文本:The Return of Sherlock Holmes, flag{THE_?????????_OF_THE_E????_?????}。其中 The Return of Sherlock Holmes 指向福尔摩斯短篇集,而与空格模式完全对应、并且正是“福尔摩斯归来”第一篇的题目,就是 The Adventure of the Empty House,所以可以补全 flag。
我用到的在线来源:
新年游戏 2024 题面 (https://imkero.net/posts/new-year-game-2024/)
Code 128 对照表 (https://en.wikipedia.org/wiki/Code_128)
The Return of Sherlock Holmes (https://en.wikipedia.org/wiki/The_Return_of_Sherlock_Holmes)
The Adventure of the Empty House (https://en.wikipedia.org/wiki/The_Adventure_of_the_Empty_House)