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

Method _fetch_advanced_data

display.py:1122–1138  ·  view source on GitHub ↗

Fetch real advanced vulnerability scanner data.

(self)

Source from the content-addressed store, hash-verified

1120 if eth is None and eth_list:
1121 eth = eth_list[0]
1122
1123 gw_ip = nd._default_gateway()
1124 gateway = {'ip': gw_ip, 'ptr': nd._reverse_dns(gw_ip) if gw_ip else None}
1125 _, nameservers, _ = nd._read_resolv_conf()
1126
1127 lldp = {'installed': True, 'neighbor': None}
1128 res = nd.do_lldp()
1129 if not res.get('success'):
1130 if res.get('missing_tool'):
1131 lldp['installed'] = False
1132 else:
1133 neighbors = res.get('neighbors') or []
1134 if eth:
1135 lldp['neighbor'] = next(
1136 (n for n in neighbors if n.get('local_interface') == eth.get('name')), None)
1137 if lldp['neighbor'] is None and neighbors:
1138 lldp['neighbor'] = neighbors[0]
1139 return {'eth': eth, 'eth_count': len(eth_list),
1140 'gateway': gateway, 'dns': nameservers, 'lldp': lldp}
1141

Callers

nothing calls this directly

Calls 4

get_active_scans_listMethod · 0.80
debugMethod · 0.80
get_summaryMethod · 0.45

Tested by

no test coverage detected