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

Function run_nmap_fallback

webapp_modern.py:8916–8935  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

scan_host_backgroundFunction · 0.85

Calls 4

NmapVulnScannerClass · 0.90
errorMethod · 0.80
emitMethod · 0.80

Tested by

no test coverage detected