GitHub - Zierax/HackFunction: HackFunction is a opensource python library work as A toolkit for basic security checks and scans
๐ Hackfunc Project
๐ Overview
The Hackfunc Project is a comprehensive suite of cybersecurity tools and libraries designed to empower security researchers, penetration testers, and bug bounty hunters. It automates essential tasks in:
- ๐ต๏ธโโ๏ธ Reconnaissance
- ๐ Vulnerability Scanning
- ๐ Cryptography
- ๐ Blockchain Analysis
- ๐ Network Security
Each module is crafted for flexibility, allowing seamless integration into larger security frameworks or independent use.
๐ Key Features
- ๐ Cryptography Module: Secure data encryption, key generation, and hashing algorithms (RSA, AES, HMAC).
- ๐ Blockchain Module: Smart contract vulnerability analysis and blockchain data interaction.
- ๐ Infoga Module: Domain and subdomain information gathering (WHOIS, SSL, etc.).
- ๐ก๏ธ Vuln Module: Web application vulnerability scanning (SQL injection, XSS, CSRF).
- ๐ Network Scans Module: Comprehensive network reconnaissance tools (Nmap, Masscan, traceroute).
๐๏ธ Project Structure
The project is organized into modules, each targeting a specific cybersecurity domain:
hackfunc/
โ
โโโ cryptography/ # Cryptographic functions (e.g., AES, RSA, HMAC)
โ
โโโ blockchain/ # Blockchain analysis tools (e.g., smart contract analysis, etc.)
โ
โโโ infoga/ # Information gathering (e.g., WHOIS, subdomain enumeration, etc.)
โ
โโโ vuln/ # Vulnerability scanning (e.g., SQL injection, XSS, Command Injection, SSRF, etc.)
โ
โโโ network_scans/ # Network scanning tools (e.g., Nmap, Masscan, traceroute, etc.)
โ
โโโ utils/ # Utility functions (e.g., logging, argument parsing, etc.)
๐ Cryptography
- Key generation, encryption, and decryption using algorithms like AES, RSA, and HMAC.
๐ Blockchain
- Tools for auditing smart contracts and analyzing token transfers.
๐ Infoga
- Domain-related information gathering, including WHOIS and SSL details.
๐ก๏ธ Vuln
- Automated scans for web application vulnerabilities like SQL injection and XSS.
๐ Network Scans
- Network scanning tools for port scanning, service enumeration, and diagnostics.
๐ ๏ธ Installation
To get started with Hackfunc, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/hackfunc.git cd hackfunc -
Install dependencies:
pip install -r requirements.txt
-
Set up your environment:
- Ensure external tools (e.g., Nmap, Masscan) are installed.
- Set up necessary API keys or credentials for services like Shodan, Infoga.
๐ Usage
Each module can be executed independently or integrated into other scripts. Here are some examples:
๐ Cryptography
- Encrypting a file:
from hackfunc.cryptography import AdvancedCryptography crypto = AdvancedCryptography() crypto.encrypt_file('path/to/file.txt', key='your_secret_key')
๐ Blockchain
- Analyze a smart contract:
from hackfunc.blockchain import BlockchainHacker hacker = BlockchainHacker() vulnerabilities = await hacker.analyze_smart_contract('0xContractAddress') print(vulnerabilities)
๐ Infoga
- Perform a WHOIS lookup:
import whois domain_info = whois.whois('example.com') print(domain_info)
๐ก๏ธ Vuln
- Scan for vulnerabilities:
from hackfunc.vuln import VulnerabilityScanner scanner = VulnerabilityScanner('http://example.com') scanner.sql_injection_check()
๐ Network Scans
- Perform a Nmap scan:
from hackfunc.network_scans import nmap_scan results = nmap_scan('192.168.1.1', ['TCP_SYN_SCAN', 'SERVICE_VERSION_INTENSITY']) print(results)
๐ Best Practices
- ๐ API Key Management: Store keys securely using environment variables or configuration files.
โ ๏ธ Error Handling: Implement error handling for network issues or API errors.- ๐ Update Dependencies: Regularly update libraries and tools.
- โ๏ธ Legal Compliance: Obtain permission before scanning or gathering information from external systems.
๐ License
- This project is licensed under the MIT License - see the LICENSE file for details.