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

Method create_livestatusfile

shared.py:1350–1364  ·  view source on GitHub ↗

Create the live status file, it will be used to store the current status of the scan.

(self)

Source from the content-addressed store, hash-verified

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"

Callers 3

__init__Method · 0.95
initialize_csvMethod · 0.80
update_shared_dataMethod · 0.80

Calls 2

infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected