updated contact info

This commit is contained in:
Jokob-sk
2022-12-27 22:29:47 +11:00
parent 6d58e5b675
commit b35489ee63
16 changed files with 56 additions and 55 deletions

View File

@@ -6,7 +6,7 @@
#
# pialert.py - Back module. Network scanner
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#-------------------------------------------------------------------------------
@@ -870,29 +870,45 @@ def scan_network ():
# file_print("---------------------------------------------")
# client = SSDPClient()
# devices = client.m_search("ssdp:all")
# for device in devices:
# file_print(device.get("usn"))
# client = SSDPClient()
# file_print("---------------------------------------------")
# devices = client.m_search("ssdp:all")
# for device in devices:
# print(device.get("usn"))
# print("000000000000000000000000000000000000000000000000000000000000\n")
# print(device)
# print("---------------------------------------------")
# devices = upnpclient.discover()
# file_print("---------------------------------------------")
# print("---------------------------------------------")
# for device in devices:
# file_print(device)
# print(device)
# file_print("---------------------------------------------")
# print("---------------------------------------------")
# sockAddr = ("192.168.1.14", 443);
# sockInfo = socket.getnameinfo(sockAddr, socket.NI_NAMEREQD);
# # find an example using NI_MAXHOST
# print(sockInfo);
# nmap > vendor > espressifg > ESP32 type
# UDP ports
# nmap -sU 192.168.1.14
# # devtest end
# Header
updateState("Scan: Network")
file_print('[', startTime, '] Scan Devices:' )
file_print(' ScanCycle:', cycle)
# # Query ScanCycle properties
print_log ('Query ScanCycle confinguration')
@@ -915,13 +931,15 @@ def scan_network ():
# file_print('aspr-scan result:', len(arpscan_devices))
# Pi-hole method
file_print(' Pi-hole start')
openDB()
reporting = copy_pihole_network() or reporting
if PIHOLE_ACTIVE :
file_print(' Pi-hole start')
openDB()
reporting = copy_pihole_network() or reporting
# DHCP Leases method
file_print(' DHCP Leases start')
reporting = read_DHCP_leases () or reporting
if DHCP_ACTIVE :
file_print(' DHCP Leases start')
reporting = read_DHCP_leases () or reporting
# Load current scan data
file_print(' Processing scan results')
@@ -999,15 +1017,12 @@ def execute_arpscan ():
# multiple interfaces
if type(SCAN_SUBNETS) is list:
file_print(" arp-scan: Multiple interfaces")
for interface in SCAN_SUBNETS :
arpscan_output += execute_arpscan_on_interface (interface)
# one interface only
else:
file_print(" arp-scan: One interface")
arpscan_output += execute_arpscan_on_interface (SCAN_SUBNETS)
# Search IP + MAC + Vendor as regular expresion
re_ip = r'(?P<ip>((2[0-5]|1[0-9]|[0-9])?[0-9]\.){3}((2[0-5]|1[0-9]|[0-9])?[0-9]))'
re_mac = r'(?P<mac>([0-9a-fA-F]{2}[:-]){5}([0-9a-fA-F]{2}))'
@@ -1018,7 +1033,6 @@ def execute_arpscan ():
devices_list = [device.groupdict()
for device in re.finditer (re_pattern, arpscan_output)]
# Delete duplicate MAC
unique_mac = []
unique_devices = []
@@ -1028,7 +1042,6 @@ def execute_arpscan ():
unique_mac.append(device['mac'])
unique_devices.append(device)
# DEBUG
# file_print(devices_list)
# file_print(unique_mac)
@@ -1061,9 +1074,6 @@ def execute_arpscan_on_interface (SCAN_SUBNETS):
#-------------------------------------------------------------------------------
def copy_pihole_network ():
# check if Pi-hole is active
if not PIHOLE_ACTIVE :
return
# Open Pi-hole DB
sql.execute ("ATTACH DATABASE '"+ piholeDB +"' AS PH")
@@ -1091,10 +1101,6 @@ def copy_pihole_network ():
def read_DHCP_leases ():
reporting = False
# check DHCP Leases is active
if not DHCP_ACTIVE :
return False
# Read DHCP Leases
# Bugfix #1 - dhcp.leases: lines with different number of columns (5 col)
data = []

View File

@@ -5,7 +5,7 @@
#
# update_vendors.sh - Back module. IEEE Vendors db update
# ------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
# ------------------------------------------------------------------------------
# ----------------------------------------------------------------------

View File

@@ -4,7 +4,7 @@
#
# pialert.css - Front module. CSS styles
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
----------------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------

View File

@@ -4,7 +4,7 @@
#
# deviceDetails.php - Front module. Device management page
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#--------------------------------------------------------------------------- -->
<?php
@@ -1558,9 +1558,4 @@ function setTextValue (textElement, textValue) {
activateSaveRestoreData ();
}
function addNewDrpItem(textElement)
{
showModalDefault("Add new item","Enter new item: <input><input>","Cancel","OK", "alert");
}
</script>

View File

@@ -4,7 +4,7 @@
#
# devices.php - Front module. Devices list page
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#--------------------------------------------------------------------------- -->
<?php

View File

@@ -4,7 +4,7 @@
#
# events.php - Front module. Events page
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#--------------------------------------------------------------------------- -->
<?php

View File

@@ -4,7 +4,7 @@
*
* pialert_common.js - Front module. Common Javascript functions
*-------------------------------------------------------------------------------
* Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
----------------------------------------------------------------------------- */
// -----------------------------------------------------------------------------

View File

@@ -5,7 +5,7 @@
//
// db.php - Front module. Server side. DB common file
//------------------------------------------------------------------------------
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------
// ## TimeZone processing

View File

@@ -5,7 +5,7 @@
//
// devices.php - Front module. Server side. Manage Devices
//------------------------------------------------------------------------------
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------
// External files

View File

@@ -5,7 +5,7 @@
//
// events.php - Front module. Server side. Manage Events
//------------------------------------------------------------------------------
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// External files

View File

@@ -5,7 +5,7 @@
//
// parameters.php - Front module. Server side. Manage Parameters
//------------------------------------------------------------------------------
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------

View File

@@ -5,7 +5,7 @@
//
// util.php - Front module. Server side. Common generic functions
//------------------------------------------------------------------------------
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------
require '/home/pi/pialert/front/php/templates/timezone.php';

View File

@@ -4,7 +4,7 @@
#
# footer.php - Front module. Common footer to all the web pages
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#--------------------------------------------------------------------------- -->
<!-- Main Footer -->
@@ -13,7 +13,7 @@
<!-- &copy; 2020 Puche -->
<?php
echo '<span style="display:inline-block; transform: rotate(180deg)">&copy;</span> 2020 Puche (2022+ jokob-sk)';
echo '<span style="display:inline-block; transform: rotate(180deg)">&copy;</span> 2020 Puche (2022+ <a href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>)';
?>
<!-- To the right -->
<div class="pull-right no-hidden-xs">

View File

@@ -4,7 +4,7 @@
#
# header.php - Front module. Common header to all the web pages
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#--------------------------------------------------------------------------- -->
<?php

View File

@@ -4,7 +4,7 @@
#
# notificacion.php - Front module. Common notification & modal window
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#--------------------------------------------------------------------------- -->
<!-- Modal Ok -->

View File

@@ -4,7 +4,7 @@
#
# presence.php - Front module. Device Presence calendar page
#-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
#--------------------------------------------------------------------------- -->
<?php