MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / is_ap_client_request

Function is_ap_client_request

webapp_modern.py:4556–4563  ·  view source on GitHub ↗

Check if the request is coming from an AP client (192.168.4.x)

()

Source from the content-addressed store, hash-verified

4554
4555
4556def run_targeted_arp_scan(ip, interface=DEFAULT_ARP_SCAN_INTERFACE):
4557 command = ['sudo', 'arp-scan', f'--interface={interface}', ip]
4558 logger.info(f"Running targeted arp-scan for {ip}: {' '.join(command)}")
4559 try:
4560 result = subprocess.run(command, capture_output=True, text=True, check=False, timeout=60)
4561 hosts = _parse_arp_scan_output(result.stdout)
4562 entry = hosts.get(ip)
4563 return entry.get('mac', '') if entry else ''
4564 except FileNotFoundError:
4565 logger.warning(f"arp-scan command not found when resolving MAC for {ip}")
4566 return ''

Callers 5

check_authenticationFunction · 0.85
indexFunction · 0.85
captive_portal_detectionFunction · 0.85
get_wifi_networksFunction · 0.85
connect_wifiFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected