banner
Vinking

Vinking

你写下的每一个BUG 都是人类反抗被人工智能统治的一颗子弹

New Year Game Puzzle

This year's New Year game comes to a close here. Thank you all for participating, and once again, I wish everyone a Happy New Year.

Game Analysis#

First, here is the puzzle-solving process for this game:

Thanks to @电脑星人 for the very detailed analysis. I had originally written down some of the main puzzle-solving processes in advance, but the analysis provided by the expert is much better than mine, so I will just share the link to the article here. Those who want to understand the detailed puzzle-solving process can take a look 😂.

Some Data#

This year's game started on January 20 and lasted a total of 12 days. According to the rules, the password was submitted 49 times, and a total of 5 students received red envelopes. At 13:23 on January 21, the puzzle was first successfully solved by @FantasyLand の 暗梦. Additionally, another student used a script to traverse and submit answers, submitting a total of 540 answers. Due to a pre-set QPS limit and the timely discovery, only this student's IP was temporarily restricted.

Afterword#

Why is the steganographic information in BGR order instead of RGB order?#

This issue was indeed my oversight >﹏<, because the steganography script (LSB-Steganography) used OpenCV, and OpenCV reads images in BGR format by default. Therefore, the steganographic information is naturally in BGR order. If you want to change it to RGB order, you need to modify the steganography script as follows:

def main():
    args = docopt.docopt(__doc__, version="0.2")
    in_f = args["--in"]
    out_f = args["--out"]
    in_img = cv2.cvtColor(cv2.imread(in_f), cv2.COLOR_BGR2RGB)  # Convert BGR format to RGB format.
    steg = LSBSteg(in_img)
    lossy_formats = ["jpeg", "jpg"]

    if args['encode']:
        # Handling lossy format
        out_f, out_ext = out_f.split(".")
        if out_ext in lossy_formats:
            out_f = out_f + ".png"
            print("Output file changed to ", out_f)

        data = open(args["--file"], "rb").read()
        res = cv2.cvtColor(steg.encode_binary(data), cv2.COLOR_RGB2BGR)  # Convert RGB format to BGR format, otherwise the image will be inverted.
        cv2.imwrite(out_f+'.png', res)

    elif args["decode"]:
        ...

This way, the generated image will have the steganographic information in RGB order.

Steganographic Image RGB Order

This article was synchronized and updated to xLog by Mix Space. The original link is https://www.vinking.top/posts/confetti/new-year-game-riddle-answer-2023

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.