113 lines
3.0 KiB
Python
113 lines
3.0 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Bug Hunter TUI - Multi-Purpose Security Testing Tool
|
|
A comprehensive bug bounty hunting tool with Text User Interface
|
|
|
|
Features:
|
|
- Subdomain enumeration
|
|
- Port scanning
|
|
- Directory bruteforcing
|
|
- URL parameter fuzzing
|
|
|
|
Author: Bug Hunter
|
|
"""
|
|
|
|
import sys
|
|
import argparse
|
|
from ui import run
|
|
from config import Config, WordlistManager
|
|
|
|
|
|
def main():
|
|
"""Main entry point for Bug Hunter."""
|
|
parser = argparse.ArgumentParser(
|
|
description="Bug Hunter TUI - Multi-Purpose Security Testing Tool",
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
epilog="""
|
|
Examples:
|
|
bughunter.py # Launch TUI interface
|
|
bughunter.py --setup # Setup configuration and wordlists
|
|
|
|
For more information, visit: https://github.com/yourusername/bughunter
|
|
"""
|
|
)
|
|
|
|
parser.add_argument(
|
|
'--setup',
|
|
action='store_true',
|
|
help='Setup configuration directory and default files'
|
|
)
|
|
|
|
parser.add_argument(
|
|
'--config',
|
|
type=str,
|
|
help='Path to custom configuration file'
|
|
)
|
|
|
|
parser.add_argument(
|
|
'--version',
|
|
action='version',
|
|
version='Bug Hunter TUI v2.0.0 - Advanced Security Scanner'
|
|
)
|
|
|
|
args = parser.parse_args()
|
|
|
|
if args.setup:
|
|
setup_environment()
|
|
return
|
|
|
|
# Initialize configuration
|
|
config = Config(args.config)
|
|
|
|
# Run the TUI
|
|
try:
|
|
run()
|
|
except KeyboardInterrupt:
|
|
print("\n[!] Interrupted by user")
|
|
sys.exit(0)
|
|
except Exception as e:
|
|
print(f"[!] Error: {e}")
|
|
sys.exit(1)
|
|
|
|
|
|
def setup_environment():
|
|
"""Setup the Bug Hunter environment."""
|
|
print("[*] Setting up Bug Hunter environment...")
|
|
|
|
# Initialize config
|
|
config = Config()
|
|
print(f"[+] Configuration directory: {config.config_dir}")
|
|
print(f"[+] Configuration file: {config.config_file}")
|
|
|
|
# Initialize wordlist manager
|
|
wordlist_manager = WordlistManager()
|
|
print(f"[+] Wordlist directory: {wordlist_manager.wordlist_dir}")
|
|
|
|
# Create sample wordlists
|
|
print("[*] Creating default wordlists...")
|
|
|
|
# Subdomain wordlist
|
|
subdomains = [
|
|
"www", "mail", "ftp", "admin", "blog", "shop", "api", "dev", "test",
|
|
"staging", "portal", "dashboard", "cpanel", "webmail", "secure", "vpn"
|
|
]
|
|
wordlist_manager.save_wordlist("subdomains.txt", subdomains)
|
|
print("[+] Created: subdomains.txt")
|
|
|
|
# Directory wordlist
|
|
directories = [
|
|
"admin", "login", "dashboard", "api", "backup", "config", "uploads",
|
|
"files", "images", "assets", "static", "public", "private", "data"
|
|
]
|
|
wordlist_manager.save_wordlist("directories.txt", directories)
|
|
print("[+] Created: directories.txt")
|
|
|
|
print("\n[+] Setup complete!")
|
|
print(f"\nConfiguration location: {config.config_file}")
|
|
print(f"Wordlists location: {wordlist_manager.wordlist_dir}")
|
|
print("\nYou can now run 'python bughunter.py' to start the TUI")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|