Skip to main content

Enumerate possible ASCII text being spoofed by a particular IDN domain name

Project description


Enumerate possible ASCII text being spoofed by a particular IDN domain name

How it works

The basic algorithm for how this library works is as follows:

  • Convert raw xn-- IDN domain to Unicode representation (using idna library)
  • For each Unicode char in the domain:
  • Check a pre-built mapping for possible ASCII characters that look similar to the Unicode character (i.e. plaintext ASCII characters that the Unicode character could be spoofing)
  • Compute the Cartesian product of the character lists (using itertools.product) to generate the possible plaintext domain names


import xn_reverser

result = xn_reverser.xn_reverser("")

xn_reverser() returns a dict containing the following elements:

  • domain_raw (string): the actual xn-- raw IDN domain provided as the input
  • domain_idn_rendered (string): the rendered Unicode form of the IDN domain
  • possible_spoofed_ascii (list): a list of possible ASCII domains converted from the IDN form


  • Does not parse subdomains. Must provide a base domain

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xn-reverser, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size xn_reverser-1.0.0-py3-none-any.whl (12.6 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page