mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
updated contact info
This commit is contained in:
@@ -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
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -871,28 +871,44 @@ def scan_network ():
|
||||
# file_print("---------------------------------------------")
|
||||
|
||||
# client = SSDPClient()
|
||||
# devices = client.m_search("ssdp:all")
|
||||
# for device in devices:
|
||||
# file_print(device.get("usn"))
|
||||
|
||||
# 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,11 +931,13 @@ def scan_network ():
|
||||
# file_print('aspr-scan result:', len(arpscan_devices))
|
||||
|
||||
# Pi-hole method
|
||||
if PIHOLE_ACTIVE :
|
||||
file_print(' Pi-hole start')
|
||||
openDB()
|
||||
reporting = copy_pihole_network() or reporting
|
||||
|
||||
# DHCP Leases method
|
||||
if DHCP_ACTIVE :
|
||||
file_print(' DHCP Leases start')
|
||||
reporting = read_DHCP_leases () or reporting
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 @@
|
||||
|
||||
<!-- © 2020 Puche -->
|
||||
<?php
|
||||
echo '<span style="display:inline-block; transform: rotate(180deg)">©</span> 2020 Puche (2022+ jokob-sk)';
|
||||
echo '<span style="display:inline-block; transform: rotate(180deg)">©</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">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 -->
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user