diff --git a/README.md b/README.md index b51ac1ff..b2cbec36 100755 --- a/README.md +++ b/README.md @@ -1,99 +1,89 @@ -# Pi.Alert - +# πŸ’»πŸ” Network security scanner -πŸ’»πŸ” WIFI / LAN intruder detector. +Scans for devices, port changes on your WIFI/LAN and alerts you if unknown devices or changes are found. -Scans for devices connected to your WIFI / LAN and alerts you if new and unknown devices are found. - -![Main screen][main] - -# 🐳 Docker image [![Docker](https://img.shields.io/github/actions/workflow/status/jokob-sk/Pi.Alert/docker_prod.yml?label=Build&logo=GitHub)](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker_prod.yml) [![GitHub Committed](https://img.shields.io/github/last-commit/jokob-sk/Pi.Alert?color=40ba12&label=Committed&logo=GitHub&logoColor=fff)](https://github.com/jokob-sk/Pi.Alert) [![Docker Size](https://img.shields.io/docker/image-size/jokobsk/pi.alert?label=Size&logo=Docker&color=0aa8d2&logoColor=fff)](https://hub.docker.com/r/jokobsk/pi.alert) [![Docker Pulls](https://img.shields.io/docker/pulls/jokobsk/pi.alert?label=Pulls&logo=docker&color=0aa8d2&logoColor=fff)](https://hub.docker.com/r/jokobsk/pi.alert) [![Docker Pushed](https://img.shields.io/badge/dynamic/json?color=0aa8d2&logoColor=fff&label=Pushed&query=last_updated&url=https%3A%2F%2Fhub.docker.com%2Fv2%2Frepositories%2Fjokobsk%2Fpi.alert%2F&logo=docker&link=http://left&link=https://hub.docker.com/repository/docker/jokobsk/pi.alert)](https://hub.docker.com/r/jokobsk/pi.alert) -🐳 [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) + | 🐳 [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) | + |----------------------|----------------------| ----------------------| ----------------------| -## πŸ” Scan Methods -The system continuously scans the network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include: - - **arp-scan**. The arp-scan system utility is used to search for devices on the network using arp frames. - - **Pi-hole - DB import**. The PiHole database is used as a source for events for devices - - **Pi-hole - DHCP leases**. Import of devices from the PiHole dhcp.leases file - - **Generic DHCP leases**. Import of devices from the generic dhcp.leases file - - **UNIFI import**. Import of devices from the UNIFI controller - - **SNMP-enabled router import**. Import of devices from an SNMP-enabled router +## Why PiAlert❓ Isn't this scary πŸ‘»... -## 🧩 Integrations - - [Apprise](https://hub.docker.com/r/caronc/apprise), [Pushsafer](https://www.pushsafer.com/), [NTFY](https://ntfy.sh/) - - [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md) - - [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md) - - [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) - - [Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) for custom scripts monitoring and framework for extending the app +...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 πŸ˜–. -# πŸ“₯ Installation - +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 πŸ”_. - ⚠ Only tested as a [docker container - follow the guide here](dockerfiles/README.md). - > Check out [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) if you want to install Pi.Alert on the server directly or check instructions for [pucherot's original code](https://github.com/pucherot/Pi.Alert/) +_PiAlert combines several network and other scanning tools πŸ” with notifications πŸ“§ into one user-friendly package πŸ“¦_. You get an overview of network device Sessions, Connected devices, Favorites, Events, Presence, Down alerts, and IPs. You can schedule Nmap scans to detect changes in device ports and visualize your Network topology (even with undetectable, dummy devices). -# πŸ“‘ Features - - Display: - - Sessions, Connected devices, Favorites, Events, Presence, Concurrent devices, Down alerts, IP's - - Manual Nmap scans, Optional speedtest for Device "Internet" - - Simple Network relationship display - - Maintenance tasks and Settings like: - - Theme Selection (blue, red, green, yellow, black, purple) and Light/Dark-Mode Switch - - DB maintenance, Backup, Restore tools and CSV Export / Import - - Simple login Support - - 🌟[Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) - - Create custom plugins with automatically generated settings and UI. - - Monitor anything for changes - - Check the [instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) carefully if you are up for a challenge! Current plugins include: - - Detecting Rogue DHCP servers via NMAP - - Monitoring HTTP status changes of domains/URLs - - Import devices from DHCP.leases files, a UniFi controller, or an SNMP enabled router - - Creation of dummy devices to visualize your [network map](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md) +Setup a _kill switch ☠_ for your network via a smart plug with the available [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md) integration. Implement custom automations with the [CSV device Exports πŸ“€](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins/csv_backup), [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md), or [API endpoints](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md) features. - | ![Screen 1][screen1] | ![Screen 2][screen2] | ![Screen 5][screen5] | +Extend the app if you want to create your own scanner and handle the results and notifications in PiAlert. Check available [Plugins & Instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins). Looking forward to your contributions if you decide to share your work with the community ❀. + + | ![Main screen][main] | ![Screen 1][screen1] | ![Screen 5][screen5] | |----------------------|----------------------| ----------------------| | ![Screen 3][screen3] | ![Screen 4][screen4] | ![Screen 6][screen6] | | ![Screen 8][screen8] | ![Report 2][report2] | ![Screen 9][screen9] | + +## Scan Methods, Notifications, Integration, Extension system + +| Features | Details | +|-------------|-------------| +| πŸ” | The app scans your network for, **New devices**, **New connections** (re-connections), **Disconnections**, **"Always Connected" devices down**, Devices **IP changes** and **Internet IP address changes**. Discovery & scan methods include: **arp-scan**. **Pi-hole - DB import**, **Pi-hole - DHCP leases import**, **Generic DHCP leases import**. **UNIFI controller import**, **SNMP-enabled router import**. Check the [Plugins](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) docs for more info on individual scans. | +|πŸ“§ | Send notifications to more than 80+ services, including Telegram via [Apprise](https://hub.docker.com/r/caronc/apprise), or use [Pushsafer](https://www.pushsafer.com/), or [NTFY](https://ntfy.sh/). | +|🧩 | Feed your data and device changes into [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md), read [API endpoints](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md), or use [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md) to setup custom automation flows. | +|βž• | Build your own scanners with the [Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) | + + + +## Installation & Documentation + + +| Docs | Link | +|-------------|-------------| +| πŸ“₯ | [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) (HW install not supported, but might be possible - submit a PRπŸ™ or start a discussion) | +| πŸ“š | [All Documentation](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/README.md) (App Usage and Configuration) | +> Other Alternatives +> +> - Check out [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) if you want to install Pi.Alert on the server directly (maintained) +> - Check instructions for [pucherot's original code](https://github.com/pucherot/Pi.Alert/) (unmaintained) +> - [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source) +> - [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware) -### πŸ”— Other Alternatives +## ❀ Support me - - [WatchYourLAN](https://github.com/aceberg/WatchYourLAN) - Lightweight network IP scanner with web GUI (Open source) - - [Fing](https://www.fing.com/) - Network scanner app for your Internet security (Commercial, Phone App, Proprietary hardware) +Get: +- Regular updates to keep your data and family safe πŸ”„ +- Better and more functionalityβž• +- I don't get burned out and the app survives longerπŸ”₯🀯 +- Quicker and better support with issues πŸ†˜ +- Less grumpy me πŸ˜„ -### πŸ“š Documentation +| [![GitHub](https://i.imgur.com/emsRCPh.png)](https://github.com/sponsors/jokob-sk) | [![Buy Me A Coffee](https://i.imgur.com/pIM6YXL.png)](https://www.buymeacoffee.com/jokobsk) | [![Patreon](https://i.imgur.com/MuYsrq1.png)](https://www.patreon.com/user?u=84385063) | +| --- | --- | --- | -- Initial Docker Setup: [Docker instructions](https://github.com/jokob-sk/Pi.Alert/blob/main/dockerfiles/README.md) -- App Usage and Configuration: [All Documentation](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/README.md) +- Bitcoin: `1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM` +- Ethereum: `0x6e2749Cb42F4411bc98501406BdcD82244e3f9C7` + +> πŸ“§ Email me at [jokob@duck.com](mailto:jokob@duck.com?subject=PiAlert) if you want to get in touch or if I should add other sponsorship platforms. + +## Everything else + ### License - GPL 3.0 | [Read more here](LICENSE.txt) | Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif) | Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans) +> GPL 3.0 | [Read more here](LICENSE.txt) | Source of the [animated GIF (Loading Animation)](https://commons.wikimedia.org/wiki/File:Loading_Animation.gif) | Source of the [selfhosted Fonts](https://github.com/adobe-fonts/source-sans) -### πŸ₯‡ Special thanks +### Special thanks - This code is a collaborative body of work, with special thanks to: +This code is a collaborative body of work, with special thanks to: - - πŸ† [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert) is the original creator od PiAlert - - [leiweibau](https://github.com/leiweibau/Pi.Alert): Dark mode (and much more) - - [Macleykun](https://github.com/Macleykun): Help with Dockerfile clean-up - - [Final-Hawk](https://github.com/Final-Hawk): Help with NTFY, styling and other fixes - - [TeroRERO](https://github.com/terorero): Spanish translation - - [Data-Monkey](https://github.com/Data-Monkey): Split-up of the python.py file and more - - Please see the [Git contributors](https://github.com/jokob-sk/Pi.Alert/graphs/contributors) for a full list of people and their contributions to the project - -## β˜• Support me - -Sponsor Me on GitHub -Buy Me A Coffee -Support me on patreon - -BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM +> [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert) (the original creator of PiAlert), [leiweibau](https://github.com/leiweibau/Pi.Alert): Dark mode (and much more), [Macleykun](https://github.com/Macleykun) (Help with Dockerfile clean-up) [Final-Hawk](https://github.com/Final-Hawk) (Help with NTFY, styling and other fixes), [TeroRERO](https://github.com/terorero) (Spanish translations), [Data-Monkey](https://github.com/Data-Monkey), (Split-up of the python.py file and more), [cvc90](https://github.com/cvc90) (Spanish translation and various UI work) to name a few... +> +> Please see the [Git contributors](https://github.com/jokob-sk/Pi.Alert/graphs/contributors) for a full list of people and their contributions to the project [main]: ./docs/img/devices_split.png "Main screen" diff --git a/front/css/pialert.css b/front/css/pialert.css index 039c2ab6..4db3080d 100755 --- a/front/css/pialert.css +++ b/front/css/pialert.css @@ -940,3 +940,20 @@ input[readonly] { { z-index: 100; } + +/* ----------------------------------------------------------------------------- + Donations +----------------------------------------------------------------------------- */ +.donations .box +{ + padding:15px; + margin-bottom: 0px; +} +.donations .box-header +{ + color:15px; +} +.donations h3 +{ + margin-top: 10px; +} diff --git a/front/donations.php b/front/donations.php index 7d53d51a..f7ee5623 100755 --- a/front/donations.php +++ b/front/donations.php @@ -2,21 +2,69 @@ require 'php/templates/header.php'; ?> +
+ +
+

+ +

+
+ +
+
+
+

+
+
+
+
+ + Sponsor Me on GitHub + +
+
+ + Buy Me A Coffee + +
+
+ + Support me on patreon + +
+
+
+
+

+
+
+
+
+
    +
  • Bitcoin: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM
  • +
  • Ethereum: 0x6e2749Cb42F4411bc98501406BdcD82244e3f9C7
  • +
+
+
+
+
+
-
-

- - Sponsor Me on GitHub - - - Buy Me A Coffee - - - Support me on patreon - -

-

- BTC: 1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM -

-
\ No newline at end of file +
+ + + + \ No newline at end of file diff --git a/front/php/templates/footer.php b/front/php/templates/footer.php index 6359d61f..7cedd4bb 100755 --- a/front/php/templates/footer.php +++ b/front/php/templates/footer.php @@ -27,9 +27,8 @@
- Pi.Alert'; - ?> + Pi.Alert +
diff --git a/front/php/templates/header.php b/front/php/templates/header.php index c0946cfe..486528af 100755 --- a/front/php/templates/header.php +++ b/front/php/templates/header.php @@ -261,9 +261,9 @@ if ($ENABLED_DARKMODE === True) {
  • - + diff --git a/front/php/templates/language/en_us.json b/front/php/templates/language/en_us.json index 5e269628..fda88d57 100755 --- a/front/php/templates/language/en_us.json +++ b/front/php/templates/language/en_us.json @@ -663,6 +663,10 @@ "Systeminfo_System_System": "System:", "Systeminfo_System_Uname": "Uname:", "Systeminfo_System_Uptime": "Uptime:", - "Systeminfo_USB_Devices" : "USB Devices" + "Systeminfo_USB_Devices" : "USB Devices", + "Donations_Title" : "Donations", + "Donations_Text" : "Hey πŸ‘‹!
    Thanks for clicking on this menu item πŸ˜…

    I'm trying to collect some donations to make you better software. Also, it would help me not to get burned out. Me burning out might mean end of support for this app. Any small (recurring or not) sponsorship makes me want ot put more effort into this app. I don't want to lock features (new plugins) behind paywalls πŸ”.
    Currently, I'm waking up 2h before work so I contribute to the app a bit. If I had some recurring income I could shorten my workweek and in the remaining time fully focus on PiAlert. You'd get more functionality, a more polished app and less bugs.

    Thanks for reading - I'm super grateful for any support β€πŸ™

    TL;DR: By supporting me you get:


    πŸ“§Email me to jokob@duck.com if you want to get in touch or if I should add other sponsorship platforms.
    ", + "Donations_Platforms" : "Sponsor platforms", + "Donations_Others" : "Others" } } diff --git a/front/plugins/README.md b/front/plugins/README.md index cdf85cd6..4364cc65 100755 --- a/front/plugins/README.md +++ b/front/plugins/README.md @@ -2,6 +2,8 @@ ### 🏴 Community translations of this file +> Please note there might be a delay between English and community translations. + * README_ES.md Spanish (Spain) @@ -14,18 +16,18 @@ | Required | CurrentScan | Unique Prefix | Plugin Type | Link + Docs | |-------------|-------------|-----------------------|------------------------|----------------------------------------------------------| -| | Yes | ARPSCAN | Script | [arp_scan](/front/plugins/arp_scan/) | -| | | CSVBCKP | Script | [csv_backup](/front/plugins/csv_backup/) | -| | Yes | DHCPLSS | Script | [dhcp_leases](/front/plugins/dhcp_leases/) | -| | | DHCPSRVS | Script | [dhcp_servers](/front/plugins/dhcp_servers/) | -| Yes | | NEWDEV | Template | [newdev_template](/front/plugins/newdev_template/) | -| | | NMAP | Script | [nmap_scan](/front/plugins/nmap_scan/) | -| | Yes | PIHOLE | External SQLite DB | [pihole_scan](/front/plugins/pihole_scan/) | -| | | SETPWD | Script | [set_password](/front/plugins/set_password/) | -| | | SNMPDSC | Script | [snmp_discovery](/front/plugins/snmp_discovery/) | -| | Yes* | UNDIS | Script | [undiscoverables](/front/plugins/undiscoverables/) | -| | Yes | UNFIMP | Script | [unifi_import](/front/plugins/unifi_import/) | -| | | WEBMON | Script | [website_monitor](/front/plugins/website_monitor/) | +| | Yes | ARPSCAN | Script | πŸ“š[arp_scan](/front/plugins/arp_scan/) | +| | | CSVBCKP | Script | πŸ“š[csv_backup](/front/plugins/csv_backup/) | +| | Yes | DHCPLSS | Script | πŸ“š[dhcp_leases](/front/plugins/dhcp_leases/) | +| | | DHCPSRVS | Script | πŸ“š[dhcp_servers](/front/plugins/dhcp_servers/) | +| Yes | | NEWDEV | Template | πŸ“š[newdev_template](/front/plugins/newdev_template/) | +| | | NMAP | Script | πŸ“š[nmap_scan](/front/plugins/nmap_scan/) | +| | Yes | PIHOLE | External SQLite DB | πŸ“š[pihole_scan](/front/plugins/pihole_scan/) | +| | | SETPWD | Script | πŸ“š[set_password](/front/plugins/set_password/) | +| | | SNMPDSC | Script | πŸ“š[snmp_discovery](/front/plugins/snmp_discovery/) | +| | Yes* | UNDIS | Script | πŸ“š[undiscoverables](/front/plugins/undiscoverables/) | +| | Yes | UNFIMP | Script | πŸ“š[unifi_import](/front/plugins/unifi_import/) | +| | | WEBMON | Script | πŸ“š[website_monitor](/front/plugins/website_monitor/) | | N/A | | N/A | SQL query | No example available, but the External SQLite based plugins work very similar | >* The Undiscoverables plugin (`UNDIS`) inserts only user-specified dummy devices. diff --git a/front/plugins/dhcp_leases/config.json b/front/plugins/dhcp_leases/config.json index ed35a7ef..a462da94 100755 --- a/front/plugins/dhcp_leases/config.json +++ b/front/plugins/dhcp_leases/config.json @@ -393,7 +393,7 @@ }], "description": [{ "language_code":"en_us", - "string" : "Only enabled if you select schedule in the DHCPLSS_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes." + "string" : "Only enabled if you select schedule in the DHCPLSS_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes.
    It's recommended to use the same schedule interval for all plugins responsible for discovering new devices." }, { "language_code":"es_es", diff --git a/front/plugins/snmp_discovery/config.json b/front/plugins/snmp_discovery/config.json index 19c13a70..aef045a9 100755 --- a/front/plugins/snmp_discovery/config.json +++ b/front/plugins/snmp_discovery/config.json @@ -389,7 +389,7 @@ }], "description": [{ "language_code":"en_us", - "string" : "Only enabled if you select schedule in the SNMPDSC_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes." + "string" : "Only enabled if you select schedule in the SNMPDSC_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes.
    It's recommended to use the same schedule interval for all plugins responsible for discovering new devices. " }, { "language_code":"es_es", diff --git a/front/plugins/unifi_import/config.json b/front/plugins/unifi_import/config.json index b36cda3c..66b744f3 100755 --- a/front/plugins/unifi_import/config.json +++ b/front/plugins/unifi_import/config.json @@ -768,7 +768,7 @@ "description": [ { "language_code": "en_us", - "string": "Only enabled if you select schedule in the UNFIMP_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes." + "string": "Only enabled if you select schedule in the UNFIMP_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes.
    It's recommended to use the same schedule interval for all plugins responsible for discovering new devices. " }, { "language_code": "es_es", diff --git a/front/pluginsCore.php b/front/pluginsCore.php index f0b96f24..bb3b8cb6 100755 --- a/front/pluginsCore.php +++ b/front/pluginsCore.php @@ -33,12 +33,12 @@ function initFields() { // if the current mac has changed, reinitialize the data if(mac != undefined && $("#txtMacFilter").val() != mac) - { - $("#txtMacFilter").val(mac); - console.log("UPDATE"); + { + + $("#txtMacFilter").val(mac); getData(); - } + } } @@ -512,6 +512,7 @@ function shouldBeShown(entry, pluginObj) compare_use_quotes = dataFilters[i].compare_use_quotes; compare_field_id_value = $(`#${compare_field_id}`).val(); + // apply filter i sthe filter field has a valid value if(compare_field_id_value != undefined && compare_field_id_value != '--') { // valid value