Lrep
Lrep
Platform: CUSTOM | Category: Reversing | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: source_code_analysis, xor_condition_analysis
Summary
Walkthrough of the CUSTOM Reversing Lrep. Language: Perl. Source code provided. Program extracts flag characters from a hardcoded string based on XOR condition.
Description
Language: Perl. Source code provided. Program extracts flag characters from a hardcoded string based on XOR condition.
Analysis
perl read-only • copy allowed$text = "2I7VjH)Q3RkPK*Sm3R!aY8!1P:5T6YL-`N4U5M,;xB#v1D%24U"; # For each pair of adjacent chars (a, b) in text: # if ord(a) == (ord(b) ^ 97), then a must match next char of input
The program iterates through pairs of adjacent characters in $text. If ord(a) == ord(b) ^ 97, then character a must match the next input character.
Solution
Find all positions where the condition is satisfied and collect the characters:
python read-only • copy allowedtext = "2I7VjH)Q3RkPK*Sm3R!aY8!1P:5T6YL-`N4U5M,;xB#v1D%24U" flag = "" for i in range(len(text)-1): if ord(text[i]) == (ord(text[i+1]) ^ 97): flag += text[i] # REDACTED
Key Takeaways / Lessons
- Mastering source_code_analysis, xor_condition_analysis was key to this challenge.
- Always check for common misconfigurations and verify assumptions.
Crafted by XESXOR Research • 2026-03-09 • CUSTOM • Lrep • Difficulty: Easy