I want to know the active IPs on my network and to do this I'm pinging a range of addresses, but it won't let me. It says that it requires administrative privileges. Does anyone know? Does anyone know how to fix it?
Here's the code in case it's useful:
import subprocess
import os
for ip in range(255):
ipAddres='192.168.1.'+str(ip)
respuesta=os.system("ping -c 1 "+ipAddres)
if respuesta:
print(ipAddres)
Operating system: Windows 10.