@conf.commands.register
def is_promisc(ip, fake_bcast='ff:ff:00:00:00:00', **kargs):
 responses = srp1((Ether(dst=fake_bcast) / ARP(op='who-has', pdst=ip)), type=ETH_P_ARP, iface_hint=ip, timeout=1, verbose=0, **kargs)
 return (responses is not None)

@ conf . commands . register def is_promisc ( ip , fake_bcast = 'ff:ff:00:00:00:00' , ** kargs ) : responses = srp1 ( ( Ether ( dst = fake_bcast ) / ARP ( op = 'who-has' , pdst = ip ) ) , type = ETH_P_ARP , iface_hint = ip , timeout = 1 , verbose = 0 , ** kargs ) return ( responses is not None )
try to guess if target is in promisc mode .