mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
Debug and attempt for #261
This commit is contained in:
@@ -17,6 +17,12 @@ def save_scanned_devices (db, p_arpscan_devices, p_cycle_interval):
|
||||
sql = db.sql #TO-DO
|
||||
cycle = 1 # always 1, only one cycle supported
|
||||
|
||||
mylog('debug', ['[ARP Scan] Detected devices:', len(p_arpscan_devices)])
|
||||
|
||||
p_arpscan_devices = conf.arpscan_devices
|
||||
|
||||
mylog('debug', ['[ARP Scan] Detected devices in conf:', len(p_arpscan_devices)])
|
||||
|
||||
# Delete previous scan data
|
||||
sql.execute ("DELETE FROM CurrentScan WHERE cur_ScanCycle = ?",
|
||||
(cycle,))
|
||||
|
||||
@@ -77,6 +77,8 @@ def process_scan (db, arpscan_devices):
|
||||
# Load current scan data
|
||||
mylog('verbose','[Process Scan] Processing scan results')
|
||||
save_scanned_devices (db, arpscan_devices, cycle_interval)
|
||||
|
||||
db.commitDB()
|
||||
|
||||
# Print stats
|
||||
mylog('none','[Process Scan] Print Stats')
|
||||
|
||||
Reference in New Issue
Block a user