24 releases

new 0.6.8 Nov 12, 2024
0.6.5 Aug 14, 2024
0.6.3 Oct 13, 2023
0.5.2 Jul 30, 2023
0.3.1-beta Oct 27, 2020

#894 in Algorithms

Download history 71/week @ 2024-07-28 234/week @ 2024-08-11 15/week @ 2024-08-18 18/week @ 2024-09-15 51/week @ 2024-09-22 24/week @ 2024-09-29 158/week @ 2024-10-06 113/week @ 2024-10-13 52/week @ 2024-10-20 3/week @ 2024-10-27 2/week @ 2024-11-03 116/week @ 2024-11-10

280 downloads per month

MIT license

135KB
6K SLoC

Twistrs is a domain name permutation and enumeration library that is built on top of async Rust.

The library is designed to be fast, modular and easy-to-use for clients.

The two primary structs to look into are Domain and DomainMetadata.

Additionally the module documentation for permutation and enumeration provides more granular details on how each module may be used indepedently.

domain permutation and enrichment asynchronously.

Example

The following is a trivial example using Tokio mpsc.

use twistrs::enrich::DomainMetadata;
use twistrs::permutate::Domain;

use tokio::sync::mpsc;


#[tokio::main]
async fn main() {
    let domain = Domain::new("google.com").unwrap();
    let permutations = domain.addition();

    let (tx, mut rx) = mpsc::channel(1000);

    for permutation in permutations {
        let domain_metadata = DomainMetadata::new(permutation.domain.fqdn.clone());
        let mut tx = tx.clone();

        tokio::spawn(async move {
            if let Err(_) = tx.send((permutation.clone(), domain_metadata.dns_resolvable().await)).await {
                println!("received dropped");
                return;
            }

            drop(tx);
        });
    }

    drop(tx);

    while let Some(i) = rx.recv().await {
        println!("{:?}", i);
    }
}

Dependencies

~10–22MB
~358K SLoC