diff --git a/Dockerfile b/Dockerfile index a9f5eda5..ecfcb131 100755 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,8 @@ RUN apt-get install -y python3-venv RUN python3 -m venv myenv RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet" +# Create a buildtimestamp.txt to later check if a new version was released +RUN date +%s > /home/pi/pialert/front/buildtimestamp.txt CMD ["/home/pi/pialert/dockerfiles/start.sh"] diff --git a/README.md b/README.md index 7197f33f..bfe4052c 100755 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ Scans for devices, port changes on your WIFI/LAN and alerts you if unknown devic | 🐳 [Docker hub](https://registry.hub.docker.com/r/jokobsk/pi.alert) | πŸ“‘ [Docker guide](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) |πŸ†• [Release notes](https://github.com/jokob-sk/Pi.Alert/releases) | πŸ“š [All Docs](https://github.com/jokob-sk/Pi.Alert/tree/main/docs) | |----------------------|----------------------| ----------------------| ----------------------| -## Why PiAlert❓ Isn't this scary πŸ‘»... +## Why PiAlert❓ -...most of us don't know what's going on on our home network, but we want our family and data to _be safe_. _Command-line tools_ are great, but the output can be _hard to understand_ and action if you are not a network specialist πŸ˜–. +Most of us don't know what's going on on our home network, but we want our family and data to _be safe_. _Command-line tools_ are great, but the output can be _hard to understand_ and action if you are not a network specialist πŸ˜–. PiAlert gives you peace of mind. _Visualize and immediately report πŸ“¬_ what is going on in your network - this is the first step to enhance your _network security πŸ”_. diff --git a/dockerfiles/start.sh b/dockerfiles/start.sh index e8e85ec0..1e9fc2bb 100755 --- a/dockerfiles/start.sh +++ b/dockerfiles/start.sh @@ -94,8 +94,11 @@ chmod -R a+rwx $INSTALL_DIR # second time after we copied the files chmod -R a+rw $INSTALL_DIR/pialert/config sudo chgrp -R www-data $INSTALL_DIR/pialert -# Create buildtimestamp.txt -date +%s > "$INSTALL_DIR/pialert/front/buildtimestamp.txt" +# Check if buildtimestamp.txt doesn't exist +if [ ! -f "$INSTALL_DIR/pialert/front/buildtimestamp.txt" ]; then + # Create buildtimestamp.txt + date +%s > "$INSTALL_DIR/pialert/front/buildtimestamp.txt" +fi # start PHP diff --git a/front/php/templates/language/de_de.json b/front/php/templates/language/de_de.json index e18b2f4e..4f23ed65 100755 --- a/front/php/templates/language/de_de.json +++ b/front/php/templates/language/de_de.json @@ -528,7 +528,7 @@ "run_event_tooltip": "Enable the setting and save your changes at first before you run it.", "run_event_icon": "fa-play", "general_event_title": "Executing an ad-hoc event", - "general_event_description": " The event you nove triggered might take a while until background processes finish. The execution ended once you see finished below. Check the error log if you didn not get the expected result.

Status: ", + "general_event_description": " The event you have triggered might take a while until background processes finish. The execution ended once you see finished below. Check the error log if you didn not get the expected result.

Status: ", "Plugins_Unprocessed_Events": "Unprocessed Events", "Plugins_Objects": "Plugin Objects", "Plugins_DeleteAll": "Delete all (filters are ignored)", diff --git a/front/php/templates/language/en_us.json b/front/php/templates/language/en_us.json index 0af130a3..80f0721a 100755 --- a/front/php/templates/language/en_us.json +++ b/front/php/templates/language/en_us.json @@ -452,7 +452,7 @@ "run_event_tooltip" : "Enable the setting and save your changes at first before you run it.", "run_event_icon" : "fa-play", "general_event_title" : "Executing an ad-hoc event", - "general_event_description" : "The event you nove triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the error log if you encounter issues).

Execution queue:", + "general_event_description" : "The event you have triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the error log if you encounter issues).

Execution queue:", "Plugins_Unprocessed_Events" : "Unprocessed Events", "Plugins_Objects" : "Plugin Objects", "Plugins_DeleteAll" : "Delete all (filters are ignored)", @@ -466,7 +466,7 @@ "settings_device_scanners_icon" : "fa-solid fa-magnifying-glass-plus", "settings_other_scanners_icon" : "fa-solid fa-recycle", "settings_system_icon" : "fa-solid fa-gear", - "settings_publisher_icon" : "fa-solid fa-comment-dots", + "settings_publishers_icon" : "fa-solid fa-comment-dots", "Settings_Metadata_Toggle" : "Show/hide metadata for the given setting.", "settings_missing" : "Not all settings loaded, refresh the page! This is probably caused by a high load on the database or app startup sequence.", "settings_missing_block" : "You can not save your settings without specifying all setting keys. Refresh the page. This is probably caused by a high load on the database.", @@ -480,7 +480,7 @@ "settings_other_scanners" : "Other, non-device scanner plugins that are currently enabled.", "settings_device_scanners_label" : "Device scanners", "settings_device_scanners" : "Device scanners used to discover devices that write into the CurrentScan database table.", - "settings_publisher_label" : "Publishers", + "settings_publishers_label" : "Publishers", "settings_publishers" : "Enabled notification gateways - publishers, that will send a notification depending on your settings.", "settings_expand_all" : "Expand all", "Settings_device_Scanners_desync": "⚠ Device scanner schedules are out-of-sync.", diff --git a/front/plugins/README.md b/front/plugins/README.md index 47a2a3d5..868b45bf 100755 --- a/front/plugins/README.md +++ b/front/plugins/README.md @@ -14,36 +14,37 @@ ### πŸ”Œ Plugins & πŸ“š Docs -| Required | CurrentScan | Unique Prefix | Data source | Type | Link + Docs | -|----------|-------------|---------------|--------------------|--------------|------------------------------------------------------------------| -| | | APPRISE | Script | πŸ’¬ publisher | πŸ“š[_publisher_apprise](/front/plugins/_publisher_apprise/) | -| | Yes | ARPSCAN | Script | πŸ”dev scanner| πŸ“š[arp_scan](/front/plugins/arp_scan/) | -| | | CSVBCKP | Script | βš™ system | πŸ“š[csv_backup](/front/plugins/csv_backup/) | -| Yes* | | DBCLNP | Script | βš™ system | πŸ“š[db_cleanup](/front/plugins/db_cleanup/) | -| | | DDNS | Script | βš™ system | πŸ“š[ddns_update](/front/plugins/ddns_update/) | -| | Yes | DHCPLSS | Script | πŸ”dev scanner| πŸ“š[dhcp_leases](/front/plugins/dhcp_leases/) | -| | | DHCPSRVS | Script | β™» other | πŸ“š[dhcp_servers](/front/plugins/dhcp_servers/) | -| | Yes | INTRNT | Script | πŸ”dev scanner| πŸ“š[internet_ip](/front/plugins/internet_ip/) | -| | | INTRSPD | Script | β™» other | πŸ“š[internet_speedtest](/front/plugins/internet_speedtest/) | -| Yes | | NEWDEV | Template | βš™ system | πŸ“š[newdev_template](/front/plugins/newdev_template/) | -| | | PHOLUS | Script | β™» other | πŸ“š[pholus_scan](/front/plugins/pholus_scan/) | -| | | MQTT | Script | πŸ’¬ publisher | πŸ“š[_publisher_mqtt](/front/plugins/_publisher_mqtt/) | -| | | NMAP | Script | β™» other | πŸ“š[nmap_scan](/front/plugins/nmap_scan/) | -| | | NTFY | Script | πŸ’¬ publisher | πŸ“š[_publisher_ntfy](/front/plugins/_publisher_ntfy/) | -| | Yes | PIHOLE | External SQLite DB | πŸ”dev scanner| πŸ“š[pihole_scan](/front/plugins/pihole_scan/) | -| | | PUSHSAFER | Script | πŸ’¬ publisher | πŸ“š[_publisher_pushsafer](/front/plugins/_publisher_pushsafer/) | -| | | SETPWD | Script | βš™ system | πŸ“š[set_password](/front/plugins/set_password/) | -| | | SMTP | Script | πŸ’¬ publisher | πŸ“š[_publisher_email](/front/plugins/_publisher_email/) | -| | | SNMPDSC | Script | πŸ”dev scanner| πŸ“š[snmp_discovery](/front/plugins/snmp_discovery/) | -| | Yes** | UNDIS | Script | β™» other | πŸ“š[undiscoverables](/front/plugins/undiscoverables/) | -| | Yes | UNFIMP | Script | πŸ”dev scanner| πŸ“š[unifi_import](/front/plugins/unifi_import/) | -| | | VNDRPDT | Script | βš™ system | πŸ“š[vendor_update](/front/plugins/vendor_update/) | -| | | WEBHOOK | Script | πŸ’¬ publisher | πŸ“š[_publisher_webhook](/front/plugins/_publisher_webhook/) | -| | | WEBMON | Script | β™» other | πŸ“š[website_monitor](/front/plugins/website_monitor/) | -| N/A | | N/A | SQL query | | N/A, but the External SQLite DB plugins work similar | +| Required | CurrentScan | Unique Prefix | Data source | Type | Link + Docs | +|----------|-------------|---------------|--------------------|----------------|------------------------------------------------------------------| +| | | APPRISE | Script | πŸ’¬ publisher | πŸ“š[_publisher_apprise](/front/plugins/_publisher_apprise/) | +| | Yes | ARPSCAN | Script | πŸ”dev scanner | πŸ“š[arp_scan](/front/plugins/arp_scan/) | +| | | CSVBCKP | Script | βš™ system | πŸ“š[csv_backup](/front/plugins/csv_backup/) | +| Yes* | | DBCLNP | Script | βš™ system | πŸ“š[db_cleanup](/front/plugins/db_cleanup/) | +| | | DDNS | Script | βš™ system | πŸ“š[ddns_update](/front/plugins/ddns_update/) | +| | Yes | DHCPLSS | Script | πŸ”dev scanner | πŸ“š[dhcp_leases](/front/plugins/dhcp_leases/) | +| | | DHCPSRVS | Script | β™» other | πŸ“š[dhcp_servers](/front/plugins/dhcp_servers/) | +| | Yes | INTRNT | Script | πŸ”dev scanner | πŸ“š[internet_ip](/front/plugins/internet_ip/) | +| | | INTRSPD | Script | β™» other | πŸ“š[internet_speedtest](/front/plugins/internet_speedtest/) | +| Yes | | NEWDEV | Template | βš™ system | πŸ“š[newdev_template](/front/plugins/newdev_template/) | +| | | PHOLUS | Script | β™» other | πŸ“š[pholus_scan](/front/plugins/pholus_scan/) | +| | | MQTT | Script | πŸ’¬ publisher | πŸ“š[_publisher_mqtt](/front/plugins/_publisher_mqtt/) | +| | | NMAP | Script | β™» other | πŸ“š[nmap_scan](/front/plugins/nmap_scan/) | +| | | NTFY | Script | πŸ’¬ publisher | πŸ“š[_publisher_ntfy](/front/plugins/_publisher_ntfy/) | +| | Yes | PIHOLE | External SQLite DB | πŸ”dev scanner | πŸ“š[pihole_scan](/front/plugins/pihole_scan/) | +| | | PUSHSAFER | Script | πŸ’¬ publisher | πŸ“š[_publisher_pushsafer](/front/plugins/_publisher_pushsafer/) | +| | | SETPWD | Script | βš™ system | πŸ“š[set_password](/front/plugins/set_password/) | +| | | SMTP | Script | πŸ’¬ publisher | πŸ“š[_publisher_email](/front/plugins/_publisher_email/) | +| | Yes | SNMPDSC | Script | πŸ”dev scanner | πŸ“š[snmp_discovery](/front/plugins/snmp_discovery/) | +| | Yes** | UNDIS | Script | β™» other | πŸ“š[undiscoverables](/front/plugins/undiscoverables/) | +| | Yes | UNFIMP | Script | πŸ”dev scanner | πŸ“š[unifi_import](/front/plugins/unifi_import/) | +| | | VNDRPDT | Script | βš™ system | πŸ“š[vendor_update](/front/plugins/vendor_update/) | +| | | WEBHOOK | Script | πŸ’¬ publisher | πŸ“š[_publisher_webhook](/front/plugins/_publisher_webhook/) | +| | | WEBMON | Script | β™» other | πŸ“š[website_monitor](/front/plugins/website_monitor/) | +| N/A | | N/A | SQL query | | N/A, but the External SQLite DB plugins work similar | > \* The database cleanup plugin (`DBCLNP`) is not _required_ but the app will become unusable after a while if not executed. +> > \** The Undiscoverables plugin (`UNDIS`) inserts only user-specified dummy devices. > [!NOTE] diff --git a/front/plugins/pihole_scan/config.json b/front/plugins/pihole_scan/config.json index 025459fe..a3a28602 100755 --- a/front/plugins/pihole_scan/config.json +++ b/front/plugins/pihole_scan/config.json @@ -105,7 +105,7 @@ }, { "function": "DB_PATH", - "type": "readonly", + "type": "text", "default_value":"/etc/pihole/pihole-FTL.db", "options": [], "localized": ["name", "description"], diff --git a/front/settings.php b/front/settings.php index 092305a4..4f26e9e0 100755 --- a/front/settings.php +++ b/front/settings.php @@ -128,7 +128,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
- "> + ">
@@ -202,7 +202,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { overviewSections = [ 'device_scanners', 'other_scanners', - 'publishers_enabled' + 'publishers' ] overviewSectionsHtml = [ pluginCards(enabledDeviceScanners,['RUN', 'RUN_SCHD']), diff --git a/pialert/plugin_utils.py b/pialert/plugin_utils.py index 7e41ea46..5092332b 100755 --- a/pialert/plugin_utils.py +++ b/pialert/plugin_utils.py @@ -218,7 +218,7 @@ def getPluginObject(keyValues): if all_match: return item - mylog('verbose', [f'[{module_name}] ⚠ ERROR - Object not found {json.dumps(keyValues)} ']) + mylog('verbose', [f'[{module_name}] πŸ’¬ INFO - Object not found {json.dumps(keyValues)} ']) return {}