()
| 8914 | 'NmapVulnScanner': vuln_status or '' |
| 8915 | } |
| 8916 | |
| 8917 | if ip and mac and mac.upper() not in {"UNKNOWN", "STANDALONE"}: |
| 8918 | ip_to_mac[ip] = mac |
| 8919 | |
| 8920 | if mac: |
| 8921 | enrichment_map[("mac", mac.lower())] = enrichment_payload |
| 8922 | if ip: |
| 8923 | enrichment_map[("ip", ip)] = enrichment_payload |
| 8924 | |
| 8925 | for entry in network_data: |
| 8926 | mac = _extract_value(entry, ("MAC Address", "MAC", "mac")) |
| 8927 | ip = _extract_value(entry, ("IPs", "IP", "ip")) |
| 8928 | if not mac or mac.upper() in {"UNKNOWN", "STANDALONE", "00:00:00:00:00:00"}: |
| 8929 | fallback_mac = ip_to_mac.get(ip) |
| 8930 | if fallback_mac: |
| 8931 | mac = fallback_mac |
| 8932 | |
| 8933 | mac = mac or '' |
| 8934 | entry['MAC Address'] = mac |
| 8935 | entry['MAC'] = mac |
| 8936 | entry['mac'] = mac |
| 8937 | |
| 8938 | enrichment = enrichment_map.get(("mac", mac.lower())) if mac else None |
no test coverage detected