← Back to Writeups
CUSTOMEasyCrypto

Alt-girl

XESXOR9/10/20262 min read
#crypto#custom#easy#alt_code_mapping#character_substitution#cp437_decoding

Alt-girl

Platform: TaipanByte | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-02-14 | Status: Solved Techniques: alt_code_mapping, character_substitution, cp437_decoding

Summary

The task description contained only special characters:

Alt-girl — TaipanByte

Description

The task description contained only special characters:

¶☻{↨☼↨○¶‼♣☺‼↓♠♀☺•}

The task name "Alt-girl" hints at Alt codes (CP437 encoding).

Analysis

The symbols in the description are CP437 control characters (codes 0-31), which in DOS are displayed as special graphical symbols. Each symbol has a numeric code in CP437 that corresponds to a letter position in the alphabet (1=a, 2=b, ..., 26=z). Curly braces { and } remain as-is — they are standard ASCII. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

CP437 Table (codes 1-31):

☺=1  ☻=2  ♥=3  ♦=4  ♣=5  ♠=6  •=7  ◘=8  ○=9  ◙=10
♂=11 ♀=12 ♪=13 ♫=14 ☼=15 ►=16 ◄=17 ↕=18 ‼=19 ¶=20
§=21 ▬=22 ↨=23 ↑=24 ↓=25 →=26 ←=27 ∟=28 ↔=29 ▲=30 ▼=31

Step-by-step decoding:

SymbolCP437 codeLetter
20t
☻2b
{123{
↨23w
☼15o
↨23w
○9i
20t
‼19s
♣5e
☺1a
‼19s
↓25y
♠6f
♀12l
☺1a
•7g
}125}
‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

Result: tb{REDACTED} — reads as "wow it's easy flag".

Solution

python
#!/usr/bin/env python3
"""
Alt-girl solver — TaipanByte CTF
CP437 control characters (codes 1-31) mapped to alphabet positions (a=1, b=2, ..., z=26)
"""

cp437_map = {
    '☺': 1, '☻': 2, '♥': 3, '♦': 4, '♣': 5, '♠': 6, '•': 7, '◘': 8,
    '○': 9, '◙': 10, '♂': 11, '♀': 12, '♪': 13, '♫': 14, '☼': 15,
    '►': 16, '◄': 17, '↕': 18, '‼': 19, '¶': 20, '§': 21, '▬': 22,
    '↨': 23, '↑': 24, '↓': 25, '→': 26, '←': 27, '∟': 28, '↔': 29,
    '▲': 30, '▼': 31,
}
‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

description = "¶☻{↨☼↨○¶‼♣☺‼↓♠♀☺•}"

flag = ''
for ch in description:
    if ch in ('{', '}'):
        flag += ch
    else:
        code = cp437_map[ch]
        flag += chr(code + ord('a') - 1)

print(f"Flag: {flag}")  # tb{REDACTED}

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