Skip to main content

🔍 Batin

Security-Hardened File Type Detection

🔍

Deep Detection

Goes beyond file extensions. Analyzes magic bytes, entropy, and file structure to reveal true content.

🛡️

Security First

Zero unsafe code. Fuzz-tested. Bounded resource usage. Built to handle any input safely.

High Performance

Async I/O with Tokio. Parallel processing with Rayon. Optimized single-pass algorithms.

🎯

Threat Detection

Identifies packed executables, polyglot files, embedded macros, and suspicious patterns.

📦

Easy Integration

Use as a CLI tool, Rust library, or Docker container. JSON and CSV output for automation.

🌍

Cross-Platform

Works on Linux, Windows, macOS, and FreeBSD. Multiple architecture support.

Quick Start

Install via Cargo

cargo install batin

Scan a File

batin scan suspicious.exe

Use as Library

use batin::{FileType, DetectionConfig};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = DetectionConfig::default();
    let result = FileType::from_file_path("file.pdf", &config).await?;
    
    println!("Type: {} ({:?})", result.extension, result.threat_level);
    Ok(())
}