Add wordlist dual-location detection and README image sizing

This commit is contained in:
rpriven 2025-11-01 00:31:56 -06:00
parent 37085d853a
commit 37cfb017f0
Signed by: djedi
GPG key ID: D04DED574622EF45
4 changed files with 54 additions and 17 deletions

View file

@ -1,5 +1,9 @@
# Djedi Toolbelt v2.0 # Djedi Toolbelt v2.0
<p align="center">
<img src="images/toolbelt.png" alt="Djedi Toolbelt" width="500">
</p>
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![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/) [![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 - **Directories**: Web content discovery lists
- **Fuzzing**: XSS, SQLi, and other injection payloads - **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
--- ---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

BIN
images/toolbelt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,020 KiB

View file

@ -773,18 +773,42 @@ def update_selected_tools(logger):
# Wordlist Management # 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): def wordlist_menu(logger):
"""Wordlist management menu""" """Wordlist management menu"""
while True: while True:
print_section("📚 WORDLIST MANAGEMENT") print_section("📚 WORDLIST MANAGEMENT")
# Check if SecLists is installed # Check if SecLists is installed
seclists_path = os.path.expanduser("~/wordlists/SecLists") seclists_path, seclists_installed = find_seclists_path()
seclists_installed = os.path.isdir(seclists_path)
print(colorize("1)", 'green') + " Install SecLists") print(colorize("1)", 'green') + " Install SecLists")
if seclists_installed: if seclists_installed:
print(colorize(" ✓ Already installed at ~/wordlists/SecLists", 'green')) print(colorize(f" ✓ Already installed at {seclists_path}", 'green'))
else: else:
print(" Comprehensive wordlist collection") print(" Comprehensive wordlist collection")
print() print()
@ -890,20 +914,14 @@ def view_wordlists(logger):
"""View installed wordlist directory structure""" """View installed wordlist directory structure"""
print_section("📂 Installed Wordlists") print_section("📂 Installed Wordlists")
wordlists_dir = os.path.expanduser("~/wordlists") seclists_path, seclists_installed = find_seclists_path()
if not os.path.isdir(wordlists_dir): if not seclists_installed:
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):
print_warning("SecLists not found") print_warning("SecLists not found")
print_info("Use option 1 to install SecLists") 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() print()
input("Press Enter to continue...") input("Press Enter to continue...")
return return
@ -951,7 +969,18 @@ def update_seclists(logger, seclists_installed: bool):
input("Press Enter to continue...") input("Press Enter to continue...")
return 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_info("Pulling latest updates from GitHub...")
print() print()
@ -968,7 +997,8 @@ def update_seclists(logger, seclists_installed: bool):
print_success("SecLists updated successfully!") print_success("SecLists updated successfully!")
else: else:
print_warning("Update completed with issues") 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}") logger.info(f"SecLists update completed with exit code {result.returncode}")