{"id":23622,"library":"dnstwist","title":"dnstwist","description":"dnstwist is a domain name permutation engine for detecting homograph phishing attacks, typo squatting, and brand impersonation. Current version is 20250130. Release cadence is irregular, with multiple releases per year.","status":"active","version":"20250130","language":"python","source_language":"en","source_url":"https://github.com/elceef/dnstwist","tags":["domain","phishing","typosquatting","homograph","security","dns","permutation"],"install":[{"cmd":"pip install dnstwist","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"DNS resolution; install if not present.","package":"dnspython","optional":true},{"reason":"Fuzzy hashing for content similarity.","package":"ssdeep","optional":true},{"reason":"Alternative fuzzy hashing (TLSH).","package":"tls","optional":true},{"reason":"Geolocation of IP addresses.","package":"geoip2","optional":true},{"reason":"WHOIS lookups (external module replaced by internal implementation in 20230918, but still optional for fallback).","package":"whois","optional":true}],"imports":[{"note":"The 'domains' function is not part of the public API; use the Fuzzer class instead.","wrong":"from dnstwist import domains","symbol":"domains","correct":"import dnstwist"},{"note":"","wrong":"","symbol":"Fuzzer","correct":"from dnstwist import Fuzzer"},{"note":"","wrong":"","symbol":"Format","correct":"from dnstwist import Format"}],"quickstart":{"code":"from dnstwist import Fuzzer, Format\n\n# Initialize Fuzzer with a domain name\nfuzzer = Fuzzer('example.com')\n# Generate permutations\npermutations = fuzzer.generate()\nprint(Format.table(permutations))","lang":"python","description":"Demonstrates basic usage: instantiate Fuzzer with a domain, generate permutations, and print as a table."},"warnings":[{"fix":"Ensure your code does not rely on external whois module output format.","message":"Version 20230918 replaced the WHOIS module with a pure-Python implementation. External WHOIS dependencies are no longer required but may still be used as fallback.","severity":"breaking","affected_versions":">=20230918"},{"fix":"Replace any use of '--ssdeep' with '--lsh ssdeep' or '--lsh tlsh'.","message":"In version 20230402, the '--ssdeep' argument was replaced with '--lsh' to support multiple fuzzy hash types (ssdeep, tlsh).","severity":"breaking","affected_versions":">=20230402"},{"fix":"Install dnspython: pip install dnspython","message":"DNS resolution requires dnspython; if not installed, dnstwist falls back to a basic 'getaddrinfo()' resolver which may be slower and less feature-rich.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from dnstwist.lib.format import Format' if needed, but upgrading is recommended.","message":"The 'Format' class is used for displaying results but is not importable directly from the top-level package in older versions (it became public around 20221011).","severity":"gotcha","affected_versions":"<20221011"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install dnstwist'","cause":"Package not installed in the current environment.","error":"ModuleNotFoundError: No module named 'dnstwist'"},{"fix":"Replace '--ssdeep' with '--lsh ssdeep'.","cause":"The '--ssdeep' flag was replaced by '--lsh' in version 20230402.","error":"dnstwist: error: unrecognized arguments: --ssdeep"},{"fix":"Use the Fuzzer class: 'from dnstwist import Fuzzer'","cause":"The 'domains' function is not a public API; it was removed or never existed.","error":"AttributeError: module 'dnstwist' has no attribute 'domains'"},{"fix":"Upgrade dnstwist to version >=20221011 or import from 'dnstwist.lib.fuzzer'.","cause":"Old version of dnstwist where Fuzzer was not exposed at package level.","error":"ImportError: cannot import name 'Fuzzer' from 'dnstwist'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}