Skip to main content

Otacon — domain impersonation detection

CI PyPI version Python 3.10 and newer MIT licence Test coverage

Install · Quick start · Techniques · Usage · Scoring · CI/CD · FAQ

Otacon finds domains impersonating yours — typosquats, homoglyph fakes, combosquats, IDN/punycode tricks and more. It generates hundreds of variants, checks which are actually registered, and scores each by real-world phishing risk. One command, ~10 seconds, no paid APIs.

otacon scan example.com — 234 permutations checked, 13 registered, ranked by risk

Real output: a full scan of example.com — 234 permutations, 13 registered lookalikes, ranked by risk. Regenerate with python tools/render_demo_svg.py.


Install

pipx install otacon      # isolated global install (recommended)
pip install otacon       # or into an active virtualenv

macOS / Debian / Kali: the aiodns dependency needs the c-ares system library — brew install c-ares or sudo apt install libc-ares-dev. Windows: no extra steps, wheels are prebuilt.

Quick start

otacon scan example.com                   # full scan: DNS, MX, TLS, HTTP, WHOIS
otacon scan example.com --no-http         # DNS only — roughly 3x faster
otacon scan example.com --fail-on high    # CI gate: exit 2 on high or critical
otacon generate example.com -o list.txt   # offline wordlist, no network traffic
otacon                                    # guided interactive mode

Global flags (--quiet, --debug, --version) go before the subcommand; everything else goes after it.

Exit code Meaning
0 Scan completed — nothing at or above --fail-on, or --fail-on was not passed
1 Runtime error (bad input, file I/O)
2 Threshold breached — at least one registered variant met it

Reports are written with --json, --md, --html and --csv; pass as many as you like, since every format renders from the same in-memory report.


Why Otacon?

Phishing campaigns almost always start with a lookalike domain. Attackers register github-update.com, paypa1.com, goog1e.com weeks (or days) before the actual attack. By the time anyone notices, credentials are already gone.

Otacon is built for the people who need to find those domains before the attack lands:

Role Use case
Pentester / red team Reconnaissance — find existing lookalikes against the client's brand to include in scope or use in social-engineering tests
Blue team / SOC Scheduled audits of your own domain (e.g. a daily CI cron job) to catch a new fake fast, especially one with MX or fresh registration
Brand protection Audit hundreds of variants in one shot, export as JSON/HTML for the legal team or DMCA filings
CI/CD gate Block deploys when a critical impersonation is live (--fail-on critical)

Otacon is fully passive: DNS queries, a TLS handshake, one HTTP GET per variant. No exploit attempts, no auth, no scraping at scale.


Detection techniques

Otacon implements 12 permutation techniques modeled on real-world attacks. The homoglyph table covers all 26 letters, not just the handful that are easy to eyeball, and every Unicode entry in it is cross-checked against Unicode's own confusables.txt: 19 of the 25 share a UTS #39 skeleton with the letter they imitate. The other six (Cyrillic к, п, т, ь, plus ł and í) are kept on purpose — UTS #39 folds them elsewhere, but they render close enough in the sans-serif fonts browsers and mail clients use that real campaigns exploit them. Each of the six is labelled as such in the source, so nothing in the table is an unlabelled guess.

Technique Example (example.com) Real attack vector
Homoglyph examp1e.com, ex4mple.com Visual identity — humans can't tell the difference
IDN / Punycode xn--exampe-7db.com (l → ł) ACE-encoded unicode that browsers may render natively
Typo exmple.com, exsmple.com, exampel.com Fat-finger typing on QWERTY keyboards
Combosquat example-login.com, secureexample.com Adds "trust" keyword — common in phishing email links
TLD swap example.io, example.top, example.icu Same name, different (often cheap/abused) TLD
Subdomain spoof example.com.login.net Original domain as a label; URL-bar trickery
Bitsquat axample.com (e→a is one bit flip) DRAM/DNS memory errors flip a single bit
Hyphenation ex-ample.com Insert/remove a hyphen
Soundsquat eksample.com Phonetic substitution (ph/f, c/k, s/z, x/ks)
Vowel swap exomple.com, exumple.com Replace one vowel with another
Plural shops.com ← shop.com Singular ↔ plural variation
WWW-merge wwwexample.com Dot dropped between "www" and the domain — easy to misread

Every example above is real output, not an illustration. Each variant is reported once, under the first technique that produced it, and the original domain is never included — see docs/USAGE.md for why that matters when you read a report.


Documentation

Document What's in it
docs/USAGE.md Every CLI flag, the three modes, interactive triage, whitelisting
docs/SCORING.md Every signal and its point value, risk-level thresholds
docs/OUTPUT.md The five output formats and the JSON schema
docs/CI.md Ready-to-paste GitHub Actions and GitLab CI pipelines
docs/FAQ.md Legality, speed, IDN handling, troubleshooting
docs/DESIGN.md Architecture and design rationale

Comparison with dnstwist

dnstwist is the OG tool in this space. Otacon and dnstwist solve overlapping problems with different priorities.

Otacon dnstwist
Risk score with explained signals ✓ 0–100, every point sourced ✗ raw signals only
Defensive-registration flag ✓ » on redirect-to-original ✗
CI/CD exit code gating ✓ --fail-on ✗
Self-contained HTML report ✓ dark theme, no JS partial (--format html)
Interactive post-scan triage ✓ open/whois/rescan/allow ✗
Permutation techniques 12 13+
Visual screenshots of pages ✗ ✓
Fuzzy/phonetic dictionary attacks ✓ soundsquat ✓
GeoIP / Whois enrichment WHOIS only both

Use dnstwist if you want screenshots, fuzzy hashing, deeper enrichment. Use Otacon if you want an opinionated risk score, defensive-flag detection, and a CI-friendly exit code.


Contributing

See CONTRIBUTING.md for the dev setup and the lint gates, and SECURITY.md for the disclosure policy.


License & ethics

MIT License. Use it freely.

Otacon is passive only — DNS queries, a TLS handshake, a single HTTP GET per variant. No exploit attempts, no brute-forcing, no auth.

Use only on:

  • Domains you own
  • Domains within an authorized security testing engagement (with written scope)
  • Domains you have explicit permission to monitor

Do not use to: harass, dox, or build attack tooling. If you found this useful for a defense engagement, say hi — feedback shapes the roadmap.

Release files for otacon 1.0.1

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

Source distribution (sdist)

Source distribution for otacon 1.0.1
File Size Uploaded
otacon-1.0.1.tar.gz 98.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for otacon 1.0.1
File Interpreter ABI Platform
otacon-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 157.4 kB

Release files / otacon-1.0.1.tar.gz

Download URL otacon-1.0.1.tar.gz
Size 98.6 kB
Tags Source
SHA-256 checksum
How to use checksums
171d4fd7d5da6fbbf896a404c2011fe33a0b1c2a4de8f49fd184d6ea0e29d016
BLAKE2b-256 checksum
How to use checksums
332c89767db015aabaf88c1097eef8afa459548644a06ec494fde59f8963acac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / otacon-1.0.1-py3-none-any.whl

Download URL otacon-1.0.1-py3-none-any.whl
Size 58.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43ab19c21770d5879c11fa93d6c197ebea73d9eaa8397852cb5ecc68678dfc0c
BLAKE2b-256 checksum
How to use checksums
0529e269bd34c45af1823be63fd99abafbfef26196cf9d9414b1f7e77122ddf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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