{"id":13580351,"url":"https://github.com/haveibeensquatted/twistrs","last_synced_at":"2025-04-06T02:31:28.086Z","repository":{"id":37039189,"uuid":"250807300","full_name":"haveibeensquatted/twistrs","owner":"haveibeensquatted","description":"A domain name permutation and enumeration library powered by Rust.","archived":false,"fork":false,"pushed_at":"2025-03-24T19:46:46.000Z","size":50904,"stargazers_count":118,"open_issues_count":5,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T19:48:32.376Z","etag":null,"topics":["dns-lookup","permutation","rust","security","security-tools","typosquatting"],"latest_commit_sha":null,"homepage":"https://haveibeensquatted.com/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haveibeensquatted.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-28T13:52:55.000Z","updated_at":"2025-03-27T07:07:39.000Z","dependencies_parsed_at":"2023-02-17T10:16:07.532Z","dependency_job_id":"98b9a105-d3d5-4f72-a860-4dca72189e08","html_url":"https://github.com/haveibeensquatted/twistrs","commit_stats":{"total_commits":171,"total_committers":8,"mean_commits":21.375,"dds":"0.36257309941520466","last_synced_commit":"7d11e68f825f8508a67120f1fba7ae32ea36f0bb"},"previous_names":["haveibeensquatted/twistrs","juxhindb/twistrs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haveibeensquatted%2Ftwistrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haveibeensquatted%2Ftwistrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haveibeensquatted%2Ftwistrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haveibeensquatted%2Ftwistrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haveibeensquatted","download_url":"https://codeload.github.com/haveibeensquatted/twistrs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247425962,"owners_count":20937040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns-lookup","permutation","rust","security","security-tools","typosquatting"],"created_at":"2024-08-01T15:01:50.126Z","updated_at":"2025-04-06T02:31:28.077Z","avatar_url":"https://github.com/haveibeensquatted.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Twistr — [![Build \u0026 Test](https://github.com/JuxhinDB/twistrs/actions/workflows/rust.yml/badge.svg)](https://github.com/JuxhinDB/twistrs/actions/workflows/rust.yml) ![Status](https://img.shields.io/static/v1?label=Status\u0026message=beta\u0026color=orange) [![docs](https://docs.rs/twistrs/badge.svg)](https://docs.rs/twistrs/) ![crates.io](https://img.shields.io/crates/v/twistrs.svg) [![Discord invite](https://dcbadge.vercel.app/api/server/w8tksBQQq5?style=flat)](https://discord.gg/w8tksBQQq5)\n\n\u003cimg align=\"left\" width=\"20%\" height=\"20%\" src=\"res/logo-x1024.png\"\u003e\n\n\u003e Twistr is a Domain name permutation and enumeration library powered by Rust. It aims to directly port the well-known [dnstwist](https://github.com/elceef/dnstwist) tool allowing for fast and flexible interfacing capabilities with the core libraries based on client's requirements.\n\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n## Quickstart\n\nThis is particularly helpful if you're from outside the Rust space and would like to get up and running quickly. \n\n1. Install [Rust](https://www.rust-lang.org/tools/install)\n2. `git clone https://github.com/JuxhinDB/twistrs.git`\n3. `cd examples/twistrs-cli`\n4. `cargo r -- github.com`\n\nKeep in mind that this will not run with a release build and will be naturally slower, however it should allow you to explore some of the functionality.\n\n## Usage\n\nThe core library is composed of the domain permutation module and the domain enrichment module that can be used individually or chained together.\n\nThe following is a boiled-down version of the [twistrs-cli example](examples/twistrs-cli/src/main.rs) that uses [tokio mpsc](https://docs.rs/tokio/0.2.22/tokio/sync/mpsc/index.html).\n\n```rust\nuse twistrs::enrich::DomainMetadata;\nuse twistrs::permutate::Domain;\n\nuse tokio::sync::mpsc;\n\n#[tokio::main]\nasync fn main() {\n    let domain = Domain::new(\"google.com\").unwrap();\n    let permutations = domain.all().unwrap();\n\n    let (tx, mut rx) = mpsc::channel(1000);\n\n    for permutation in permutations {\n        let domain_metadata = DomainMetadata::new(permutation.clone());\n        let mut tx = tx.clone();\n\n        tokio::spawn(async move\n            if let Err(_) = tx.send((permutation.clone(), domain_metadata.dns_resolvable().await)).await {\n                println!(\"received dropped\");\n                return;\n            }\n\n            drop(tx);\n        });\n    }\n\n    drop(tx);\n\n    while let Some(i) = rx.recv().await {\n        println!(\"{:?}\", i);\n    }\n}\n```\n\n## Features\n\n- Granular control over Permutation or Enrichment modules\n  + Use specific permutation algorithms (e.g. homoglyphs)\n  + Use specific data enrichment methods (e.g. DNS lookup)\n- Concurrency out of the box\n- Exceptionally fast end-to-end results\n- Core library allowing easy extensions (i.e. CLI, API \u0026 streams)\n\n#### Miscellaneous\n- [x] [Blog post](https://blog.digital-horror.com/twistrs)\n- [x] [HaveIBeenSquatted](https://haveibeensquatted.com/) \n\n---\n\n## Frequently Asked Questions\n\nQ: If I want to use a different set of dictionaries to the one provided out of the box by the libary, how can I achieve that?\n\nA: Currently the library (for ease-of-use) bakes the dictionaries into the final binary through a build script. To customise this, you would need to update the [dictionary files](./twistrs/dictionaries/) and compile the library using `cargo b` or `cargo b --release`. You can also reference the library in your own Cargo.toml, pointing to a local copy.\n\nQ: How does the cached GeoIP lookup work?\n\nA: Currently requires the client to supply their own [`maxminddb`](https://docs.rs/maxminddb/0.15.0/maxminddb/struct.Reader.html) reader and dataset. Twistrs at this point in time\nis mostly an auxillliary wrapper to streamline processing of the DomainMetadata results.\n\n## License\n\nThis project is licensed under the [MIT license](LICENSE).\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in Twistrs by you, shall be licensed as MIT, without any additional\nterms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaveibeensquatted%2Ftwistrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaveibeensquatted%2Ftwistrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaveibeensquatted%2Ftwistrs/lists"}