6 releases

0.3.0 Jan 28, 2023
0.2.1 Nov 23, 2022
0.1.0 Nov 9, 2022
0.1.0-RC2 Oct 29, 2022

#1145 in Cryptography

21 downloads per month

MIT/Apache

73KB
1.5K SLoC

Interactsh-rs

Documentation Crates.io License Downloads CI Tests

A Rust client library for getting interaction logs from Interactsh servers. See a basic example below; check out the examples or the client module in the API docs for more detailed use.

IMPORTANT NOTE: The 0.4 and possibly 0.5 releases are going to be major under the hood changes. The 0.4 release will include some changes to the existing public API.

Basic Use Example

use std::time::Duration;
use std::thread;
use interactsh_rs::prelude::*;

async fn run_client() {
    // Builds an unregistered client
    let client = ClientBuilder::default()
        .with_server("oast.pro".into())
        .parse_logs(true)
        .build()
        .unwrap();

    // Registers the client with the server and
    // returns a registered client
    let client = client.register().await.unwrap();
    let interaction_fqdn = client.get_interaction_fqdn();
    println!("INTERACTION URL: https://{}", interaction_fqdn);

    // Start a poll loop
    loop {
        thread::sleep(Duration::from_secs(5));

        let logs = match client.poll().await.unwrap() {
            Some(logs) => logs,
            None => continue,
        };

        // ...Do something with the returned logs...
    }

    // Once done, deregister the client
    client.deregister().await.unwrap();
}

Dependencies

~8–23MB
~348K SLoC