pucherot / Pi.Alert

WIFI / LAN intruder detector. Check the devices connected and alert you with unknown devices. It also warns of the disconnection of "always connected" devices
GNU General Public License v3.0
2.03k stars 126 forks source link

Can't start scan on PiAlert #171

Open vedranius opened 2 years ago

vedranius commented 2 years ago

Hi, I get this error when I try to run this command: python ~/pialert/back/pialert.py internet_IP


Pi.Alert 3.02 (2021-04-24)
---------------------------------------------------------
Check Internet IP
    Timestamp: 2022-05-25 12:40:00

Retrieving Internet IP...
Traceback (most recent call last):
  File "/root/pialert/back/pialert.py", line 1488, in <module>
    sys.exit(main())       
  File "/root/pialert/back/pialert.py", line 79, in main
    res = check_internet_IP()
  File "/root/pialert/back/pialert.py", line 115, in check_internet_IP
    internet_IP = get_internet_IP()
  File "/root/pialert/back/pialert.py", line 171, in get_internet_IP
    cmd_output = subprocess.check_output (dig_args, universal_newlines=True)
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['dig', '+short', '-4', 'myip.opendns.com', '@resolver1.opendns.com']' returned non-zero exit status 9
Travis-Prall commented 2 years ago

Have you checked to see if your PiHole was blocking the request. That was my problem and whitelisting it fixed it.

eugef66 commented 2 years ago

the problem is with update_vendors.sh in the /back folder. You need to update all urls to http://standards-oui.ieee.org to https: https://standards-oui.ieee.org/, otherwise curl is getting 302(redirect) response. I fixed in my fork (https://github.com/eugef66/pi.alert/blob/main/back/update_vendors.sh) and will submit PR, but I think this repo is stall :(.