cantirust

Crates.iocantirust
lib.rscantirust
version1.0.1
created_at2025-09-26 12:45:32.431962+00
updated_at2025-09-26 12:52:46.477701+00
descriptionCantiRust - A powerful tool for calculating and distributing rewards in Cantina bug bounty contests
homepage
repositoryhttps://github.com/R1sco/Cantirust
max_upload_size
id1855834
size189,639
(R1sco)

documentation

README

CantiRust

A powerful Rust-based tool for calculating and distributing rewards in Cantina bug bounty contests. Features an intuitive terminal interface with dynamic project search and automatic prize pool detection.

Quick Install

One-liner (Recommended)

curl -sSL https://raw.githubusercontent.com/R1sco/Cantirust/main/install.sh | bash

Cargo Install

cargo install cantirust

Binary Download

Download pre-compiled binaries from Releases

Key Features

  • Dynamic Project Search - Search and select any Cantina project by name without needing repo IDs
  • Automatic Prize Pool Detection - Fetches and displays prize pot automatically for selected projects
  • Accurate Payout Calculations - Precise distribution based on finding severity and prize pool
  • Interactive Terminal UI - Clean, responsive interface with keyboard and mouse support
  • Real time Data Loading - Async operations with loading indicators and progress feedback
  • Comprehensive Finding Analysis - Detailed breakdown of vulnerabilities and participant contributions
  • Smart Caching - Cache results for instant repeat access
  • Retry Logic - Robust error handling with exponential backoff

Architecture

cantirust/
├── Cargo.toml              # Dependencies and metadata
├── README.md              # Documentation
├── .env.example          # Environment setup
└── src/
    ├── main.rs           # Application entry point
    ├── lib.rs            # Module exports
    ├── config/           # Configuration management
    ├── constants/        # Application constants
    ├── core/             # Business logic
    │   ├── api.rs        # Cantina API client
    │   ├── helpers.rs    # Utility functions
    │   └── calculator/   # Payout calculations
    ├── models/           # Data structures
    ├── ui/               # User interface
    │   ├── cli.rs        # Command line arguments
    │   └── tui/          # Terminal user interface
    └── utils/            # Helper utilities

Quick Start

Prerequisites

  • Rust 1.70+ (install from rustup.rs)
  • Valid Cantina API authentication token

Setup

  1. Copy environment template:

    cp .env.example .env
    
  2. Edit .env with your authentication token:

    CANTINA_AUTH_TOKEN=your_token_here
    

Usage

# Run the application
cantirust

# Optional: Ignore specific findings
cantirust -i 123,456

# Optional: Override severity for findings
cantirust -s "123:high,456:medium"

User Flow

  1. Launch - Run cantirust to start the application
  2. Search - Type project name and press Enter to search
  3. Select - Choose from search results using arrow keys
  4. View - Browse payout calculations and participant details
  5. Switch - Press ESC to return to search and select different project

Configuration

The application supports the following environment variables:

  • CANTINA_AUTH_TOKEN - Required: Your Cantina authentication token
  • CANTINA_API_LIMIT - Optional: API result limit (default: 200)
  • CANTINA_API_WITH_EVENTS - Optional: Include events in API responses (default: false)

Development

Building

cargo build --release

Testing

cargo test

Code Quality

  • All files follow Rust best practices with < 400 lines per file
  • Modular architecture with clear separation of concerns
  • Comprehensive error handling and user feedback
  • Async/await patterns for responsive UI

Security Note

Your Cantina auth_token grants account access. Store it securely (e.g. pass via environment variable and load it inside Config.COOKIE). Never commit real tokens to a public repo.

Acknowledgments

Inspired by ZeroCipher002's foundational Python implementation. Pull requests welcome!

License

MIT License - see LICENSE file for details.

Commit count: 0

cargo fmt