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

Function _flatten_credentials_for_compliance

webapp_modern.py:6478–6487  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6476 new_row['MAC Address'] = mac_to_store
6477 else:
6478 # Don't generate pseudo MAC - let ARP cache provide real MAC addresses
6479 new_row['MAC Address'] = ''
6480 new_row['Alive'] = alive_value
6481 # CRITICAL: Don't set Ports to '' - preserve existing ports if they exist
6482 # The Ports field should only be updated by scanning.py during actual port scans
6483 # Leave it empty for new entries, but scanning.py will populate it
6484 new_row['Ports'] = new_row.get('Ports', '') # Preserve if exists, empty if new
6485 rows.append(new_row)
6486 updated_row = new_row
6487
6488 with open(netkb_path, 'w', newline='', encoding='utf-8') as f:
6489 writer = csv.DictWriter(f, fieldnames=headers)
6490 writer.writeheader()

Callers 2

compliance_report_exportFunction · 0.85
compliance_report_jsonFunction · 0.85

Calls 3

get_all_credentialsMethod · 0.80
appendMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected