← Back to Writeups
CUSTOMEasyReversing

Deja Vu

XESXOR9/10/20261 min read
#reversing#custom#easy#arithmetic_reverse#image_code_reading

Deja Vu

Platform: rev-kids20.forkbomb.ru | Category: Reversing | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-03-09 | Status: Solved Techniques: arithmetic_reverse, image_code_reading

Summary

Language: Python. Source code provided as an image (screenshot). Flag checker with arithmetic verification.

Deja Vu — Reverse Kids 2.0

Description

Language: Python. Source code provided as an image (screenshot). Flag checker with arithmetic verification.

Analysis

Code from the image:

python
import sys
verify = [521, 339, 1028, 365, 1132, 352, 833]
if len(sys.argv[1]) != len(verify): sys.exit(-1)
for i in range(0, 7):
    char = ord(sys.argv[1][i])
    char = (char + i) * 13 - 337
    if char != verify[i]: sys.exit(-1)
print "[v] correct!"

Solution

Reverse formula: ord(char) = (verify[i] + 337) / 13 - i ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

python
verify = [521, 339, 1028, 365, 1132, 352, 833]
flag = ''.join(chr((v + 337) // 13 - i) for i, v in enumerate(verify))
# REDACTED

‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍