Thank you for your interest in contributing! This document provides guidelines for contributing to the SQL Tamper Framework.
By participating in this project, you agree to abide by our Code of Conduct.
Before creating bug reports, please check existing issues. When creating a bug report, include:
- Framework version
- SQLMap version
- Detailed steps to reproduce
- Expected vs actual behavior
- SQL payload (sanitized)
- Target database type
- Logs/error messages
Use the Bug Report template.
Feature suggestions are welcome! Please:
- Check existing feature requests first
- Clearly describe the problem and solution
- Provide examples and use cases
- Indicate if you can implement it
Use the Feature Request template.
Have a new WAF bypass technique? Share it!
Important: Only share techniques discovered during authorized testing.
Use the WAF Bypass template.
# Clone the repository
git clone https://github.com/noobforanonymous/sqlmap-tamper-collection.git
cd sqlmap-tamper-collection
# Install in development mode
pip install -e .
# Run tests
python tests/test_lexer.py
python tests/test_transformer.py
python tests/test_integration.py- Create the module in
tamper_framework/transformations/
from tamper_framework.lexer import Token, TokenType
from tamper_framework.transformer import TransformationRule
from tamper_framework.context import SQLContext
def create_my_transform_rule() -> TransformationRule:
"""
Create your transformation rule
"""
def my_transform(token: Token, context: SQLContext) -> Token:
# Your transformation logic
return Token(
id=token.id, # Keep UUID
type=token.type,
value=new_value,
position=token.position,
line=token.line,
column=token.column
)
return TransformationRule(
name="my_transform",
transform_func=my_transform,
target_types=[TokenType.KEYWORD],
skip_types=[TokenType.STRING_LITERAL, TokenType.COMMENT],
track_transformed=True
)- Add to
__init__.py
from tamper_framework.transformations.my_transform import create_my_transform_rule
__all__ = [
# ... existing
'create_my_transform_rule',
]- Write tests
Create tests/test_my_transform.py:
from tamper_framework.transformer import SQLTransformer
from tamper_framework.transformations import create_my_transform_rule
def test_my_transform():
transformer = SQLTransformer()
transformer.add_rule(create_my_transform_rule())
result = transformer.transform("SELECT * FROM users")
assert result != "SELECT * FROM users"
# Add specific assertions-
Fork the repository
-
Create a feature branch
git checkout -b feature/my-new-feature
-
Make your changes
- Follow existing code style
- Add tests for new features
- Update documentation
-
Test your changes
# Run all tests python tests/test_lexer.py python tests/test_transformer.py python tests/test_integration.py # Test with SQLMap sqlmap -u "http://target.com?id=1" --tamper=your_script
-
Commit your changes
git add . git commit -m "Add feature: description"
-
Push to your fork
git push origin feature/my-new-feature
-
Create Pull Request
- Describe your changes
- Reference related issues
- Include test results
<type>: <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentationtest: Testsrefactor: Code refactoringperf: Performance improvement
Example:
feat: Add PostgreSQL operator encoding
- Implement PostgreSQL-specific operators
- Add context-aware encoding
- Include tests for all operators
Closes #123
- Follow PEP 8
- Use type hints
- Document functions with docstrings
- Keep functions focused and small
Example:
def transform_token(token: Token, context: SQLContext) -> Token:
"""
Transform a token based on context
Args:
token: Token to transform
context: SQL context information
Returns:
Transformed token
"""
# Implementation-
Always preserve token.id (UUID)
# CORRECT return Token(id=token.id, ...) # WRONG return Token(id=str(uuid.uuid4()), ...)
-
Handle multi-character operators correctly
# CORRECT if operator == '>=': return '%3E%3D' # WRONG for char in operator: encode(char) # Breaks >=
-
Check SQL context
# CORRECT if context.clause == ClauseType.WHERE: # Transform # WRONG # Transform everywhere
# All tests
python tests/test_lexer.py
python tests/test_transformer.py
python tests/test_integration.py
# Specific test
python -m pytest tests/test_lexer.py::test_multi_char_operatorsdef test_feature():
"""Test description"""
# Setup
transformer = SQLTransformer()
transformer.add_rule(create_rule())
# Execute
result = transformer.transform(query)
# Assert
assert expected in result
assert result != queryWhen adding features, update:
README.md- User-facing documentationdocs/API.md- API referencedocs/ARCHITECTURE.md- Architecture details- Docstrings in code
- Clear and concise
- Include examples
- Explain why, not just what
- Keep it up to date
Do NOT open public issues for security vulnerabilities.
Email: security@rothackers.com
When sharing WAF bypasses:
- ✅ Only share authorized discoveries
- ✅ Sanitize sensitive information
- ✅ Provide context and testing details
- ❌ Don't share zero-days publicly
- ❌ Don't include client information
- Questions: Use Discussions
- Bugs: Use Issues
- Email: support@rothackers.com
Contributors are recognized in:
- Release notes
- README.md contributors section
- Git commit history
Thank you for contributing to the SQL Tamper Framework! 🚀