diff --git a/README.md b/README.md index 87714c1..6c6bdb0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Djedi Toolbelt v2.0 +

+ Djedi Toolbelt +

+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python: 3.6+](https://img.shields.io/badge/Python-3.6+-blue.svg)](https://www.python.org/) @@ -238,7 +242,10 @@ python3 toolbelt.py - **Directories**: Web content discovery lists - **Fuzzing**: XSS, SQLi, and other injection payloads -**Installation location:** `~/wordlists/SecLists/` +**Installation locations:** +- Kali default: `/usr/share/seclists` (via apt package) +- Custom install: `~/wordlists/SecLists/` (via git clone) +- Toolbelt automatically detects both locations --- diff --git a/images/toolbelt.jpeg b/images/toolbelt.jpeg deleted file mode 100644 index 1cee2da..0000000 Binary files a/images/toolbelt.jpeg and /dev/null differ diff --git a/images/toolbelt.png b/images/toolbelt.png new file mode 100644 index 0000000..8188c86 Binary files /dev/null and b/images/toolbelt.png differ diff --git a/toolbelt.py b/toolbelt.py index 8f698db..df7693b 100755 --- a/toolbelt.py +++ b/toolbelt.py @@ -773,18 +773,42 @@ def update_selected_tools(logger): # Wordlist Management # ============================================================================ +def find_seclists_path(): + """ + Find SecLists installation path + + Checks common locations: + 1. /usr/share/seclists (Kali default, lowercase) + 2. ~/wordlists/SecLists (custom install) + + Returns: + Tuple of (path, found) - path is the location, found is True if exists + """ + # Check Kali default location first (lowercase) + kali_path = "/usr/share/seclists" + if os.path.isdir(kali_path): + return (kali_path, True) + + # Check custom install location + custom_path = os.path.expanduser("~/wordlists/SecLists") + if os.path.isdir(custom_path): + return (custom_path, True) + + # Default to custom path if neither exists (for installation) + return (custom_path, False) + + def wordlist_menu(logger): """Wordlist management menu""" while True: print_section("📚 WORDLIST MANAGEMENT") # Check if SecLists is installed - seclists_path = os.path.expanduser("~/wordlists/SecLists") - seclists_installed = os.path.isdir(seclists_path) + seclists_path, seclists_installed = find_seclists_path() print(colorize("1)", 'green') + " Install SecLists") if seclists_installed: - print(colorize(" ✓ Already installed at ~/wordlists/SecLists", 'green')) + print(colorize(f" ✓ Already installed at {seclists_path}", 'green')) else: print(" Comprehensive wordlist collection") print() @@ -890,20 +914,14 @@ def view_wordlists(logger): """View installed wordlist directory structure""" print_section("📂 Installed Wordlists") - wordlists_dir = os.path.expanduser("~/wordlists") + seclists_path, seclists_installed = find_seclists_path() - if not os.path.isdir(wordlists_dir): - print_warning("No wordlists directory found") - print_info(f"Expected location: {wordlists_dir}") - print() - input("Press Enter to continue...") - return - - seclists_path = os.path.join(wordlists_dir, "SecLists") - - if not os.path.isdir(seclists_path): + if not seclists_installed: print_warning("SecLists not found") print_info("Use option 1 to install SecLists") + print_info(f"Checked locations:") + print_info(f" • /usr/share/seclists (Kali default)") + print_info(f" • ~/wordlists/SecLists (custom install)") print() input("Press Enter to continue...") return @@ -951,7 +969,18 @@ def update_seclists(logger, seclists_installed: bool): input("Press Enter to continue...") return - seclists_path = os.path.expanduser("~/wordlists/SecLists") + seclists_path, _ = find_seclists_path() + + print_info(f"Updating SecLists at: {seclists_path}") + + # Check if this is a system-installed version + if seclists_path.startswith('/usr/'): + print_warning("SecLists is installed in system directory (/usr/share/seclists)") + print_info("This was likely installed via apt package manager") + print_info("To update: sudo apt update && sudo apt upgrade seclists") + print() + input("Press Enter to continue...") + return print_info("Pulling latest updates from GitHub...") print() @@ -968,7 +997,8 @@ def update_seclists(logger, seclists_installed: bool): print_success("SecLists updated successfully!") else: print_warning("Update completed with issues") - print_info("Try reinstalling if problems persist (option 1)") + print_info("If this is a git repository, try: cd {seclists_path} && git pull") + print_info("Otherwise, reinstall with option 1") logger.info(f"SecLists update completed with exit code {result.returncode}")