COMPANY: CODETECH IT SOLUTIONS
NAME: GYANMOTAY VIKAS
INTERN ID: CT12RGV
DOMAIN: CYBER SECURITY & ETHICAL HACKING
DURATION: 8 WEEKS
MENTOR: NELLA SANTOSH
Welcome to the Python-based modular penetration testing toolkitβyour go-to solution for ethical hacking and security testing. Designed for professionals and cybersecurity enthusiasts, this toolkit provides a robust set of modules for network scanning, brute-force attacks, and vulnerability assessment.
Ensure you have Python installed (version 3.x recommended) and install the required dependencies:
pip install -r requirements.txt
Easily run penetration tests using command-line arguments:
Scan for open ports within a specific range:
python main.py scan --start <start_port> --end <end_port>
python main.py scan 192.168.1.1 --start 20 --end 100
Test login credentials with a password list:
python main.py brute <password_file>
python main.py brute http://example.com/login admin passwords.txt
Scan for SQL Injection and XSS vulnerabilities:
python main.py vuln
python main.py vuln http://example.com/search query
π¦ toolkit/ βββ init.py
βββ port_scanner.py
βββ brute_forcer.py
βββ vulnerability_scanner.py
βββ utils.py
π main.py
π requirements.txt
π tests/ βββ test_brute_forcer.py
βββ test_port_scanner.py
βββ test_utils.py
Run unit tests to ensure functionality:
pytest
We welcome contributions! Fork the repo, create a feature branch, and submit a pull request. Report bugs or suggest features via GitHub Issues.
π¨ This toolkit is for educational and ethical hacking purposes only. Unauthorized or malicious use is strictly prohibited and may lead to legal consequences.
This project is open-source and licensed under the MIT License. Feel free to use and modify it for ethical hacking and research purposes.
Command: python main.py scan 127.0.0.1 --start 1 --end 1024
Output: Scanning ports: 100%|ββββββββββββββββββββββββββββββββββββββββ| 1024/1024 [00:10<00:00, 100.00 ports/s] Open ports: [22, 80, 443]
Command: python main.py brute http://example.com/login admin passwords.txt
Output: Trying password: password123 Trying password: admin123 Login successful: ('admin', 'admin123')
Command: python main.py vuln http://example.com/search?query=test query
Output: Testing for SQL Injection... SQL Injection vulnerability found!
Testing for XSS... XSS vulnerability found!
Example: Invalid IP Address
Command: python main.py scan invalid_ip --start 1 --end 100
Output: Invalid IP address
Command: python main.py scan 127.0.0.1 --start 1 --end 1024
Output: Scanning ports: 100%|ββββββββββββββββββββββββββββββββββββββββ| 1024/1024 [00:10<00:00, 100.00 ports/s] Open ports: [22, 80, 443]
Example: Successful Login
Command: python main.py brute http://example.com/login admin passwords.txt
Output: Trying password: password123 Trying password: admin123 Login successful: ('admin', 'admin123') # This line will be green
Command: python main.py brute http://example.com/login admin wrong_passwords.txt
Output: Trying password: wrong1 Trying password: wrong2 Login failed # This line will be red
Example: JSON Report
Command: python main.py scan 127.0.0.1 --start 1 --end 1024 --format json
Output: json Copy { "target": "127.0.0.1", "open_ports": [22, 80, 443], "timestamp": "2023-10-15T12:34:56Z" }
Command: python -m pytest tests/
Output: ============================= test session starts ============================= collected 3 items
tests/test_port_scanner.py . [ 33%] tests/test_brute_forcer.py . [ 66%] tests/test_utils.py . [100%]
============================== 3 passed in 0.05s ==============================
Command: python main.py shell
Output: Welcome to the Penetration Testing Toolkit shell! Type 'help' for a list of commands.
scan 127.0.0.1 --start 1 --end 1024 Scanning ports: 100%|ββββββββββββββββββββββββββββββββββββββββ| 1024/1024 [00:10<00:00, 100.00 ports/s] Open ports: [22, 80, 443]
brute http://example.com/login admin passwords.txt Trying password: password123 Trying password: admin123 Login successful: ('admin', 'admin123')
exit Goodbye!