Add bash file with functions to enable and disable monitor mode using either...

This commit is contained in:
Sebastian Lenzlinger
2024-05-02 17:15:51 +00:00
parent 5cc7e2bae0
commit b0a3fd951d
6 changed files with 115 additions and 49 deletions

View File

@@ -1,15 +1,16 @@
import shutil
import subprocess
DEPENDENCIES =
def check_installed() -> bool:
def check_installed(tool) -> bool:
"""Check if tcpdump is installed and available on the system path."""
return shutil.which('tcpdump') is not None
return shutil.which(f'{tool}') is not None
def ensure_installed():
def ensure_installed(tool):
"""Ensure that tcpdump is installed, raise an error if not."""
if not check_installed():
if not check_installed(tool):
raise RuntimeError("tcpdump is not installed. Please install it to continue.")

View File

@@ -0,0 +1,10 @@
import subprocess
def enable_monitor_mode(interface):
pass
def disable_monitor_mode(interface):
pass
def get_ap_channel(interface):
pass