homoglyph-swapper.py
is a tool for generating homoglyph permutations of a string input to support testing/fuzzing for Unicode equivalence/normalisation issues. The script uses homoglyph data defined in homoglyphs.json
, which itself is derived from codebox's homoglyph repository and the now-archived homoglyphs Python package.
Printing of Unicode characters can be handled inconsistently depending on environmental factors (i.e. operating system/locale settings). Use the --verbose
flag to include raw Unicode string literal of the substituted character.
Thanks to codebox and orsinium for their open-source efforts from which this tool is derived.
If you'd like to make any contributions or recommendations (e.g. adding to homoglyph source file or code improvements), feel free to submit a pull request/file an issue!