LeakHunter is a Python-based tool designed to scan files and directories for sensitive data leaks using regular expressions and YARA rules. It also supports VirusTotal integration for malware detection.
- Regex-based scanning for API keys, passwords, emails, and credit card numbers.
- YARA rule scanning for detecting sensitive data patterns.
- VirusTotal API support to check files against known malware signatures.
- Directory and file scanning with customizable rule sets.
- Color-coded output for easy readability.
LeakHunter/
│── main.py # Main script
│── rules/ # YARA rule files
│ └── sensitive_data.yar
│── leakhunter/ # Core package
│ │── __init__.py # Package initializer
│ │── scanner.py # Regex-based scanner
│ │── yara_scanner.py # YARA-based scanner
│ │── virustotal.py # VirusTotal API integration
│ │── utils.py # Helper functions
│── tests/ # Unit tests
│ └── test_scanner.py
│── requirements.txt # Dependencies
│── README.md # Documentation
git clone https://github.com/SaiBhargavYenisetti/LeakHunter.git
cd LeakHunterpip install -r requirements.txtIf using VirusTotal, add your API key to an environment variable:
export VIRUSTOTAL_API_KEY='your_api_key_here'python main.py --path /path/to/file.txtpython main.py --path /path/to/directory/python main.py --path /path/to/directory --yara rules/sensitive_data.yarpython main.py --path /path/to/file --virustotalModify rules/sensitive_data.yar to add custom YARA rules.
- Ensure
yara_scanner.pyis insideleakhunter/. - Run the script as a module:
python -m leakhunter.main --path /path/to/scan
This project is licensed under the MIT License.
Pull requests are welcome! If you'd like to contribute, please fork the repository and submit a PR.
For support or questions, reach out to bhargavy08948@gmail.com.
✅ Happy Scanning! 🚀