diff --git a/dockerfiles/start.sh b/dockerfiles/start.sh index 2a77376f..856fa35a 100755 --- a/dockerfiles/start.sh +++ b/dockerfiles/start.sh @@ -13,6 +13,8 @@ fi # I hope this will fix DB permission issues going forward chown -R www-data:www-data /home/pi/pialert/db/pialert.db +chmod -R a+rw /home/pi/pialert/front/log + /etc/init.d/php7.4-fpm start /etc/init.d/nginx start diff --git a/front/css/pialert.css b/front/css/pialert.css index 3415379b..cf16aa16 100755 --- a/front/css/pialert.css +++ b/front/css/pialert.css @@ -406,7 +406,7 @@ ----------------------------------------------------------------------------- */ .pa_semitransparent-panel { position: absolute; - width: 100%; //calc (100% -40px); + width: 100%; /*calc (100% -40px);*/ height: 100%; left: 0; top: 0; diff --git a/front/log/IP_changes.log b/front/log/IP_changes.log index c4d9297d..55bb8b75 100755 --- a/front/log/IP_changes.log +++ b/front/log/IP_changes.log @@ -4,7 +4,7 @@ # # IP_changes.log - Back module. Logfile for Internet IP changes #------------------------------------------------------------------------------- -# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 +# Puche 2021 GNU GPLv3 #------------------------------------------------------------------------------- 2021-01-01 00:00:00 0.0.0.0 diff --git a/front/log/pialert.log b/front/log/pialert.log index dd80283b..e69de29b 100755 --- a/front/log/pialert.log +++ b/front/log/pialert.log @@ -1,441 +0,0 @@ - -Loop start ---------------------------- -Check Internet IP - Timestamp: 2022-12-11 13:09:00 - - Retrieving Internet IP... - 103.210.27.85 - - Retrieving previous IP... - 103.210.27.85 - No changes to perform - - Skipping Dynamic DNS update... -Scan Devices - ScanCycle: 1 - Timestamp: 2022-12-11 13:09:00 - -Scanning... - arp-scan Method... - arp-scan: Multiple interfaces - Pi-hole Method... - DHCP Leases Method... - -Processing scan results... - Devices Detected.......: 27 - arp-scan Method....: 25 - Pi-hole Method.....: +0 - New Devices........: 0 - - Devices in this cycle..: 27 - Down Alerts........: 0 - New Down Alerts....: 0 - New Connections....: 0 - Disconnections.....: 1 - IP Changes.........: 0 - -Updating DB Info... - Sessions Events (connect / discconnect) ... - Creating new devices... - Updating Devices Info... - Trying to resolve devices without name... - Names updated: 0 - Voiding false (ghost) disconnections... - Pairing session events (connection / disconnection) ... - Creating sessions snapshot... - Skipping repeated notifications... - -Check if something to report... - No changes to report... - Notifications: 0 -Cleanup Database - Timestamp: 2022-12-11 13:09:00 - Cleanup Online_History... - Optimize Database... - Cleanup Events, up to the lastest 90 days... - Shrink Database... - -Finished cycle: cleanup - - -Loop end ---------------------------- - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- -Check Internet IP - Timestamp: 2022-12-11 13:13:00 - - Retrieving Internet IP... - 103.210.27.85 - - Retrieving previous IP... - 103.210.27.85 - No changes to perform - - Skipping Dynamic DNS update... - -Check if something to report... - No changes to report... - Notifications: 0 - -Finished cycle: internet_IP - - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- -Scan Devices - ScanCycle: 1 - Timestamp: 2022-12-11 13:15:00 - -Scanning... - arp-scan Method... - arp-scan: Multiple interfaces - Pi-hole Method... - DHCP Leases Method... - -Processing scan results... - Devices Detected.......: 26 - arp-scan Method....: 24 - Pi-hole Method.....: +0 - New Devices........: 0 - - Devices in this cycle..: 26 - Down Alerts........: 0 - New Down Alerts....: 0 - New Connections....: 0 - Disconnections.....: 1 - IP Changes.........: 0 - -Updating DB Info... - Sessions Events (connect / discconnect) ... - Creating new devices... - Updating Devices Info... - Trying to resolve devices without name... - Names updated: 0 - Voiding false (ghost) disconnections... - Pairing session events (connection / disconnection) ... - Creating sessions snapshot... - Skipping repeated notifications... - -Check if something to report... - -Changes detected, sending reports... - Sending report by email... - Sending report by Apprise... - Sending report by webhook... - Sending report by NTFY... - Skip PUSHSAFER... - Establishing MQTT thread... -Connected to broker - Notifications: 1 - -Finished cycle: 1 - - -Loop end ---------------------------- - -Loop start ---------------------------- -Check Internet IP - Timestamp: 2022-12-11 13:24:00 - - Retrieving Internet IP... - 103.210.27.85 - - Retrieving previous IP... - 103.210.27.85 - No changes to perform - - Skipping Dynamic DNS update... -Scan Devices - ScanCycle: 1 - Timestamp: 2022-12-11 13:24:00 - -Scanning... - arp-scan Method... - arp-scan: Multiple interfaces - Pi-hole Method... - DHCP Leases Method... - -Processing scan results... - Devices Detected.......: 26 - arp-scan Method....: 24 - Pi-hole Method.....: +0 - New Devices........: 0 - - Devices in this cycle..: 26 - Down Alerts........: 0 - New Down Alerts....: 0 - New Connections....: 0 - Disconnections.....: 0 - IP Changes.........: 0 - -Updating DB Info... - Sessions Events (connect / discconnect) ... - Creating new devices... - Updating Devices Info... - Trying to resolve devices without name... - Names updated: 0 - Voiding false (ghost) disconnections... - Pairing session events (connection / disconnection) ... - Creating sessions snapshot... - Skipping repeated notifications... - -Check if something to report... - No changes to report... - Notifications: 0 - -Finished cycle: 1 - - -Loop end ---------------------------- - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- -Check Internet IP - Timestamp: 2022-12-11 13:27:00 - - Retrieving Internet IP... - 103.210.27.85 - - Retrieving previous IP... - 103.210.27.85 - No changes to perform - - Skipping Dynamic DNS update... - -Check if something to report... - No changes to report... - Notifications: 0 - -Finished cycle: internet_IP - - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- -Scan Devices - ScanCycle: 1 - Timestamp: 2022-12-11 13:29:00 - -Scanning... - arp-scan Method... - arp-scan: Multiple interfaces - Pi-hole Method... - DHCP Leases Method... - -Processing scan results... - Devices Detected.......: 27 - arp-scan Method....: 25 - Pi-hole Method.....: +0 - New Devices........: 0 - - Devices in this cycle..: 27 - Down Alerts........: 0 - New Down Alerts....: 0 - New Connections....: 1 - Disconnections.....: 0 - IP Changes.........: 0 - -Updating DB Info... - Sessions Events (connect / discconnect) ... - Creating new devices... - Updating Devices Info... - Trying to resolve devices without name... - Names updated: 0 - Voiding false (ghost) disconnections... - Pairing session events (connection / disconnection) ... - Creating sessions snapshot... - Skipping repeated notifications... - -Check if something to report... - -Changes detected, sending reports... - Sending report by email... - Sending report by Apprise... - Sending report by webhook... - Sending report by NTFY... - Skip PUSHSAFER... - Establishing MQTT thread... - Notifications: 1 - -Finished cycle: 1 - - -Loop end ---------------------------- - - Wait 20s - -Loop start ---------------------------- -Check Internet IP - Timestamp: 2022-12-11 13:30:00 - - Retrieving Internet IP... - 103.210.27.85 - - Retrieving previous IP... - 103.210.27.85 - No changes to perform - - Skipping Dynamic DNS update... - -Check if something to report... - No changes to report... - Notifications: 0 - -Finished cycle: internet_IP - - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- -Check Internet IP - Timestamp: 2022-12-11 13:33:00 - - Retrieving Internet IP... - 103.210.27.85 - - Retrieving previous IP... - 103.210.27.85 - No changes to perform - - Skipping Dynamic DNS update... - -Check if something to report... - No changes to report... - Notifications: 0 - -Finished cycle: internet_IP - - -Loop end ---------------------------- - - Wait 20s - - Wait 20s - -Loop start ---------------------------- -Scan Devices - ScanCycle: 1 - Timestamp: 2022-12-11 13:34:00 - -Scanning... - arp-scan Method... - arp-scan: Multiple interfaces - Pi-hole Method... - DHCP Leases Method... - -Processing scan results... - Devices Detected.......: 27 - arp-scan Method....: \ No newline at end of file diff --git a/front/log/report_output.html b/front/log/report_output.html index ccd2a46b..69ff6b5f 100755 --- a/front/log/report_output.html +++ b/front/log/report_output.html @@ -43,8 +43,8 @@ - - + +
Puche 2021 Pi.Alert 2.50   /   2021-01-01 Puche 2021 (+jokob-sk 2022) Pi.Alert GNU GPLv3
diff --git a/front/log/report_output.txt b/front/log/report_output.txt index f403733a..c659e4f6 100755 --- a/front/log/report_output.txt +++ b/front/log/report_output.txt @@ -12,4 +12,4 @@ Events ---------------------------------------------------------------------- -Puche 2021 Pi.Alert 2.50 / 2021-01-01 GNU GPLv3 +Puche 2021 (+jokob-sk 2022) Pi.Alert GNU GPLv3 diff --git a/front/log/stdout.log b/front/log/stdout.log index 1c9e10b5..e69de29b 100755 --- a/front/log/stdout.log +++ b/front/log/stdout.log @@ -1,49 +0,0 @@ - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 3266 0 0 100 3266 0 2717 0:00:01 0:00:01 --:--:-- 2719 100 3287 100 21 100 3266 11 1769 0:00:01 0:00:01 --:--:-- 1780 100 3287 100 21 100 3266 11 1769 0:00:01 0:00:01 --:--:-- 1780 -HTTP/1.1 200 OK -Server: nginx/1.18.0 -Date: Sat, 10 Dec 2022 23:41:47 GMT -Content-Type: text/html; charset=utf-8 -Content-Length: 21 -Connection: keep-alive -Expires: Sat, 10 Dec 2022 23:41:47 GMT -Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private - -Notification(s) sent. % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 594 100 34 100 560 400 6588 --:--:-- --:--:-- --:--:-- 7071 -HTTP/1.1 200 OK -Content-Type: application/json; charset=utf-8 -Content-Length: 34 -ETag: W/"22-6OS7cK0FzqnV2NeDHdOSGS1bVUs" -Vary: Accept-Encoding -Date: Sat, 10 Dec 2022 23:41:47 GMT -Connection: keep-alive -Keep-Alive: timeout=5 - -{"message":"Workflow was started"} % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 3263 0 0 100 3263 0 2714 0:00:01 0:00:01 --:--:-- 2716 100 3284 100 21 100 3263 11 1859 0:00:01 0:00:01 --:--:-- 1871 -HTTP/1.1 200 OK -Server: nginx/1.18.0 -Date: Sun, 11 Dec 2022 00:52:29 GMT -Content-Type: text/html; charset=utf-8 -Content-Length: 21 -Connection: keep-alive -Expires: Sun, 11 Dec 2022 00:52:29 GMT -Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private - -Notification(s) sent. % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 590 100 34 100 556 1478 24173 --:--:-- --:--:-- --:--:-- 25652 -HTTP/1.1 200 OK -Content-Type: application/json; charset=utf-8 -Content-Length: 34 -ETag: W/"22-6OS7cK0FzqnV2NeDHdOSGS1bVUs" -Vary: Accept-Encoding -Date: Sun, 11 Dec 2022 00:52:29 GMT -Connection: keep-alive -Keep-Alive: timeout=5 - -{"message":"Workflow was started"} \ No newline at end of file diff --git a/front/log/webhook_payload.json b/front/log/webhook_payload.json index 56aa9a6c..e69de29b 100755 --- a/front/log/webhook_payload.json +++ b/front/log/webhook_payload.json @@ -1 +0,0 @@ -{"username": "Pi.Alert", "text": "There are new notifications", "attachments": [{"title": "Pi.Alert Notifications", "title_link": "http://100.89.112.105:20211", "text": {"internet": [], "new_devices": [], "down_devices": [], "events": [["94:b5:55:c7:cb:e0", "192.168.1.151", "2022-12-11 11:52:00", "Connected", "", 1, null, "94:b5:55:c7:cb:e0", "ESP32 - ttgo", "House", "", "Espressif Inc.", 0, "", "", "2022-10-16 16:55:00", "2022-12-11 11:52:00", "192.168.1.151", 0, 1, 1, 1, 0, 0, "2022-12-11 10:41:48.466369", 1, 0, "", 0, "d0:21:f9:8c:59:f9", ""]]}}]} \ No newline at end of file diff --git a/front/maintenance.php b/front/maintenance.php index 0f82f210..ed5b5576 100755 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -382,7 +382,7 @@ if ($_REQUEST['tab'] == '1') {
+
diff --git a/log/IP_changes.log b/log/IP_changes.log deleted file mode 100755 index c4d9297d..00000000 --- a/log/IP_changes.log +++ /dev/null @@ -1,10 +0,0 @@ -#------------------------------------------------------------------------------- -# Pi.Alert -# Open Source Network Guard / WIFI & LAN intrusion detector -# -# IP_changes.log - Back module. Logfile for Internet IP changes -#------------------------------------------------------------------------------- -# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 -#------------------------------------------------------------------------------- - -2021-01-01 00:00:00 0.0.0.0 diff --git a/log/pialert.log b/log/pialert.log deleted file mode 100755 index d53784d7..00000000 --- a/log/pialert.log +++ /dev/null @@ -1,4 +0,0 @@ - File "/home/pi/pialert/back/pialert.py", line 1639 - def check_config(service) - ^ -SyntaxError: invalid syntax diff --git a/log/report_output.html b/log/report_output.html deleted file mode 100755 index ccd2a46b..00000000 --- a/log/report_output.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
- Pi.Alert Report -
- - - - - - -
Report Date: 2021-01-01 08:00 Scan Cycle: 1 Server: pi4
-
- -
- - - - - - -
Puche 2021 Pi.Alert 2.50   /   2021-01-01 GNU GPLv3
-
-
- - diff --git a/log/report_output.txt b/log/report_output.txt deleted file mode 100755 index f403733a..00000000 --- a/log/report_output.txt +++ /dev/null @@ -1,15 +0,0 @@ -======================================== - Pi.Alert Report -======================================== - - Report Date: 2021-01-01 08:00 - Scan Cycle: 1 - Server: pi4 - - -Events ----------------------------------------------------------------------- - - ----------------------------------------------------------------------- -Puche 2021 Pi.Alert 2.50 / 2021-01-01 GNU GPLv3 diff --git a/log/stderr.log b/log/stderr.log deleted file mode 100755 index e69de29b..00000000 diff --git a/log/stdout.log b/log/stdout.log deleted file mode 100755 index 1c9e10b5..00000000 --- a/log/stdout.log +++ /dev/null @@ -1,49 +0,0 @@ - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 3266 0 0 100 3266 0 2717 0:00:01 0:00:01 --:--:-- 2719 100 3287 100 21 100 3266 11 1769 0:00:01 0:00:01 --:--:-- 1780 100 3287 100 21 100 3266 11 1769 0:00:01 0:00:01 --:--:-- 1780 -HTTP/1.1 200 OK -Server: nginx/1.18.0 -Date: Sat, 10 Dec 2022 23:41:47 GMT -Content-Type: text/html; charset=utf-8 -Content-Length: 21 -Connection: keep-alive -Expires: Sat, 10 Dec 2022 23:41:47 GMT -Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private - -Notification(s) sent. % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 594 100 34 100 560 400 6588 --:--:-- --:--:-- --:--:-- 7071 -HTTP/1.1 200 OK -Content-Type: application/json; charset=utf-8 -Content-Length: 34 -ETag: W/"22-6OS7cK0FzqnV2NeDHdOSGS1bVUs" -Vary: Accept-Encoding -Date: Sat, 10 Dec 2022 23:41:47 GMT -Connection: keep-alive -Keep-Alive: timeout=5 - -{"message":"Workflow was started"} % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 3263 0 0 100 3263 0 2714 0:00:01 0:00:01 --:--:-- 2716 100 3284 100 21 100 3263 11 1859 0:00:01 0:00:01 --:--:-- 1871 -HTTP/1.1 200 OK -Server: nginx/1.18.0 -Date: Sun, 11 Dec 2022 00:52:29 GMT -Content-Type: text/html; charset=utf-8 -Content-Length: 21 -Connection: keep-alive -Expires: Sun, 11 Dec 2022 00:52:29 GMT -Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private - -Notification(s) sent. % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 590 100 34 100 556 1478 24173 --:--:-- --:--:-- --:--:-- 25652 -HTTP/1.1 200 OK -Content-Type: application/json; charset=utf-8 -Content-Length: 34 -ETag: W/"22-6OS7cK0FzqnV2NeDHdOSGS1bVUs" -Vary: Accept-Encoding -Date: Sun, 11 Dec 2022 00:52:29 GMT -Connection: keep-alive -Keep-Alive: timeout=5 - -{"message":"Workflow was started"} \ No newline at end of file diff --git a/log/webhook_payload.json b/log/webhook_payload.json deleted file mode 100755 index 56aa9a6c..00000000 --- a/log/webhook_payload.json +++ /dev/null @@ -1 +0,0 @@ -{"username": "Pi.Alert", "text": "There are new notifications", "attachments": [{"title": "Pi.Alert Notifications", "title_link": "http://100.89.112.105:20211", "text": {"internet": [], "new_devices": [], "down_devices": [], "events": [["94:b5:55:c7:cb:e0", "192.168.1.151", "2022-12-11 11:52:00", "Connected", "", 1, null, "94:b5:55:c7:cb:e0", "ESP32 - ttgo", "House", "", "Espressif Inc.", 0, "", "", "2022-10-16 16:55:00", "2022-12-11 11:52:00", "192.168.1.151", 0, 1, 1, 1, 0, 0, "2022-12-11 10:41:48.466369", 1, 0, "", 0, "d0:21:f9:8c:59:f9", ""]]}}]} \ No newline at end of file