🐛 ARPSCAN & INTNT scans could not be disabled #726

This commit is contained in:
jokob-sk
2024-07-05 20:32:54 +10:00
parent 482902f6e4
commit 5afc82f33e
8 changed files with 29 additions and 6 deletions

View File

@@ -25,6 +25,9 @@ DAYS_TO_KEEP_EVENTS=90
# Used for generating links in emails. Make sure not to add a trailing slash!
REPORT_DASHBOARD_URL='http://netalertx'
# Make sure at least these 2 scanners are enabled for new installs, other defaults are taken from the config.json
INTRNT_RUN='schedule'
ARPSCAN_RUN='schedule'
# Email
#-------------------------------------

View File

@@ -70,7 +70,7 @@
{
"function": "RUN",
"type": "text.select",
"default_value": "schedule",
"default_value": "disabled",
"options": [
"disabled",
"once",

View File

@@ -64,7 +64,7 @@
"function": "RUN",
"events": ["run"],
"type": "text.select",
"default_value": "schedule",
"default_value": "disabled",
"options": ["disabled", "once", "schedule", "always_after_scan"],
"localized": ["name", "description"],
"name": [

View File

@@ -627,6 +627,25 @@
"string": "Check to start using the new code for cleaning device names. Removes all labels starting with underscore and removes network domain and search list."
}
]
},
{
"function": "NAME_CLEANUP_REGEX",
"type": "list",
"default_value": ["XC5fYWlycGxheQ==", "XC5fdGNw", "XC5sb2NhbGRvbWFpbg==", "XC5sb2NhbA==", "XC5fZXNwaG9tZWxpYg==", "XC5fZ29vZ2xlY2FzdA==", "XC5sYW4=", "XC5ob21l", "LVthLWZBLUYwLTldezMyfQ==", "Iy4q" ],
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Cleanup REGEX"
}
],
"description": [
{
"language_code": "en_us",
"string": "All the newly discovered device names are clened up by applying the following REGEX expression in this order."
}
]
}
],
"required": [

View File

@@ -54,7 +54,7 @@ jokob@SecurityGateway-USG:~$ snmptranslate -On -IR ipNetToMediaPhysAddress
.1.3.6.1.2.1.4.22.1.2
```
- Use the `snmpwalk -v 2c -OXsq -c public 192.168.1.1 .1.3.6.1.2.1.4.22.1.2` command in NetAlertX
- Use the `snmpwalk -v 2c -OXsq -c public 192.168.1.1 .1.3.6.1.2.1.4.22.1.2` command in NetAlertX

View File

@@ -202,7 +202,7 @@
},
{
"function": "plugins",
"type": "text.multiselect",
"type": "list.select",
"maxLength": 50,
"default_value": [],
"options": ["{value}"],

View File

@@ -332,7 +332,8 @@ def setting_value_to_python_type(set_type, set_value):
elif set_type in ['integer.select', 'integer']:
value = int(set_value)
elif set_type in ['text.multiselect', 'list', 'subnets', 'list.select']:
# belwo covers 'text.multiselect', 'list', 'subnets', 'list.select', 'textarea.list', 'list'
elif set_type in ['text.multiselect', 'list', 'subnets', 'list.select', 'textarea.list'] or 'list' in set_type:
# Handle string
mylog('debug', [f'[SETTINGS] Handling set_type: "{set_type}", set_value: "{set_value}"'])

View File

@@ -131,7 +131,7 @@ def importConfigs (db, all_plugins):
# ----------------------------------------
# ccd(key, default, config_dir, name, inputtype, options, group, events=[], desc = "", regex = "", setJsonMetadata = {}, overrideTemplate = {})
conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', [] , c_d, 'Loaded plugins', 'text.multiselect', '', 'General')
conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', [] , c_d, 'Loaded plugins', 'list.select', '', 'General')
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', '', 'General')
conf.LOG_LEVEL = ccd('LOG_LEVEL', 'verbose' , c_d, 'Log verboseness', 'text.select', "['none', 'minimal', 'verbose', 'debug']", 'General')
conf.TIMEZONE = ccd('TIMEZONE', 'Europe/Berlin' , c_d, 'Time zone', 'text', '', 'General')