Create the live status file, it will be used to store the current status of the scan.
(self)
| 1348 | |
| 1349 | def process_discovered_macs(self, mac_addresses): |
| 1350 | """Track newly discovered MAC addresses and award points once per device.""" |
| 1351 | normalized = {self.normalize_mac(mac) for mac in mac_addresses} |
| 1352 | normalized.discard("") |
| 1353 | |
| 1354 | if not normalized: |
| 1355 | return 0, 0 |
| 1356 | |
| 1357 | with self._stats_lock: |
| 1358 | mac_points = self.gamification_data.setdefault("mac_points", {}) |
| 1359 | new_mac_count = 0 |
| 1360 | points_awarded = 0 |
| 1361 | |
| 1362 | for mac in normalized: |
| 1363 | if mac in mac_points: |
| 1364 | continue |
| 1365 | mac_points[mac] = { |
| 1366 | "points": self.points_per_mac, |
| 1367 | "first_seen": datetime.utcnow().isoformat() + "Z" |
no test coverage detected