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

Method get_bluetooth_devices

wardriving.py:805–816  ·  view source on GitHub ↗

Get all discovered Bluetooth devices.

(self)

Source from the content-addressed store, hash-verified

803 now = time.time()
804 if hasattr(self, '_stats_cache') and self._stats_cache and now - self._stats_cache_time < 5:
805 return self._stats_cache
806 with self._lock:
807 try:
808 with sqlite3.connect(self.db_path) as conn:
809 conn.row_factory = sqlite3.Row
810 # Single query for band + security counts
811 row = conn.execute("""
812 SELECT
813 COUNT(*) AS total,
814 SUM(CASE WHEN security IN ('', '--', 'OWE') THEN 1 ELSE 0 END) AS open_nets,
815 SUM(CASE WHEN security LIKE '%WEP%' THEN 1 ELSE 0 END) AS wep_nets,
816 SUM(CASE WHEN security LIKE '%WPA%' THEN 1 ELSE 0 END) AS wpa_nets,
817 SUM(CASE WHEN band = '2.4GHz' THEN 1 ELSE 0 END) AS band_24,
818 SUM(CASE WHEN band = '5GHz' THEN 1 ELSE 0 END) AS band_5,
819 SUM(CASE WHEN band = '6GHz' THEN 1 ELSE 0 END) AS band_6,

Callers 1

wardriving_bluetoothFunction · 0.95

Calls 3

connectMethod · 0.45
fetchallMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected