diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..2be238e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +config/pialert.conf_ +db/ diff --git a/README.md b/README.md index 58ae4f7d..6eb21842 100644 --- a/README.md +++ b/README.md @@ -100,8 +100,6 @@ With the work of [jokob-sk/Pi.Alert](https://github.com/jokob-sk/Pi.Alert) and o ![Maintain screen dark][maintain_dark] -In addition, the network page was created from this collaboration. Here you can map your network in a rudimentary way by assigning the devices to specific nodes (switches, routers). - # Installation Initially designed to run on a Raspberry Pi, probably it can run on many other @@ -202,5 +200,6 @@ Instructions for [leiweibau's fork](https://github.com/leiweibau/Pi.Alert/) [screen6]: ./docs/img/2_5_device_nmap_ready.jpg "Screen 6" [report1]: ./docs/img/4_report_1.jpg "Report sample 1" [report2]: ./docs/img/4_report_2.jpg "Report sample 2" +[main_dark]: /docs/img/1_devices_dark.jpg "Main screen dark" [maintain_dark]: /docs/img/5_maintain.jpg "Maintain screen dark" diff --git a/config/pialert.conf b/config/pialert.conf index 9c1f5b70..404aca20 100644 --- a/config/pialert.conf +++ b/config/pialert.conf @@ -7,59 +7,57 @@ # Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #------------------------------------------------------------------------------- -# General Settings -# ---------------------- -PIALERT_PATH = '/home/pi/pialert' -DB_PATH = PIALERT_PATH + '/db/pialert.db' -LOG_PATH = PIALERT_PATH + '/log' -VENDORS_DB = '/usr/share/arp-scan/ieee-oui.txt' -PRINT_LOG = False -PIALERT_WEB_PROTECTION = False -PIALERT_WEB_PASSWORD = '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92' +PIALERT_PATH = '/home/pi/pialert' +DB_PATH = PIALERT_PATH + '/db/pialert.db' +LOG_PATH = PIALERT_PATH + '/log' +VENDORS_DB = '/usr/share/arp-scan/ieee-oui.txt' +PRINT_LOG = False +TIMEZONE = 'Europe/Berlin' +PIALERT_WEB_PROTECTION = False +PIALERT_WEB_PASSWORD = '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92' -# Mail-Account Settings +# EMAIL settings # ---------------------- -SMTP_SERVER = 'smtp.gmail.com' -SMTP_PORT = 587 -SMTP_USER = 'user@gmail.com' -SMTP_PASS = 'password' -SMTP_SKIP_TLS = False -SMTP_SKIP_LOGIN = False +SMTP_SERVER = 'smtp.gmail.com' +SMTP_PORT = 587 +SMTP_USER = 'user@gmail.com' +SMTP_PASS = 'password' +SMTP_SKIP_TLS = False +SMTP_SKIP_LOGIN = False -# Mail Reporting -# ---------------------- -REPORT_MAIL = False -REPORT_FROM = 'Pi.Alert <' + SMTP_USER +'>' -REPORT_TO = 'user@gmail.com' -REPORT_DEVICE_URL = 'http://pi.alert/deviceDetails.php?mac=' -REPORT_DASHBOARD_URL = 'http://pi.alert/' +REPORT_MAIL = False +REPORT_FROM = 'Pi.Alert <' + SMTP_USER +'>' +REPORT_TO = 'user@gmail.com' +REPORT_DEVICE_URL = 'http://pi.alert/deviceDetails.php?mac=' +REPORT_DASHBOARD_URL = 'http://pi.alert/' -# Pushsafer +# NTFY (https://ntfy.sh/) settings # ---------------------- -REPORT_PUSHSAFER = False -PUSHSAFER_TOKEN = 'ApiKey' +REPORT_NTFY = False +NTFY_TOPIC = 'replace_my_secure_topicname_91h889f28' +REPORT_DASHBOARD_URL = 'http://pi.alert/' -# ntfy +# PUSHSAFER (https://www.pushsafer.com/) settings # ---------------------- -REPORT_NTFY = False -NTFY_TOPIC = 'replace_my_secure_topicname_91h889f28' +REPORT_PUSHSAFER = False +PUSHSAFER_TOKEN = 'ApiKey' # DynDNS # ---------------------- -# 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?' +# 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?' -# Pi-hole Configuration +# PIHOLE settings # ---------------------- -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' # arp-scan options & samples # @@ -71,8 +69,9 @@ DHCP_LEASES = '/etc/pihole/dhcp.leases' # # Scan using interface eth0 # SCAN_SUBNETS = '--localnet --interface=eth0' + SCAN_SUBNETS = '--localnet' # Maintenance Tasks Cron # ---------------------- -DAYS_TO_KEEP_EVENTS = 90 +DAYS_TO_KEEP_EVENTS = 90 \ No newline at end of file diff --git a/front/index.php b/front/index.php index 464f30e2..80f7dd3a 100644 --- a/front/index.php +++ b/front/index.php @@ -181,6 +181,7 @@ if ($ENABLED_DARKMODE === True) {
+


./reset_password.sh

diff --git a/front/php/server/devices.php b/front/php/server/devices.php index 89ad77e4..6c7fb92b 100644 --- a/front/php/server/devices.php +++ b/front/php/server/devices.php @@ -912,35 +912,6 @@ function getLocations() { } -//------------------------------------------------------------------------------ -// Query Device Data -//------------------------------------------------------------------------------ -function getNetworkNodes() { - global $db; - - // Device Data - $sql = 'SELECT * FROM network_infrastructure'; - - $result = $db->query($sql); - - // arrays of rows - $tableData = array(); - while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { - // Push row data - $tableData[] = array('id' => $row['device_id'], - 'name' => $row['net_device_name'].'/'.$row['net_device_typ'] ); - } - - // Control no rows - if (empty($tableData)) { - $tableData = []; - } - - // Return json - echo (json_encode ($tableData)); -} - - //------------------------------------------------------------------------------ // Status Where conditions //------------------------------------------------------------------------------ diff --git a/front/php/templates/header.php b/front/php/templates/header.php index 113764d9..d224aff5 100644 --- a/front/php/templates/header.php +++ b/front/php/templates/header.php @@ -8,6 +8,20 @@ #--------------------------------------------------------------------------- -->