Skip to main content

xn-reverser

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

Usage

import xn_reverser

result = xn_reverser.xn_reverser("xn--80ak6aa92e.com")
print(result["possible_spoofed_ascii"])

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

Caveats

  • Does not parse subdomains. Must provide a base domain

Metadata

Release files for xn-reverser 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for xn-reverser 1.0.0
File Interpreter ABI Platform Actions
xn_reverser-1.0.0-py3-none-any.whl Python 3 none any Details for xn_reverser-1.0.0-py3-none-any.whl

Release files / xn_reverser-1.0.0-py3-none-any.whl

Download URL xn_reverser-1.0.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4254a36b24b76b624b8fe3bb67a5677ff3dc696198be294701b11ff79c7645d
BLAKE2b-256 checksum
How to use checksums
1a85ade2105f5ec1cec720762b01e9e80835bb0f2b505ed9f988c890ed1f9d22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Security for xn-reverser 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page