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

Function cap

network_diagnostics.py:1639–1646  ·  view source on GitHub ↗
(pat, cast=float)

Source from the content-addressed store, hash-verified

1637 '--script-args', f'broadcast-dhcp-discover.timeout={int(timeout_s)}']
1638 if interface and _valid_iface(interface):
1639 cmd += ['-e', interface]
1640 res = _run(cmd, timeout=int(timeout_s) + 25)
1641 if res['rc'] == 127:
1642 return [], 'nmap not found'
1643 return _parse_dhcp_discover(res['out']), None
1644
1645
1646def _parse_dhcp_capture(output):
1647 """Parse verbose `tcpdump` DHCP output into client-request stats:
1648 (requests, distinct_client_macs). Counts DISCOVER/REQUEST (client→server)
1649 and the distinct BOOTP client hardware addresses (chaddr) behind them —

Callers 1

do_pcap_analyzeFunction · 0.85

Calls 1

castFunction · 0.85

Tested by

no test coverage detected