Skip to content

Commit

Permalink
🐛 ARPSCAN & INTNT scans could not be disabled #726
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Jul 5, 2024
1 parent 482902f commit 5afc82f
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 6 deletions.
3 changes: 3 additions & 0 deletions back/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
#-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/plugins/arp_scan/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
{
"function": "RUN",
"type": "text.select",
"default_value": "schedule",
"default_value": "disabled",
"options": [
"disabled",
"once",
Expand Down
2 changes: 1 addition & 1 deletion front/plugins/internet_ip/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
19 changes: 19 additions & 0 deletions front/plugins/newdev_template/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion front/plugins/snmp_discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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



2 changes: 1 addition & 1 deletion front/plugins/sync/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
},
{
"function": "plugins",
"type": "text.multiselect",
"type": "list.select",
"maxLength": 50,
"default_value": [],
"options": ["{value}"],
Expand Down
3 changes: 2 additions & 1 deletion server/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"'])
Expand Down
2 changes: 1 addition & 1 deletion server/initialise.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 5afc82f

Please sign in to comment.