From b552e15a8b6f4e7dc05c3c93d85c146ed6decb39 Mon Sep 17 00:00:00 2001 From: terrtia Date: Thu, 18 Apr 2024 15:31:34 +0200 Subject: [PATCH] fix: [correlation] fix objects selector --- var/www/blueprints/correlation.py | 59 +------------ .../correlation/show_correlation.html | 84 ++++++++++--------- 2 files changed, 50 insertions(+), 93 deletions(-) diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index e23fbda4..983c3f66 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -87,61 +87,10 @@ def show_correlation(): ## get all selected correlations filter_types = [] - correl_option = request.form.get('CookieNameCheck') - if correl_option: - filter_types.append('cookie-name') - correl_option = request.form.get('EtagCheck') - if correl_option: - filter_types.append('etag') - correl_option = request.form.get('FaviconCheck') - if correl_option: - filter_types.append('favicon') - correl_option = request.form.get('CveCheck') - if correl_option: - filter_types.append('cve') - correl_option = request.form.get('CryptocurrencyCheck') - if correl_option: - filter_types.append('cryptocurrency') - correl_option = request.form.get('HHHashCheck') - if correl_option: - filter_types.append('hhhash') - correl_option = request.form.get('PgpCheck') - if correl_option: - filter_types.append('pgp') - correl_option = request.form.get('UsernameCheck') - if correl_option: - filter_types.append('username') - correl_option = request.form.get('DecodedCheck') - if correl_option: - filter_types.append('decoded') - correl_option = request.form.get('ScreenshotCheck') - if correl_option: - filter_types.append('screenshot') - # correlation_objects - correl_option = request.form.get('DomainCheck') - if correl_option: - filter_types.append('domain') - correl_option = request.form.get('ItemCheck') - if correl_option: - filter_types.append('item') - correl_option = request.form.get('chatCheck') - if correl_option: - filter_types.append('chat') - correl_option = request.form.get('subchannelCheck') - if correl_option: - filter_types.append('chat-subchannel') - correl_option = request.form.get('threadCheck') - if correl_option: - filter_types.append('chat-thread') - correl_option = request.form.get('messageCheck') - if correl_option: - filter_types.append('message') - correl_option = request.form.get('imageCheck') - if correl_option: - filter_types.append('image') - correl_option = request.form.get('user_accountCheck') - if correl_option: - filter_types.append('user-account') + for ob_type in ail_objects.get_all_objects(): + correl_option = request.form.get(f'{ob_type}_Check') + if correl_option: + filter_types.append(ob_type) # list as params filter_types = ",".join(filter_types) diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index cdd0bc64..4ca4c272 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -240,84 +240,92 @@
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +

- - + +
- - + +
- - + +
- - + +
- - + +
+
+ + +
+{#
#} +{# #} +{# #} +{#
#}
- - + +
- - + +