diff --git a/back/pialert.conf b/back/pialert.conf index a3d566851..e2abf7dde 100644 --- a/back/pialert.conf +++ b/back/pialert.conf @@ -1,29 +1,31 @@ -VERSION = '2.54' -VERSION_YEAR = '2021' -VERSION_DATE = '2021-01-13' +VERSION = '2.55' +VERSION_YEAR = '2021' +VERSION_DATE = '2021-01-13' -DB_PATH = '/home/pi/pialert/db/pialert.db' -LOG_PATH = '/home/pi/pialert/log' -VENDORS_DB = '/usr/share/arp-scan/ieee-oui.txt' -PA_FRONT_URL = 'http://pi.alert/deviceDetails.php?mac=' -PRINT_LOG = False +DB_PATH = '/home/pi/pialert/db/pialert.db' +LOG_PATH = '/home/pi/pialert/log' +VENDORS_DB = '/usr/share/arp-scan/ieee-oui.txt' +PA_FRONT_URL = 'http://pi.alert/deviceDetails.php?mac=' +PRINT_LOG = False -SMTP_SERVER = 'smtp.gmail.com' -SMTP_PORT = 587 -SMTP_USER = 'user@gmail.com' -SMTP_PASS = 'password' +SMTP_SERVER = 'smtp.gmail.com' +SMTP_PORT = 587 +SMTP_USER = 'user@gmail.com' +SMTP_PASS = 'password' -REPORT_MAIL = False -REPORT_FROM = 'Pi.Alert <' + SMTP_USER +'>' -REPORT_TO = 'user@gmail.com' +REPORT_MAIL = False +REPORT_FROM = 'Pi.Alert <' + SMTP_USER +'>' +REPORT_TO = 'user@gmail.com' -DDNS_ACTIVE = False -DDNS_DOMAIN = 'your_domain.freeddns.org' -DDNS_USER = 'dynu_user' -DDNS_PASSWORD = 'A0000000B0000000C0000000D0000000' -DDNS_UPDATE_URL = 'https://api.dynu.com/nic/update?' +# QUERY_MYIP_SERVER = 'https://diagnostic.opendns.com/myip' +QUERY_MYIP_SERVER = 'http://ipv4.icanhazip.com' +DDNS_ACTIVE = False +DDNS_DOMAIN = 'your_domain.freeddns.org' +DDNS_USER = 'dynu_user' +DDNS_PASSWORD = 'A0000000B0000000C0000000D0000000' +DDNS_UPDATE_URL = 'https://api.dynu.com/nic/update?' -PIHOLE_ACTIVE = False -PIHOLE_DB = '/etc/pihole/pihole-FTL.db' -DHCP_ACTIVE = False -DHCP_LEASES = '/etc/pihole/dhcp.leases' +PIHOLE_ACTIVE = False +PIHOLE_DB = '/etc/pihole/pihole-FTL.db' +DHCP_ACTIVE = False +DHCP_LEASES = '/etc/pihole/dhcp.leases' diff --git a/back/pialert.py b/back/pialert.py index b48fb6dd7..2ef322df0 100644 --- a/back/pialert.py +++ b/back/pialert.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Pi.Alert v2.54 / 2021-01-13 +# Pi.Alert v2.55 / 2021-01-13 # Puche 2020 # GNU GPLv3 @@ -159,8 +159,10 @@ def get_internet_IP (): # dig_args = ['dig', '+short', 'myip.opendns.com', # '@resolver1.opendns.com'] + # BUGFIX #12 - Query IPv4 address (not IPv6) # Using 'curl' instead of 'dig' - curl_args = ['curl', '-s', 'https://diagnostic.opendns.com/myip'] + # curl_args = ['curl', '-s', 'https://diagnostic.opendns.com/myip'] + curl_args = ['curl', '-s', QUERY_MYIP_SERVER] curl_output = subprocess.check_output (curl_args, universal_newlines=True) # Check result is an IP diff --git a/db/pialert.db b/db/pialert.db index cb783362a..a91387e9c 100644 Binary files a/db/pialert.db and b/db/pialert.db differ diff --git a/front/php/templates/footer.php b/front/php/templates/footer.php index f4a13b140..51a4c778c 100644 --- a/front/php/templates/footer.php +++ b/front/php/templates/footer.php @@ -4,7 +4,7 @@ © 2021 Puche