The Reshuffler
The Reshuffler
Platform: rev-kids20.forkbomb.ru | Category: Reversing | Type: Challenge | Difficulty: Medium | OS: NA | Author: XESXOR | Date: 2026-03-09 | Status: Solved Techniques: shuffle_algorithm_reversal, swap_operation_analysis
Summary
The Reshuffler — Reverse Kids 2.0
Description
"You have the binary that encodes a string given as command line argument. Find original string from this encoded data:"
bpoctifh_t{tmkh_smowsllsfoe_smia_amsart_h'i?ti_in}
Analysis
The binary applies a series of swap operations with decreasing step sizes (10→2) to the input string. Each step swaps pairs of characters at a certain distance.
Solution
The reverse operation — apply the same swaps with increasing step sizes (2→10):
python read-only • copy allowedencoded = "bpoctifh_t{tmkh_smowsllsfoe_smia_amsart_h'i?ti_in}" s = list(encoded) for step in range(2, 11): # reverse: from 2 to 10 for i in range(0, len(s) - step, step): s[i], s[i + step] = s[i + step], s[i] result = ''.join(s)
Note: The flag starts with "sbpctf" (not "spbctf") — this is intentional, part of the challenge.