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

Function stop_bluetooth_scan

webapp_modern.py:12633–12649  ·  view source on GitHub ↗

Stop Bluetooth device scan

()

Source from the content-addressed store, hash-verified

12631 hosts = {}
12632 current_ip = None
12633
12634 for line in output.splitlines():
12635 line = line.strip()
12636
12637 # Look for "Nmap scan report for" lines to get IP addresses
12638 if line.startswith('Nmap scan report for'):
12639 # Extract IP from line like "Nmap scan report for 192.168.1.1"
12640 parts = line.split()
12641 if len(parts) >= 5:
12642 ip_part = parts[-1]
12643 if '(' in ip_part and ')' in ip_part:
12644 # Format: "hostname (192.168.1.1)"
12645 current_ip = ip_part.strip('()')
12646 else:
12647 # Format: "192.168.1.1"
12648 current_ip = ip_part
12649
12650 if _is_valid_ipv4(current_ip):
12651 hosts[current_ip] = {
12652 'ip': current_ip,

Callers

nothing calls this directly

Calls 2

stop_scanMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected