How would I get the IP addresses of all ips connected to wifi (that I am on). I tried doing it by using sniff() and getting all src IP of those packets using the following lines:
ips = []
captured = sniff(count=200)
for i in range(len(captured)):
try:
rpp = captured[i].getlayer(IP).src
if "192." in rpp and rpp != router_ip:
ips.append(rpp)
ips = list(set(ips))
But this rarely gets me all IP's, so how would I pull that off using python and (if needed) scapy?