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

Function net_arp_scan

network_diagnostics.py:1979–1984  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1977
1978
1979def _iface_addrs(iface):
1980 v4 = []
1981 res = _run(['ip', '-o', '-4', 'addr', 'show', 'dev', iface], timeout=5)
1982 for line in res['out'].splitlines():
1983 m = re.search(r'inet (\S+)', line)
1984 if m:
1985 v4.append(m.group(1))
1986 v6 = []
1987 res6 = _run(['ip', '-o', '-6', 'addr', 'show', 'dev', iface], timeout=5)

Callers

nothing calls this directly

Calls 5

_valid_ifaceFunction · 0.85
_badFunction · 0.85
_logFunction · 0.85
do_arp_scanFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected