From c57513618b6a3004bee09c6945442658741eeb6b Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 19:52:04 +0200
Subject: [PATCH 01/18] Update es_es.json
Added translation variables "APPRISE_SIZE_name"
Added translation variables "APPRISE_SIZE_description"
---
front/php/templates/language/es_es.json | 2 ++
1 file changed, 2 insertions(+)
diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json
index de591a65..9be065da 100755
--- a/front/php/templates/language/es_es.json
+++ b/front/php/templates/language/es_es.json
@@ -515,6 +515,8 @@
"APPRISE_HOST_name" : "Apprise host URL",
"APPRISE_URL_name" : "URL de notificación de Apprise",
"APPRISE_URL_description" : "Informar de la URL de destino de la notificación. Por ejemplo, para Telegram sería tgram://{bot_token}/{chat_id}.",
+ "APPRISE_SIZE_name": "Tamaño máximo de carga útil",
+ "APPRISE_SIZE_description": "El tamaño máximo de la carga útil de información como número de caracteres en la cadena pasada. Si supera el límite, se truncará y se agregará un mensaje (text was truncated).",
"NTFY_display_name" : "NTFY",
"NTFY_icon" : "",
"REPORT_NTFY_name" : "Habilitar NTFY",
From 64a3c348bdea7c8c89f594733a3eb0a2ea63d8c8 Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 20:02:42 +0200
Subject: [PATCH 02/18] Update es_es.json
Updated translation variable "APPRISE_HOST_name"
Updated translation variable "APPRISE_HOST_description"
---
front/php/templates/language/es_es.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json
index 9be065da..11b7478c 100755
--- a/front/php/templates/language/es_es.json
+++ b/front/php/templates/language/es_es.json
@@ -511,8 +511,8 @@
"Apprise_icon" : "",
"REPORT_APPRISE_name" : "Habilitar Apprise",
"REPORT_APPRISE_description" : "Habilitar el envío de notificaciones a través de Apprise.",
- "APPRISE_HOST_description" : "Apprise host URL que comienza con http:// o https://. (no olvide incluir /notify al final)",
- "APPRISE_HOST_name" : "Apprise host URL",
+ "APPRISE_HOST_description" : "URL del host de Apprise que comienza con http:// o https://. (no olvide incluir /notify al final)",
+ "APPRISE_HOST_name" : "URL del host de Apprise",
"APPRISE_URL_name" : "URL de notificación de Apprise",
"APPRISE_URL_description" : "Informar de la URL de destino de la notificación. Por ejemplo, para Telegram sería tgram://{bot_token}/{chat_id}.",
"APPRISE_SIZE_name": "Tamaño máximo de carga útil",
From e14475afb02e07e3b4c33326dd219c384da62f33 Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 20:04:30 +0200
Subject: [PATCH 03/18] Update es_es.json
Updated translation variable "NTFY_HOST_name"
---
front/php/templates/language/es_es.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json
index 11b7478c..18b1aae1 100755
--- a/front/php/templates/language/es_es.json
+++ b/front/php/templates/language/es_es.json
@@ -521,7 +521,7 @@
"NTFY_icon" : "",
"REPORT_NTFY_name" : "Habilitar NTFY",
"REPORT_NTFY_description" : "Habilitar el envío de notificaciones a través de NTFY.",
- "NTFY_HOST_name" : "NTFY host URL",
+ "NTFY_HOST_name" : "URL del host NTFY",
"NTFY_HOST_description" : "URL de host NTFY que comienza con http:// o https://. Puede usar la instancia alojada en https://ntfy.sh simplemente ingresando https://ntfy. sh.",
"NTFY_TOPIC_name" : "Tema de NTFY",
"NTFY_TOPIC_description" : "Tu tema secreto.",
From 41cfdcdc002fdf051d6aedd109972d60739b392f Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 20:23:40 +0200
Subject: [PATCH 04/18] Update es_es.json
Updated translation variable "DDNS_ACTIVE_description"
Updated translation variable "DDNS_DOMAIN_description"
Updated translation variable "DDNS_USER_description"
Updated translation variable "DDNS_PASSWORD_description"
---
front/php/templates/language/es_es.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json
index 18b1aae1..fa8e7163 100755
--- a/front/php/templates/language/es_es.json
+++ b/front/php/templates/language/es_es.json
@@ -558,13 +558,13 @@
"DynDNS_display_name" : "DynDNS",
"DynDNS_icon" : "",
"DDNS_ACTIVE_name" : "Habilitar DynDNS",
- "DDNS_ACTIVE_description" : "",
+ "DDNS_ACTIVE_description" : "Habilitar el servicio DynDNS",
"DDNS_DOMAIN_name" : "URL del dominio DynDNS",
- "DDNS_DOMAIN_description" : "",
+ "DDNS_DOMAIN_description" : "URL del host DynDNS (no incluya http:// o https://).",
"DDNS_USER_name" : "Usuario de DynDNS",
- "DDNS_USER_description" : "",
+ "DDNS_USER_description" : "El nombre de usuario utilizado para iniciar sesión en el servidor DynDNS (a veces, una dirección de correo electrónico completa).",
"DDNS_PASSWORD_name" : "Contraseña de DynDNS",
- "DDNS_PASSWORD_description" : "",
+ "DDNS_PASSWORD_description" : "La contraseña del servidor DynDNS.",
"DDNS_UPDATE_URL_name" : "URL de actualización de DynDNS",
"DDNS_UPDATE_URL_description" : "Actualice la URL que comienza con http:// o https://.",
"Nmap_display_name" : "Nmap",
From 45c03aee4546ce2101c7efdb3596bdbe1a39db5d Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 20:26:36 +0200
Subject: [PATCH 05/18] Update es_es.json
Added translation variable "NMAP_TIMEOUT_name"
---
front/php/templates/language/es_es.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json
index fa8e7163..a01ae065 100755
--- a/front/php/templates/language/es_es.json
+++ b/front/php/templates/language/es_es.json
@@ -571,6 +571,7 @@
"Nmap_icon" : "",
"NMAP_ACTIVE_name" : "Ejecución del ciclo",
"NMAP_ACTIVE_description" : "Si está habilitado, ejecutará un escaneo en un dispositivo recién encontrado. Para un análisis programado o único, verifique la configuración de NMAP_RUN.",
+ "NMAP_TIMEOUT_name" : "Tiempo límite de ejecución",
"NMAP_TIMEOUT_description" : "Tiempo máximo en segundos para esperar a que finalice un escaneo de Nmap en cualquier dispositivo.",
"NMAP_RUN_name" : "Ejecución programada",
"NMAP_RUN_description" : "Habilite un escaneo regular de Nmap en su red en todos los dispositivos. Los ajustes de programación se pueden encontrar a continuación. Si selecciona una vez, Nmap se ejecuta solo una vez al inicio durante el tiempo especificado en la configuración de NMAP_TIMEOUT.",
From fb489adc6665bdeeb22bef2994e1f6057ed5199e Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 20:34:26 +0200
Subject: [PATCH 06/18] Update es_es.json
Updated translation variable "DDNS_PASSWORD_description"
---
front/php/templates/language/es_es.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json
index a01ae065..57a63405 100755
--- a/front/php/templates/language/es_es.json
+++ b/front/php/templates/language/es_es.json
@@ -564,7 +564,7 @@
"DDNS_USER_name" : "Usuario de DynDNS",
"DDNS_USER_description" : "El nombre de usuario utilizado para iniciar sesión en el servidor DynDNS (a veces, una dirección de correo electrónico completa).",
"DDNS_PASSWORD_name" : "Contraseña de DynDNS",
- "DDNS_PASSWORD_description" : "La contraseña del servidor DynDNS.",
+ "DDNS_PASSWORD_description" : "La contraseña de acceso al servicio DynDNS.",
"DDNS_UPDATE_URL_name" : "URL de actualización de DynDNS",
"DDNS_UPDATE_URL_description" : "Actualice la URL que comienza con http:// o https://.",
"Nmap_display_name" : "Nmap",
From 6b0a65c4270a9f72a1c86a6bd24810c482d115d7 Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 20:37:04 +0200
Subject: [PATCH 07/18] Update en_us.json
Updated translation variable "DDNS_ACTIVE_description"
Updated translation variable "DDNS_DOMAIN_description"
Updated translation variable "DDNS_USER_description"
Updated translation variable "DDNS_PASSWORD_description"
---
front/php/templates/language/en_us.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/front/php/templates/language/en_us.json b/front/php/templates/language/en_us.json
index d4e02165..f9eb8a57 100755
--- a/front/php/templates/language/en_us.json
+++ b/front/php/templates/language/en_us.json
@@ -563,13 +563,13 @@
"DynDNS_display_name" : "DynDNS",
"DynDNS_icon" : "",
"DDNS_ACTIVE_name" : "Enable DynDNS",
- "DDNS_ACTIVE_description" : "",
+ "DDNS_ACTIVE_description" : "Enable DynDNS service",
"DDNS_DOMAIN_name" : "DynDNS domain URL",
- "DDNS_DOMAIN_description" : "",
+ "DDNS_DOMAIN_description" : "DynDNS host URL (do not include http:// or https://).",
"DDNS_USER_name" : "DynDNS user",
- "DDNS_USER_description" : "",
+ "DDNS_USER_description" : "The username used to login to the DynDNS service (sometimes a full email address).",
"DDNS_PASSWORD_name" : "DynDNS password",
- "DDNS_PASSWORD_description" : "",
+ "DDNS_PASSWORD_description" : "The DynDNS service access password",
"DDNS_UPDATE_URL_name" : "DynDNS update URL",
"DDNS_UPDATE_URL_description" : "Update URL starting with http:// or https://.",
"Nmap_display_name" : "Nmap",
From facc6619e214b2a4930ff7fefa0571cf2ae3ce33 Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 20:38:03 +0200
Subject: [PATCH 08/18] Update es_es.json
Updated translation variable "DDNS_USER_description"
---
front/php/templates/language/es_es.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json
index 57a63405..ae34c6ff 100755
--- a/front/php/templates/language/es_es.json
+++ b/front/php/templates/language/es_es.json
@@ -562,7 +562,7 @@
"DDNS_DOMAIN_name" : "URL del dominio DynDNS",
"DDNS_DOMAIN_description" : "URL del host DynDNS (no incluya http:// o https://).",
"DDNS_USER_name" : "Usuario de DynDNS",
- "DDNS_USER_description" : "El nombre de usuario utilizado para iniciar sesión en el servidor DynDNS (a veces, una dirección de correo electrónico completa).",
+ "DDNS_USER_description" : "El nombre de usuario utilizado para iniciar sesión en el servicio DynDNS (a veces, una dirección de correo electrónico completa).",
"DDNS_PASSWORD_name" : "Contraseña de DynDNS",
"DDNS_PASSWORD_description" : "La contraseña de acceso al servicio DynDNS.",
"DDNS_UPDATE_URL_name" : "URL de actualización de DynDNS",
From 57c9c5b23ff54cd8bf7934d45a12fdc66b5e1e1e Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 21:11:26 +0200
Subject: [PATCH 09/18] Update config.json
Updated config.json file with new Spanish translation variables.
---
front/plugins/pholus_scan/config.json | 28 +++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/front/plugins/pholus_scan/config.json b/front/plugins/pholus_scan/config.json
index b004f69c..3df23280 100755
--- a/front/plugins/pholus_scan/config.json
+++ b/front/plugins/pholus_scan/config.json
@@ -20,6 +20,10 @@
{
"language_code": "en_us",
"string": "Pholus-Scan (Name discovery)"
+ },
+ {
+ "language_code": "en_us",
+ "string": "Pholus-Scan (Descubrimiento de nombre)"
}
],
"icon": [
@@ -36,7 +40,11 @@
{
"language_code": "en_us",
"string": "This plugin is to execute a Pholus-scan (name discovery) on the local network"
- }
+ },
+ {
+ "language_code": "es_es",
+ "string": "Este plugin sirve para ejecutar un escaneo Pholus (descubrimiento de nombres) en la red local."
+ }
],
"params" : [
{
@@ -127,7 +135,11 @@
{
"language_code": "en_us",
"string": "Network scan time in seconds. Pholus scan will always run this long. The longer it runs the more device names might be resolved. Will be divided by the number of subnets."
- }
+ },
+ {
+ "language_code": "es_es",
+ "string": "Tiempo de escaneo de red en segundos. El escaneo de Pholus siempre durará este tiempo. Cuanto más tiempo se ejecute, más nombres de dispositivos se podrán resolver. Se dividirá por el número de subredes."
+ }
]
},
{
@@ -147,6 +159,10 @@
"description": [{
"language_code":"en_us",
"string" : "Only enabled if you select schedule in the PHOLUS_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 30 3 * * * will run the scan at 3:30 am. Will be run NEXT time the time passes. "
+ },
+ {
+ "language_code":"es_es",
+ "string" : "Solo está habilitado si selecciona schedule en la configuración PHOLUS_RUN. Asegúrese de ingresar la programación en el formato cron correcto (por ejemplo, validar en crontab.guru). Por ejemplo, al ingresar 30 3 * * * se ejecutará el escaneo a las 3:30 am. Se ejecutará la PRÓXIMA vez que pase el tiempo. "
}]
},
{
@@ -191,6 +207,10 @@
"description":[{
"language_code":"en_us",
"string" : "Send a notification if selected values change. Use CTRL + Click to select/deselect.
Watched_Value1 is Info
Watched_Value2 is Record type
Watched_Value3 is Info
Watched_Value4 is N/A
"
+ },
+ {
+ "language_code":"es_es",
+ "string" : "Enviar una notificación si los valores seleccionados cambian. Utilice CTRL + Clic para seleccionar/deseleccionar.
Watched_Value1 es Información
Watched_Value2 es Tipo de registro
Watched_Value3 es La información
Watched_Value4 es N/A
"
}]
},
{
@@ -290,6 +310,10 @@
"name":[{
"language_code":"en_us",
"string" : "Type"
+ },
+ {
+ "language_code":"es_es",
+ "string" : "Tipo"
}]
} ,
{
From 3a2afa4bf43a9a76933d6e65a374d15cff1598b7 Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 21:15:55 +0200
Subject: [PATCH 10/18] Update config.json
Updated string "description" in Spanish
---
front/plugins/pholus_scan/config.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/front/plugins/pholus_scan/config.json b/front/plugins/pholus_scan/config.json
index 3df23280..18da195d 100755
--- a/front/plugins/pholus_scan/config.json
+++ b/front/plugins/pholus_scan/config.json
@@ -43,7 +43,7 @@
},
{
"language_code": "es_es",
- "string": "Este plugin sirve para ejecutar un escaneo Pholus (descubrimiento de nombres) en la red local."
+ "string": "Este plugin sirve para ejecutar un escaneo Pholus (descubrimiento de nombres) en la red local"
}
],
"params" : [
From d6cf983b934f642d560af21b9b41fc110c7d228d Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 22:01:56 +0200
Subject: [PATCH 11/18] Update deviceDetails.php
The Nmap and Tools section has been divided into "tab control".
Nmap tab is now only shown if it is a device that contains MAC address
---
front/deviceDetails.php | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/front/deviceDetails.php b/front/deviceDetails.php
index be7cd1c9..72dc5553 100755
--- a/front/deviceDetails.php
+++ b/front/deviceDetails.php
@@ -99,19 +99,22 @@
From dce40cb9fbea7e90c2caaf3918eff85f468fdeff Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Sat, 26 Aug 2023 22:17:12 +0200
Subject: [PATCH 12/18] Update deviceDetails.php
Split content into Nmap and Tools tab
Added icon in "Nmap" tab
Added icon in "Tools" tab
---
front/deviceDetails.php | 72 ++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 37 deletions(-)
diff --git a/front/deviceDetails.php b/front/deviceDetails.php
index 72dc5553..aa8dc174 100755
--- a/front/deviceDetails.php
+++ b/front/deviceDetails.php
@@ -535,38 +535,10 @@
-
-
-
+
-
-
-
= lang('DevDetail_Internet_Speedtest');?>
-
-
-
-
-
-
-
= lang('DevDetail_Nmap_Scans');?>
+
= lang('DevDetail_Nmap_Scans');?>
+
+
+
From e6644ad3ec5338d80753cf8d22c9687d46a26e23 Mon Sep 17 00:00:00 2001
From: Jokob-sk
Date: Sun, 27 Aug 2023 18:45:07 +1000
Subject: [PATCH 13/18] NMAP plugin conversion v0.1
---
docs/API.md | 3 +-
docs/DATABASE.md | 3 +-
front/network.php | 18 +-
front/php/templates/language/en_us.json | 12 -
front/php/templates/language/es_es.json | 11 -
front/plugins/README.md | 5 +-
front/plugins/arp_scan/config.json | 3 +-
front/plugins/arp_scan/script.py | 4 +-
front/plugins/nmap_scan/README.md | 11 +
.../{nmap_services => nmap_scan}/README_ES.md | 0
.../{nmap_services => nmap_scan}/config.json | 243 +++++++++------
front/plugins/nmap_scan/script.py | 280 ++++++++++++++++++
front/plugins/nmap_services/README.md | 11 -
front/plugins/plugin_helper.py | 30 +-
pialert/__main__.py | 29 +-
pialert/api.py | 6 +-
pialert/conf.py | 10 +-
pialert/const.py | 2 -
pialert/initialise.py | 23 +-
pialert/plugin.py | 152 ++++++----
pialert/plugin_utils.py | 12 +-
pialert/reporting.py | 32 +-
pialert/scanners/nmapscan.py | 211 -------------
23 files changed, 612 insertions(+), 499 deletions(-)
create mode 100755 front/plugins/nmap_scan/README.md
rename front/plugins/{nmap_services => nmap_scan}/README_ES.md (100%)
rename front/plugins/{nmap_services => nmap_scan}/config.json (66%)
create mode 100755 front/plugins/nmap_scan/script.py
delete mode 100755 front/plugins/nmap_services/README.md
delete mode 100755 pialert/scanners/nmapscan.py
diff --git a/docs/API.md b/docs/API.md
index 3b321f6d..3abf9396 100755
--- a/docs/API.md
+++ b/docs/API.md
@@ -20,8 +20,7 @@ You can access the following files:
| `notification_text.txt` | The plain text version of the last notification. |
| `notification_text.html` | The full HTML of the last email notification. |
| `notification_json_final.json` | The json version of the last notification (e.g. used for webhooks - [sample JSON](https://github.com/jokob-sk/Pi.Alert/blob/main/back/webhook_json_sample.json)). |
- | `table_devices.json` | The current (at the time of the last update as mentioned above on this page) state of all of the available Devices detected by the app. |
- | `table_nmap_scan.json` | The current state of the discovered ports by the regular NMAP scans. |
+ | `table_devices.json` | The current (at the time of the last update as mentioned above on this page) state of all of the available Devices detected by the app. |
| `table_pholus_scan.json` | The latest state of the [pholus](https://github.com/jokob-sk/Pi.Alert/tree/main/pholus) (A multicast DNS and DNS Service Discovery Security Assessment Tool) scan results. |
| `table_plugins_events.json` | The list of the unprocessed (pending) notification events (plugins_events DB table). |
| `table_plugins_history.json` | The list of notification events history. |
diff --git a/docs/DATABASE.md b/docs/DATABASE.md
index ce0e3600..6184cdb7 100755
--- a/docs/DATABASE.md
+++ b/docs/DATABASE.md
@@ -11,8 +11,7 @@
|----------------------|----------------------| ----------------------|
| CurrentScan | Result of the current scan | ![Screen1][screen1] |
| Devices | The main devices database that also contains the Network tree mappings. If `ScanCycle` is set to `0` device is not scanned. | ![Screen2][screen2] |
- | Events | Used to collect connection/disconnection events. | ![Screen4][screen4] |
- | Nmap_Scan | Contains results of the scheduled Nmap scan, that is also displayed in the Nmap tab on each device. | ![Screen5][screen5] |
+ | Events | Used to collect connection/disconnection events. | ![Screen4][screen4] |
| Online_History | Used to display the `Device presence over time` chart | ![Screen6][screen6] |
| Parameters | Used to pass values between the frontend and backend. | ![Screen7][screen7] |
| Pholus_Scan | Scan results of the Pholus python network penetration script. | ![Screen8][screen8] |
diff --git a/front/network.php b/front/network.php
index 7089acf4..7f065de0 100755
--- a/front/network.php
+++ b/front/network.php
@@ -659,16 +659,16 @@
highlightedCss = nodeData.data.mac == selectedNodeMac ? " highlightedNode" : "";
- return result = "