mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Settings cleanup, docs and strings, Removal of ENABLE_ARPSCAN
This commit is contained in:
@@ -39,7 +39,6 @@ changedPorts_json_struc = None
|
||||
# ACTUAL CONFIGRATION ITEMS set to defaults
|
||||
|
||||
# General
|
||||
ENABLE_ARPSCAN = True
|
||||
SCAN_SUBNETS = ['192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0']
|
||||
LOG_LEVEL = 'verbose'
|
||||
TIMEZONE = 'Europe/Berlin'
|
||||
|
||||
@@ -96,8 +96,7 @@ def importConfigs (db):
|
||||
conf.HRS_TO_KEEP_NEWDEV = ccd('HRS_TO_KEEP_NEWDEV', 0 , c_d, 'Keep new devices for', 'integer', "0", 'General')
|
||||
conf.API_CUSTOM_SQL = ccd('API_CUSTOM_SQL', 'SELECT * FROM Devices WHERE dev_PresentLastScan = 0' , c_d, 'Custom endpoint', 'text', '', 'General')
|
||||
|
||||
# ARPSCAN (+ other settings provided by the ARPSCAN plugin)
|
||||
conf.ENABLE_ARPSCAN = ccd('ENABLE_ARPSCAN', True , c_d, 'Enable arpscan', 'boolean', '', 'ARPSCAN', ['run'])
|
||||
# ARPSCAN (+ other settings provided by the ARPSCAN plugin)
|
||||
conf.SCAN_SUBNETS = ccd('SCAN_SUBNETS', ['192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0'] , c_d, 'Subnets to scan', 'subnets', '', 'ARPSCAN')
|
||||
|
||||
# Email
|
||||
|
||||
@@ -25,6 +25,7 @@ import const
|
||||
from const import pialertPath, logPath, apiPath
|
||||
from helper import noti_struc, generate_mac_links, removeDuplicateNewLines, timeNowTZ, hide_email, updateState, get_file_content, write_file
|
||||
from logger import logResult, mylog, print_log
|
||||
from plugin import execute_plugin
|
||||
|
||||
from publishers.email import (check_config as email_check_config,
|
||||
send as send_email )
|
||||
@@ -512,12 +513,11 @@ def check_and_run_event(db):
|
||||
def handle_run(runType, db):
|
||||
|
||||
mylog('minimal', ['[', timeNowTZ(), '] START Run: ', runType])
|
||||
|
||||
if runType == 'ENABLE_ARPSCAN':
|
||||
# run the plugin to run
|
||||
for plugin in conf.plugins:
|
||||
if plugin["unique_prefix"] == 'ARPSCAN':
|
||||
execute_plugin(db, plugin)
|
||||
|
||||
# run the plugin to run
|
||||
for plugin in conf.plugins:
|
||||
if plugin["unique_prefix"] == runType:
|
||||
execute_plugin(db, plugin)
|
||||
|
||||
mylog('minimal', ['[', timeNowTZ(), '] END Run: ', runType])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user