Check if required tools are installed
()
| 6 | from typing import List, Dict |
| 7 | |
| 8 | def check_requirements(): |
| 9 | """Check if required tools are installed""" |
| 10 | tools = ['nmap', 'arp-scan'] |
| 11 | missing = [] |
| 12 | |
| 13 | for tool in tools: |
| 14 | try: |
| 15 | subprocess.run([tool, '--version'], capture_output=True, check=True) |
| 16 | except (subprocess.CalledProcessError, FileNotFoundError): |
| 17 | missing.append(tool) |
| 18 | |
| 19 | if missing: |
| 20 | print(f"Error: Missing required tools: {', '.join(missing)}") |
| 21 | print("Install with: sudo apt install nmap arp-scan") |
| 22 | sys.exit(1) |
| 23 | |
| 24 | def run_arp_scan(interface='eth0'): |
| 25 | """Run ARP scan to discover devices on local network""" |
no test coverage detected