mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
@@ -1,6 +1,6 @@
|
||||
VERSION = '2.50'
|
||||
VERSION_YEAR = '2020'
|
||||
VERSION_DATE = '2020-12-30'
|
||||
VERSION = '2.51'
|
||||
VERSION_YEAR = '2021'
|
||||
VERSION_DATE = '2021-01-11'
|
||||
|
||||
DB_PATH = '/home/pi/pialert/db/pialert.db'
|
||||
LOG_PATH = '/home/pi/pialert/log'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Pi.Alert v2.50 / 2020-12-30
|
||||
# Pi.Alert v2.51 / 2021-01-11
|
||||
# Puche 2020
|
||||
# GNU GPLv3
|
||||
|
||||
@@ -486,10 +486,17 @@ def read_DHCP_leases ():
|
||||
return
|
||||
|
||||
# Read DHCP Leases
|
||||
with open(DHCP_LEASES) as f:
|
||||
reader = csv.reader(f, delimiter=' ')
|
||||
data = [(col1, col2, col3, col4, col5)
|
||||
for col1, col2, col3, col4, col5 in reader]
|
||||
# Bugfix #1 - dhcp.leases: lines with different number of columns (5 col)
|
||||
data = []
|
||||
with open(DHCP_LEASES, 'r') as f:
|
||||
for line in f:
|
||||
row = line.rstrip().split()
|
||||
if len(row) == 5 :
|
||||
data.append (row)
|
||||
# with open(DHCP_LEASES) as f:
|
||||
# reader = csv.reader(f, delimiter=' ')
|
||||
# data = [(col1, col2, col3, col4, col5)
|
||||
# for col1, col2, col3, col4, col5 in reader]
|
||||
|
||||
# Insert into PiAlert table
|
||||
sql.execute ("DELETE FROM DHCP_Leases")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 16px; text-align:center; color:#5F5000">
|
||||
<tr>
|
||||
<td width=33%> Report Date: <b>2021-01-02 08:20</b> </td>
|
||||
<td width=33%> Report Date: <b>2021-01-11 08:00</b> </td>
|
||||
<td width=34%> Scan Cycle: <b>Internet</b> </td>
|
||||
<td width=33%> Server: <b>pi4</b> </td>
|
||||
</tr>
|
||||
@@ -58,8 +58,8 @@
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#70AD47 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 12px; font-weight: bold; color:#385723">
|
||||
<tr>
|
||||
<td width=25% style="text-align:Left"> Puche 2020</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert 2.50 / 2020-12-30 </td>
|
||||
<td width=25% style="text-align:Left"> Puche 2021</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert 2.51 / 2021-01-11 </td>
|
||||
<td width=25% style="text-align:right"> GNU GPLv3</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#FFD966 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 16px; text-align:center; color:#5F5000">
|
||||
<tr>
|
||||
<td width=33%> Report Date: <b>2021-01-02 08:20</b> </td>
|
||||
<td width=33%> Report Date: <b>2021-01-11 08:00</b> </td>
|
||||
<td width=34%> Scan Cycle: <b>1</b> </td>
|
||||
<td width=33%> Server: <b>pi4</b> </td>
|
||||
</tr>
|
||||
@@ -121,8 +121,8 @@
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#70AD47 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 12px; font-weight: bold; color:#385723">
|
||||
<tr>
|
||||
<td width=25% style="text-align:Left"> Puche 2020</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert 2.50 / 2020-12-30 </td>
|
||||
<td width=25% style="text-align:Left"> Puche 2021</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert 2.51 / 2021-01-11 </td>
|
||||
<td width=25% style="text-align:right"> GNU GPLv3</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<!-- Main Footer -->
|
||||
<footer class="main-footer">
|
||||
<!-- Default to the left -->
|
||||
© 2020 Puche
|
||||
© 2021 Puche
|
||||
<!-- To the right -->
|
||||
<div class="pull-right no-hidden-xs">
|
||||
Pi.alert  2.50  <small>(2019-12-30)</small>
|
||||
Pi.alert  2.51  <small>(2021-01-11)</small>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -34,8 +34,8 @@
|
||||
<td>
|
||||
<table width=100% border=0 bgcolor=#70AD47 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 12px; font-weight: bold; color:#385723">
|
||||
<tr>
|
||||
<td width=25% style="text-align:Left"> Puche 2020</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert DEV 2.50 / 2020-12-30 </td>
|
||||
<td width=25% style="text-align:Left"> Puche 2021</td>
|
||||
<td width=50% style="text-align:center"> Pi.Alert DEV 2.51 / 2021-01-11 </td>
|
||||
<td width=25% style="text-align:right"> GNU GPLv3</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Pi.Alert Report
|
||||
========================================
|
||||
|
||||
Report Date: 2021-01-01 00:00
|
||||
Report Date: 2021-01-11 00:00
|
||||
Scan Cycle: 1
|
||||
Server: pi4
|
||||
|
||||
@@ -12,4 +12,4 @@ Events
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Puche 2020 Pi.Alert 2.50 / 2020-12-30 GNU GPLv3
|
||||
Puche 2021 Pi.Alert 2.51 / 2021-01-11 GNU GPLv3
|
||||
|
||||
Reference in New Issue
Block a user