Skip to main content

Find Unicode domain squats

https://img.shields.io/pypi/v/xn-twist.svg https://travis-ci.org/xn-twist/xn-twist.svg?branch=master https://codecov.io/gh/xn-twist/xn-twist/branch/master/graph/badge.svg Codacy Badge Updates

Installation

Stable release

To install XN Twist, run this command in your terminal:

pip install xn-twist

This is the preferred method to install XN Twist, as it will always install the most recent stable release.

If you don’t have pip installed, this Python installation guide can guide you through the process.

From sources

The sources for XN Twist can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/xn-twist/xn-twist

Or download the tarball:

$ curl  -OL https://github.com/xn-twist/xn-twist/tarball/master

Once you have a copy of the source, you can install it with:

$ python setup.py install

Usage

Via Python

You can use XN-Twist in a script as follows:

from xn_twist import XNTwist
xn = XNTwist()
twist_results = xn.twist('example.com')

There is an optional limit value that can be passed into the twist function to limit the number of characters used as a spoofs. This cuts down on the processing load and makes the results manageable. An example usage is shown below.

from xn_twist import XNTwist
xn = XNTwist()
twist_results = xn.twist('example.com', limit=2)

The response will be json that looks something like:

{
    "datetime": "2018-04-06 05:33:45.889048",
    "possible_squats": [
        {
            "displayed": "\u0430.com",
            "punycode": "xn--80a.com"
        },
        {
            "displayed": "\u0105.com",
            "punycode": "xn--2da.com"
        },
        {
            "displayed": "\u03ac.com",
            "punycode": "xn--hxa.com"
        },
        {
            "displayed": "\u00e1.com",
            "punycode": "xn--1ca.com"
        },
        {
            "displayed": "\u01ce.com",
            "punycode": "xn--tja.com"
        },
        {
            "displayed": "\u1f05.com",
            "punycode": "xn--ing.com"
        },
        {
            "displayed": "\u01df.com",
            "punycode": "xn--bka.com"
        },
        {
            "displayed": "\u1f00.com",
            "punycode": "xn--dng.com"
        },
        {
            "displayed": "\u1f01.com",
            "punycode": "xn--eng.com"
        },
        {
            "displayed": "\u00e4.com",
            "punycode": "xn--4ca.com"
        }
    ],
    "count": 10,
    "xn_twist_version": "1.2.0"
}

Via Command Line

You can use XN-Twist from the command line as follows:

xntwist example.com

The usage for the command line form of XN-Twist is as follows:

XN Twist.

Usage:
    xntwist <domain> [--limit=LIMIT] [--dns] [--output=OUTPUT]
    xntwist (-h | --help)
    xntwist --version

Options:
    -h --help     Show this screen.
    --version     Show version.
    -l=LIMIT --limit=LIMIT    Limit the number of characters used as spoofs [default: 5].
    -d --dns  Query DNS for each domain.
    -o=OUTPUT --output=OUTPUT  Specify an output file.

Run Tests

After cloning the repo, you can test it using the following commands from the base directory of this repository:

make test

Data, Data, Everywhere…

This project relies on a dataset. More details on how to access the dataset and even how to help us build it coming soon!

Credits

This package was created with Cookiecutter and the fhightower/python-project-template project template.

Download files

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

Source Distribution

xn-twist-1.3.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xn_twist-1.3.0-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file xn-twist-1.3.0.tar.gz.

File metadata

  • Download URL: xn-twist-1.3.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xn-twist-1.3.0.tar.gz
Algorithm Hash digest
SHA256 dc23a331d841def500ce622b9ea38d3f06167e71101fa4bf9782cbe33496335a
MD5 ea1b456e4034fb93cba6147747240782
BLAKE2b-256 e2a6aa73ea0f5b57b080748c1937f00bc28cf399270441ecc812bc678af1f81c

See more details on using hashes here.

File details

Details for the file xn_twist-1.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for xn_twist-1.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6362129c0dd584633928224572fc2f296e28aaee75a169f2f7c6f2f779001acc
MD5 0b6de1456193407fcd716fc07076626c
BLAKE2b-256 091072a399fb79198828901909c317d447e85b27155db9573aca5552cce2ad6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page