MCPcopy Create free account
hub / github.com/secdev/scapy / promiscping

Function promiscping

scapy/layers/l2.py:1120–1129  ·  view source on GitHub ↗

Send ARP who-has requests to determine which hosts are in promiscuous mode promiscping(net, iface=conf.iface)

(net, timeout=2, fake_bcast="ff:ff:ff:ff:ff:fe", **kargs)

Source from the content-addressed store, hash-verified

1118
1119@conf.commands.register
1120def promiscping(net, timeout=2, fake_bcast="ff:ff:ff:ff:ff:fe", **kargs):
1121 # type: (str, int, str, **Any) -> Tuple[ARPingResult, PacketList]
1122 """Send ARP who-has requests to determine which hosts are in promiscuous mode
1123 promiscping(net, iface=conf.iface)"""
1124 ans, unans = srp(Ether(dst=fake_bcast) / ARP(pdst=net),
1125 filter="arp and arp[7] = 2", timeout=timeout, iface_hint=net, **kargs) # noqa: E501
1126 ans = ARPingResult(ans.res, name="PROMISCPing")
1127
1128 ans.show()
1129 return ans, unans
1130
1131
1132class ARP_am(AnsweringMachine[Packet]):

Callers

nothing calls this directly

Calls 5

showMethod · 0.95
srpFunction · 0.90
EtherClass · 0.85
ARPClass · 0.85
ARPingResultClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…