Skip to main content
Export your visual pipeline as standalone Rust source code that can be compiled into a high-performance, dependency-free executable.

Overview

IronBullet’s code export feature translates your visual pipeline into efficient Rust code using the wreq HTTP client library. The generated code is production-ready and can be customized further or integrated into other projects.

Exporting a Pipeline

1

Build your pipeline

Create and test your pipeline in the visual editor. Use Debug Mode to verify it works correctly.
2

Click Export Code

Find the export button in the toolbar or File menu.
3

Choose export format

Select Rust as the export language.
4

Save the file

Save the generated .rs file to your desired location.

Generated Code Structure

The exported code is a complete, self-contained Rust program:
// Generated by ironbullet
use wreq::Client;
use wreq_util::Emulation;
use regex::Regex;
use serde_json::Value;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let emulation = Emulation::Chrome131;
    let mut client = Client::builder()
        .emulation(emulation)
        .cookie_store(true)
        .build()?;

    // Block 1: HTTP Request
    let response = client.get("https://example.com/login")
        .header("User-Agent", "Mozilla/5.0...")
        .send()
        .await?;
    let source = response.text().await?;
    let responsecode = response.status().as_u16().to_string();

    // Block 2: Parse Regex
    let re = Regex::new(r"token\":\"([^\"]+)")?;
    let token = re.captures(&source)
        .and_then(|c| c.get(1))
        .map(|m| m.as_str().to_string())
        .unwrap_or_default();

    // Block 3: Second request with token
    let response2 = client.post("https://example.com/api/data")
        .header("Authorization", format!("Bearer {}", token))
        .send()
        .await?;

    println!("Success! Token: {}", token);
    Ok(())
}

Supported Blocks

Most IronBullet blocks are exportable to Rust:

HTTP Requests

let response = client.get(url)
    .header("User-Agent", ua)
    .body(request_body)
    .send()
    .await?;

Parsing Blocks

Regex:
let re = Regex::new(r"pattern")?;
let result = re.captures(&source)
    .and_then(|c| c.get(1))
    .map(|m| m.as_str())
    .unwrap_or("");
JSON:
let json: Value = serde_json::from_str(&source)?;
let value = json["path"]["to"]["field"]
    .as_str()
    .unwrap_or("");
CSS Selector:
let document = Html::parse_document(&source);
let selector = Selector::parse(".class-name")?;
let result = document.select(&selector)
    .next()
    .map(|el| el.text().collect::<String>())
    .unwrap_or_default();

String Functions

// Base64 encode
let encoded = base64::engine::general_purpose::STANDARD
    .encode(input.as_bytes());

// URL encode
let encoded = urlencoding::encode(&input);

// Uppercase
let upper = input.to_uppercase();

Crypto Functions

// MD5 hash
let digest = md5::compute(input.as_bytes());
let hash = format!("{:x}", digest);

// SHA256 hash
let mut hasher = sha2::Sha256::new();
hasher.update(input.as_bytes());
let hash = format!("{:x}", hasher.finalize());

Browser Emulation

The code generator automatically selects the appropriate browser emulation:
Pipeline SettingGenerated Code
ChromeEmulation::Chrome131
FirefoxEmulation::Firefox133
SafariEmulation::Safari18
EdgeEmulation::Edge131
This ensures TLS fingerprints and HTTP/2 settings match the chosen browser.

Dependencies

The generated code requires these Rust crates: Always included:
[dependencies]
tokio = { version = "1", features = ["full"] }
wreq = "0.12"
wreq-util = "0.1"
Conditionally added (based on blocks used):
regex = "1"              # If Parse Regex blocks present
serde_json = "1"         # If Parse JSON or API blocks
scraper = "0.17"         # If Parse CSS blocks
sxd-document = "0.3"     # If Parse XPath blocks
sxd-xpath = "0.4"
sha2 = "0.10"            # If Crypto blocks
md5 = "0.7"
base64 = "0.21"          # If Base64 functions
urlencoding = "2"        # If URL encode/decode
chrono = "0.4"           # If Date functions
rand = "0.8"             # If Random Data blocks
uuid = "1"               # If UUID generation
The code generator only includes dependencies for blocks you actually use, keeping the binary size minimal.

Compiling the Code

Create a New Rust Project

cargo new my_checker
cd my_checker

Add Dependencies

Edit Cargo.toml and add the required dependencies listed in the exported code comments.

Replace main.rs

cp exported_pipeline.rs src/main.rs

Build

Debug build (faster compile, slower runtime):
cargo build
./target/debug/my_checker
Release build (optimized, production-ready):
cargo build --release
./target/release/my_checker

Customizing Exported Code

The generated code is meant to be customized:

Add Command-Line Arguments

use clap::Parser;

#[derive(Parser)]
struct Args {
    #[arg(short, long)]
    wordlist: String,
    
    #[arg(short, long, default_value = "100")]
    threads: usize,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let args = Args::parse();
    // Use args.wordlist and args.threads
}

Add File I/O for Wordlists

use std::fs::File;
use std::io::{BufRead, BufReader};

let file = File::open("wordlist.txt")?;
let reader = BufReader::new(file);

for line in reader.lines() {
    let line = line?;
    let parts: Vec<&str> = line.split(':').collect();
    let username = parts[0];
    let password = parts[1];
    
    // Run pipeline for each line
    check_credentials(username, password).await?;
}

Add Multi-Threading

use tokio::task::JoinSet;

let mut set = JoinSet::new();

for line in lines {
    set.spawn(async move {
        check_credentials(&line).await
    });
    
    // Limit concurrent tasks
    if set.len() >= 100 {
        set.join_next().await;
    }
}

// Wait for remaining tasks
while set.join_next().await.is_some() {}

Advanced Features

The generated client automatically maintains cookies:
let mut client = Client::builder()
    .cookie_store(true)  // Enables automatic cookie handling
    .build()?;

// First request sets cookies
let resp1 = client.get("https://example.com/login").send().await?;

// Second request automatically includes cookies from first
let resp2 = client.get("https://example.com/profile").send().await?;

Proxy Support

Add proxy support to exported code:
use reqwest::Proxy;

let proxy = Proxy::all("http://proxy.example.com:8080")?;
let client = Client::builder()
    .proxy(proxy)
    .build()?;

Error Handling

Improve error handling:
match client.get(url).send().await {
    Ok(response) => {
        let status = response.status();
        if status.is_success() {
            // Process response
        } else {
            eprintln!("Request failed: {}", status);
        }
    }
    Err(e) => {
        eprintln!("Network error: {}", e);
    }
}

Use Cases

Standalone Checker

Export your pipeline and compile it into a single executable that can be distributed to others without requiring IronBullet.

CI/CD Integration

Use exported code in automated testing pipelines:
cargo test --release

Performance Critical Applications

Compiled Rust code runs faster than interpreted scripts, making it ideal for high-throughput checking.

Custom Modifications

Export as a starting point, then add custom business logic, database integrations, or API endpoints.

Limitations

Some blocks cannot be exported to code:
  • Browser automation blocks (require full Chrome installation)
  • Cloudflare Bypass (requires FlareSolverr service)
  • CAPTCHA Solver (requires external API)
  • Plugin blocks (depend on DLL files)
For these blocks, the code generator adds comments indicating manual implementation is required.

Next Steps