Support /usr/sbin paths for aircrack-ng on Debian and add hcxtools

- Add get_tool_path() to check /usr/sbin and /sbin for tools
- Update wifi.py to use full paths for airmon-ng, airodump-ng, aireplay-ng, aircrack-ng
- Add hcxdumptool and hcxtools to setup.sh for Debian and macOS
- Update check_cmd() in setup.sh to also check /usr/sbin and /sbin

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-07 18:20:39 +00:00
parent 61ef3f7bdd
commit 40369ccb7b
3 changed files with 77 additions and 20 deletions
+21 -1
View File
@@ -1,15 +1,35 @@
from __future__ import annotations
import logging
import os
import shutil
from typing import Any
logger = logging.getLogger('intercept.dependencies')
# Additional paths to search for tools (e.g., /usr/sbin on Debian)
EXTRA_TOOL_PATHS = ['/usr/sbin', '/sbin']
def check_tool(name: str) -> bool:
"""Check if a tool is installed."""
return shutil.which(name) is not None
return get_tool_path(name) is not None
def get_tool_path(name: str) -> str | None:
"""Get the full path to a tool, checking standard PATH and extra locations."""
# First check standard PATH
path = shutil.which(name)
if path:
return path
# Check additional paths (e.g., /usr/sbin for aircrack-ng on Debian)
for extra_path in EXTRA_TOOL_PATHS:
full_path = os.path.join(extra_path, name)
if os.path.isfile(full_path) and os.access(full_path, os.X_OK):
return full_path
return None
# Comprehensive tool dependency definitions