Thank you for your interest in contributing to dicti0nary-attack! This document provides guidelines for contributing to the project.
This project adheres to a code of conduct that promotes: - Respectful and inclusive communication - Ethical use of security tools - Collaboration and constructive feedback
If you find a bug:
-
Check if the issue already exists in GitHub Issues
-
If not, create a new issue with:
-
Clear, descriptive title
-
Steps to reproduce
-
Expected vs actual behavior
-
Environment details (OS, Python version, etc.)
-
Code samples or error messages
-
Feature requests are welcome! Please:
-
Check existing issues and discussions
-
Create a new issue with:
-
Clear description of the feature
-
Use cases and benefits
-
Potential implementation approach
-
Examples if applicable
-
We love pull requests! Here’s the process:
-
Fork the repository
-
Create a feature branch
bash git checkout -b feature/your-feature-name -
Make your changes
-
Write clean, readable code
-
Follow existing code style
-
Add tests for new functionality
-
Update documentation
-
-
Test your changes ```bash # Run tests pytest
# Check coverage pytest --cov=dicti0nary_attack
# Run linters flake8 src/ tests/ ```
-
Commit your changes
bash git commit -m "Add feature: description of your changes" -
Push to your fork
bash git push origin feature/your-feature-name -
Open a Pull Request
-
Provide a clear description
-
Reference any related issues
-
Explain the changes made
-
Include screenshots if applicable
-
# Clone your fork
git clone https://github.com/YOUR_USERNAME/dicti0nary-attack.git
cd dicti0nary-attack
# Install in development mode
pip install -e .
# Install development dependencies
pip install pytest pytest-cov flake8 black isort
# Run tests
pytestWe follow PEP 8 with some modifications:
-
Line Length: 127 characters max (relaxed from 79)
-
Formatting: Use
blackfor automatic formatting -
Imports: Use
isortto organize imports -
Docstrings: Google-style docstrings
Format your code:
# Auto-format with black
black src/ tests/
# Sort imports
isort src/ tests/
# Check with flake8
flake8 src/ tests/All new features must include tests:
-
Unit Tests: Test individual functions and classes
-
Integration Tests: Test component interactions
-
Coverage: Aim for >80% code coverage
Test file structure:
"""Tests for module_name."""
import pytest
from dicti0nary_attack.module import ClassName
class TestClassName:
"""Tests for ClassName."""
def test_feature_description(self):
"""Test that feature works correctly."""
# Arrange
instance = ClassName()
# Act
result = instance.method()
# Assert
assert result == expected_valueUpdate documentation for:
-
New features
-
API changes
-
Configuration options
-
Usage examples
Documentation locations:
- README.md - Overview and quick start
- docs/USAGE.md - Detailed usage guide
- docs/API.md - API reference
- Code docstrings - Inline documentation
To add a new password generator:
-
Create generator file:
src/dicti0nary_attack/generators/your_generator.py
from dicti0nary_attack.generators.base import PasswordGenerator
from typing import Iterator, Optional
class YourGenerator(PasswordGenerator):
def generate(self, count: Optional[int] = None) -> Iterator[str]:
# Your implementation
pass-
Add to init.py:
src/dicti0nary_attack/generators/init.py -
Write tests:
tests/test_your_generator.py -
Update CLI: Add to
src/dicti0nary_attack/cli.py -
Update documentation
For substantial features:
-
Discuss first: Open an issue to discuss the feature
-
Plan the implementation: Outline your approach
-
Break into commits: Make logical, atomic commits
-
Test thoroughly: Include comprehensive tests
-
Document completely: Update all relevant docs
Use clear, descriptive commit messages:
Add feature: brief description
Detailed explanation of what changed and why.
Include any relevant context or breaking changes.
Closes #123Format: - Add: New features - Fix: Bug fixes - Update: Changes to existing features - Refactor: Code improvements without functional changes - Docs: Documentation updates - Test: Test additions or changes
All pull requests go through review:
-
Automated tests must pass
-
Code review by maintainers
-
Discussion and potential revisions
-
Approval and merge
When contributing:
-
Never commit secrets: No API keys, passwords, etc.
-
Validate inputs: Always validate and sanitize user input
-
Document security implications: Explain security-related changes
-
Report vulnerabilities: Email security issues privately
By contributing, you agree that your contributions will be licensed under the GPL-3.0 License.