https://github.com/abendrothj/argus
Directory Checksum/Monitor tool
https://github.com/abendrothj/argus
checksum-generation cybersecurity-tools rust-lang
Last synced: about 2 months ago
JSON representation
Directory Checksum/Monitor tool
- Host: GitHub
- URL: https://github.com/abendrothj/argus
- Owner: abendrothj
- License: gpl-3.0
- Created: 2024-12-17T22:47:59.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-12-29T08:02:35.000Z (4 months ago)
- Last Synced: 2025-01-17T09:12:22.991Z (3 months ago)
- Topics: checksum-generation, cybersecurity-tools, rust-lang
- Language: Rust
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Argus - Directory Checksum/Monitoring Tool
Argus is a simple file integrity checker built in Rust. It recursively scans a given directory, calculates the SHA-256 checksum for each file, and stores the results in a file. It supports output in NDJSON (Newline Delimited JSON) format.
## Features
- Recursively scan a directory and its subdirectories.
- Calculate the SHA-256 checksum of each file.
- Output results in NDJSON format for easy processing.
- Supports command-line arguments for custom input and output paths.
- Directory monitoring mode#### Coming soon:
- Checking against old checksums for changes (WIP)
- Automation?## Requirements
- Rust 1.60 or higher.
- `cargo` (comes with Rust).## Installation
### 1. Clone the repository:
```bash
git clone https://github.com/your-username/argus.git
cd argus
```### 2. Build the project:
To compile the project in release mode (for an optimized executable):
```bash
cargo build --release
```### 3. Run the Standalone Executable:
Once built, the standalone executable can be found in the `target/release/` directory.
To scan a directory and save the integrity checksums to an output file, run:
```bash
./target/release/argus --directory /path/to/dir --output output.ndjson
```Replace `/path/to/dir` with the directory you want to scan and `output.ndjson` with the desired output file name.
If you want to use the default directory (current working directory) and the default output file (`./file_integrity.ndjson`), simply run:
```bash
./target/release/argus
```### Command-Line Arguments
- `--monitor`, `-m`: Sets monitoring mode on
- `--directory`, `-d`: The directory to scan or monitor (defaults to the current directory if not specified).
- `--output`, `-o`: The output file to save the checksums (checksum mode, defaults to `file_integrity.ndjson`).
- `--help`, `-h`: Displays the help message.
- `--version`, `-V`: Display the program's version.### Example Usage
```bash
# UNIX format
./argus --directory ./test_dir --output checksums.ndjson
```This will scan the `test_directory` folder and save the checksums in `checksums.ndjson`.
Checksum file MUST have .ndjson extension, or the program will not function.```powershell
# Windows format
argus.exe -m -d C:\
```This will start monitoring the C:\ drive for any changes, reporting all to console.
## File Format
The output file for checksums is in **NDJSON** format, which stores each file's checksum as a separate JSON object on a new line:
(Absolute path is used, including character limit bypass prefix if ran on Windows)```ndjson
{"path": "/path/to/file1", "checksum": "abc123..."}
{"path": "/path/to/file2", "checksum": "def456..."}
```## Development
If you'd like to contribute to this project, just make a pull request with information about your changes/improvements :)
## License
This project is licensed under the GPLv3 License. See the [LICENSE](LICENSE) file for details.
---
Made with ❤️ in Rust.