Skip to content
Character sets

Character sets

Common charsets — printable, flag, hex

An extraction character set is the ordered sequence of candidates tested at each unknown position. A linear search performs at most secret length * charset size oracle calls, so a smaller accurate set reduces extraction time.

The smallest charset matching the target data reduces extraction time, but an excessively narrow charset can make punctuation silently terminate extraction. string.printable contains whitespace controls at the end (\t, \n, \r, etc.), so string.ascii_letters + string.digits + string.punctuation + " " is usually the better keyboard-typable set. If no character extends the prefix, the result should be reported as charset exhaustion rather than completion unless a known terminator was matched.

import string

FLAG_CHARSET = string.ascii_letters + string.digits + "{}_-!"
PRINTABLE_CHARSET = string.ascii_letters + string.digits + string.punctuation + " "
HEX_CHARSET = string.hexdigits.lower()

Find by: charset, printable, punctuation, flag charset, blind extraction, brute force, keyboard characters, ascii, hex, charset exhaustion