Contributing to HackingTool
Thank you for your interest in contributing to HackingTool! This guide will help you understand the project structure and how to add new tools.Getting Started
Prerequisites
Before contributing, make sure you have:- Python 3.x installed
- Git installed and configured
- A GitHub account
- Familiarity with Python object-oriented programming
- Understanding of the tool you want to add
Fork and Clone
Set up your development environment
Set up your development environment
- Fork the repository on GitHub: https://github.com/Z4nzu/hackingtool
-
Clone your fork:
-
Add upstream remote:
-
Create a virtual environment:
-
Install dependencies:
Project Structure
Understanding the codebase structure is crucial for contributing:Understanding core.py
Thecore.py file contains the foundation of HackingTool. Let’s explore the main classes:
HackingTool Class
TheHackingTool class is the base class for all individual tools:
File reference:
core.py:36-44install()- Executes installation commands (core.py:104)run()- Executes run commands (core.py:130)uninstall()- Removes the tool (core.py:118)show_options()- Displays tool menu (core.py:64)show_info()- Shows tool information (core.py:58)
HackingToolsCollection Class
Groups related tools together:File reference:
core.py:149-152Adding a New Tool
Step 1: Choose the Right Category
First, determine which category your tool belongs to:- Anonymity (
anonsurf.py) - Information Gathering (
information_gathering_tools.py) - Wireless Attacks (
wireless_attack_tools.py) - SQL Injection (
sql_tools.py) - Phishing (
phising_attack.py) - Web Attacks (
webattack.py) - Post Exploitation (
post_exploitation.py) - Forensics (
forensic_tools.py) - Payload Creation (
payload_creator.py) - Exploit Frameworks (
exploit_frameworks.py) - Reverse Engineering (
reverse_engineering.py) - DDoS (
ddos.py) - Remote Administration (
remote_administration.py) - XSS Attacks (
xss_attack.py) - Steganography (
steganography.py) - Wordlist Generation (
wordlist_generator.py) - Other Tools (
other_tools.pyor subcategories inothers/)
Step 2: Create Your Tool Class
Here’s a complete example of adding a new tool:Example: Adding a new information gathering tool
Example: Adding a new information gathering tool
Step 3: Add to Collection
Add your tool to the appropriate collection class:Step 4: Advanced Tool Options
Add custom options to your tool
Add custom options to your tool
If your tool needs custom options beyond install/run:
Step 5: Lifecycle Hooks
Use lifecycle hooks for custom behavior
Use lifecycle hooks for custom behavior
You can override these methods for custom behavior:
Code Style Guidelines
Follow Python Conventions
The project uses
ruff, black, and mypy for code quality. Check .github/workflows/lint_python.yml for CI requirements.-
Use Rich library for output:
-
Follow PEP 8 naming:
- Classes:
PascalCase - Functions/variables:
snake_case - Constants:
UPPER_CASE
- Classes:
-
Add docstrings:
-
Use type hints (Python 3.7+):
Testing Your Changes
Before submitting:Submitting Pull Requests
Create a Feature Branch
Make Your Changes
Best practices for commits
Best practices for commits
-
Make focused commits:
-
Write clear commit messages:
- Use present tense: “Add feature” not “Added feature”
- Be descriptive but concise
- Reference issue numbers if applicable: “Add tool X (fixes #123)”
-
Test before committing:
- Verify the tool installs correctly
- Test all menu options
- Check for runtime errors
Push and Create PR
- Go to your fork on GitHub
- Click “Compare & pull request”
- Fill out the PR template with:
- Description of the tool
- Category it belongs to
- Why it should be included
- Testing performed
- Screenshots (if applicable)
PR Review Process
After submitting your PR:-
Automated checks will run:
- Installation test (
test_install.yml) - Python linting (
lint_python.yml)
- Installation test (
-
Maintainer review:
- Code quality check
- Tool relevance verification
- Security considerations
-
Address feedback:
Contributing Beyond Code
You can contribute in many ways:Documentation
- Improve README.md
- Add usage examples
- Write tutorials
- Translate documentation
Bug Reports
Use the bug report template at.github/ISSUE_TEMPLATE/bug_report.md:
Include:
- OS and version
- Python version
- Steps to reproduce
- Expected vs actual behavior
- Error messages/logs
Feature Requests
Use the feature request template at.github/ISSUE_TEMPLATE/feature_request.md:
Describe:
- The problem you’re trying to solve
- Your proposed solution
- Alternative approaches considered
- Additional context
Suggest New Tools
Tool suggestion guidelines
Tool suggestion guidelines
When suggesting a new tool, provide:
- Tool name and purpose
- GitHub/project URL
- Category it belongs to
- Why it’s useful for penetration testing
- Installation method
- License information
- Active maintenance status
Community Guidelines
Be Respectful
- Treat all contributors with respect
- Provide constructive feedback
- Be patient with newcomers
- Follow the code of conduct
Stay On Topic
- Keep discussions relevant to the project
- Use appropriate channels (issues, PRs, discussions)
- Don’t spam or self-promote
Ethical Considerations
Development Tips
Debug Mode
Testing Individual Tools
Check Existing Implementations
Study existing tool implementations for patterns:- Simple tool:
tools/anonsurf.py:17-36(AnonymouslySurf) - Tool with options:
tools/anonsurf.py:30-36(custom stop method) - Non-runnable tool:
tools/anonsurf.py:39-53(Multitor)
Resources
- Project Repository: https://github.com/Z4nzu/hackingtool
- Report Issues: GitHub Issues
- Feature Requests: Google Form
- Python Rich Documentation: https://rich.readthedocs.io/