Crates.io | sleuth-kit |
lib.rs | sleuth-kit |
version | 0.0.1 |
source | src |
created_at | 2024-08-30 04:04:31.42931 |
updated_at | 2024-08-30 04:04:31.42931 |
description | A flexible OSINT toolkit for blockchain investigations |
homepage | |
repository | https://github.com/sleuthfi/sleuth-kit-rs |
max_upload_size | |
id | 1357378 |
size | 116,008 |
A Flexible OSINT Toolkit for Blockchain Investigations.
Overview • Features • Project Structure • Installation • Usage • Configuration • Contributing • License
Sleuth Kit is a flexible and extensible OSINT toolkit designed for blockchain investigations and intelligence gathering. It provides a suite of tools for compiling your own Data Lake of blockchain data and building custom tools for blockchain intelligence.
[!NOTE] This is the Rust version of the original Python Sleuth Kit.
sequenceDiagram
participant User
participant CLI
participant Config
participant API
participant Helpers
participant Database
participant CSV
User->>CLI: Run sleuth command
CLI->>Config: Load configuration
CLI->>Helpers: Setup database schema
Helpers->>Database: Create tables if not exist
alt Query Ethereum Account
User->>CLI: Choose "Query Ethereum Account"
CLI->>User: Prompt for Ethereum address
User->>CLI: Enter Ethereum address
CLI->>API: query_ethereum_account(address)
API->>API: load_sql_query('ethereum_accounts.sql')
API->>API: query_transpose(sql_query, params)
API-->>CLI: Return account data
alt SAVE_AS_CSV is True
CLI->>Helpers: save_to_csv(data, 'ethereum-accounts.csv', fields)
Helpers->>CSV: Write data
end
alt SAVE_AS_SQLITE is True
CLI->>Helpers: save_to_sqlite(data, 'ethereum_accounts')
Helpers->>Database: Insert or update data
end
CLI-->>User: Display result message
else Query Ethereum Transactions
User->>CLI: Choose "Query Ethereum Transactions"
CLI->>User: Prompt for Ethereum address
User->>CLI: Enter Ethereum address
CLI->>API: query_ethereum_transactions(address)
API->>API: load_sql_query('ethereum_transactions.sql')
loop Fetch all transactions
API->>API: query_transpose(sql_query, params)
end
API-->>CLI: Return all transactions
alt SAVE_AS_CSV is True
CLI->>Helpers: save_to_csv(data, 'ethereum-transactions.csv', fields)
Helpers->>CSV: Write transactions
end
alt SAVE_AS_SQLITE is True
CLI->>Helpers: save_to_sqlite(data, 'ethereum_transactions')
Helpers->>Database: Insert or update transactions
end
CLI-->>User: Display result message
else Setup
User->>CLI: Choose "Setup"
CLI->>Helpers: setup_database_schema()
Helpers->>Database: Create tables if not exist
CLI->>User: Prompt for Transpose API key
User->>CLI: Enter Transpose API key
CLI->>Config: Save Transpose API key
CLI-->>User: Display setup success message
end
sleuth-kit/
├── assets/
│ └── sleuth-kit-logo.png
├── src/
│ ├── api/
│ │ ├── mod.rs
│ │ └── transpose.rs
│ ├── cli/
│ │ └── mod.rs
│ ├── config/
│ │ └── mod.rs
│ ├── helpers/
│ │ ├── mod.rs
│ │ ├── setup_schema.rs
│ │ └── storage.rs
│ ├── sql/
│ │ ├── ethereum_accounts.sql
│ │ └── ethereum_transactions.sql
│ └── main.rs
├── data/
│ ├── csv/
│ └── sqlite/
├── Cargo.toml
├── .gitattributes
├── .gitignore
├── LICENSE
└── README.md
Ensure you have Rust installed on your system. If not, install it using the following methods:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install rust
Download and run the Rust installer from the official website.
Once the sleuth-kit crate is published, you can install it using Cargo:
cargo install sleuth-kit
Run the Sleuth Kit CLI:
sleuth
Follow the interactive prompts to:
Ensure that the .env
file is set up with the following variables:
TRANSPOSE_API_KEY
: Your Transpose API keySAVE_AS_CSV
: Set to "true" to save data as CSV (default: true)SAVE_AS_SQLITE
: Set to "true" to save data in SQLite (default: true)If you'd like to contribute to the Sleuth Kit project, follow these steps:
Clone the repository:
git clone https://github.com/yourusername/sleuth-kit.git
cd sleuth-kit
Install dependencies:
cargo build
Set up the environment variables:
Create a .env
file in the project root and add the necessary variables.
Run the project:
cargo run
Make your changes and create a pull request with a clear description of the changes and their purpose.
This project is licensed under the GNU Affero General Public License v3.0.