Challenges
Regex-based password checker
Reverse engineering
Medium
Regex analysis
Solves: 7
Regex-based password checker
Author: CyberSamSU
Points
35
Regular expressions (regex) are often used to "validate" an input string. But if you read the regex carefully, you can reconstruct EXACTLY which string it accepts. Useful constructs: [X] — a class that matches only the X character; \xHH — a character with the hex code HH; X{1} — exactly 1 occurrence of X; (?:X|X) — both variants are the same, just X; [X-X] — a range from X to X, i.e., again X.
In the attached tekshir.py file, the tekshir(s) function accepts only ONE specific string via re.fullmatch. Find this string — it is your flag.
Attached files
tekshir.py
Log in to download
SHA-256 checksums
tekshir.py: 51de64ed1346e6f952bd4311be604305744785eba428b4c43e44a5e2740a939a
Theory: learn the topic
Learning paths:
Reverse engineering 101
To submit a flag, log in.