mirror of https://github.com/CIRCL/AIL-framework
fix: [Tracker] edit tracker filters
parent
ccf490a3f2
commit
64252ddf75
|
@ -207,6 +207,13 @@ class Tracker:
|
|||
if filters:
|
||||
self._set_field('filters', json.dumps(filters))
|
||||
|
||||
def del_filters(self, tracker_type, to_track):
|
||||
filters = self.get_filters()
|
||||
for obj_type in filters:
|
||||
r_tracker.srem(f'trackers:objs:{tracker_type}:{obj_type}', to_track)
|
||||
r_tracker.srem(f'trackers:uuid:{tracker_type}:{to_track}', f'{self.uuid}:{obj_type}')
|
||||
r_tracker.hdel(f'tracker:{self.uuid}', 'filters')
|
||||
|
||||
def get_tracked(self):
|
||||
return self._get_field('tracked')
|
||||
|
||||
|
@ -513,6 +520,7 @@ class Tracker:
|
|||
self._set_mails(mails)
|
||||
|
||||
# Filters
|
||||
self.del_filters(old_type, old_to_track)
|
||||
if not filters:
|
||||
filters = {}
|
||||
for obj_type in get_objects_tracked():
|
||||
|
|
|
@ -45,9 +45,9 @@ sender = sender@example.com
|
|||
sender_host = smtp.example.com
|
||||
sender_port = 1337
|
||||
sender_pw = None
|
||||
# Only needed for SSL if the mail server don't support TLS (used by default). use this option to validate the server certificate.
|
||||
# Only needed for SMTP over SSL if the mail server don't support TLS (used by default). use this option to validate the server certificate.
|
||||
cert_required = False
|
||||
# Only needed for the SSL if you want to validate your self signed certificate for SSL
|
||||
# Only needed for SMTP over SSL if you want to validate your self signed certificate for SSL
|
||||
ca_file =
|
||||
# Only needed when the credentials for email server needs a username instead of an email address
|
||||
#sender_user = sender
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
{# </div>#}
|
||||
<div class="custom-control custom-switch mt-1">
|
||||
<input class="custom-control-input" type="checkbox" name="decoded_obj" id="decoded_obj" checked="">
|
||||
<label class="custom-control-label" for="decoded_obj"><i class="fas fa-lock-open"></i> Decoded</label>
|
||||
<label class="custom-control-label" for="decoded_obj"><i class="fas fa-lock-open"></i> Decoded <i class="fas fa-info-circle text-info" data-toggle="tooltip" data-placement="right" title="Content that has been decoded from an encoded format, such as base64"></i></label>
|
||||
</div>
|
||||
{# <div class="custom-control custom-switch mt-1">#}
|
||||
{# <input class="custom-control-input" type="checkbox" name="domain_obj" id="domain_obj" checked="">#}
|
||||
|
@ -84,7 +84,7 @@
|
|||
{# </div>#}
|
||||
<div class="custom-control custom-switch mt-1">
|
||||
<input class="custom-control-input" type="checkbox" name="item_obj" id="item_obj" checked="">
|
||||
<label class="custom-control-label" for="item_obj"><i class="fas fa-file"></i> Item</label>
|
||||
<label class="custom-control-label" for="item_obj"><i class="fas fa-file"></i> Item <i class="fas fa-info-circle text-info" data-toggle="tooltip" data-placement="right" title="Text that has been processed by AIL. It can include various types of extracted information"></i></label>
|
||||
</div>
|
||||
<div class="card border-dark mb-4" id="sources_item_div">
|
||||
<div class="card-body">
|
||||
|
@ -101,7 +101,7 @@
|
|||
|
||||
<div class="custom-control custom-switch mt-1">
|
||||
<input class="custom-control-input" type="checkbox" name="pgp_obj" id="pgp_obj" checked="">
|
||||
<label class="custom-control-label" for="pgp_obj"><i class="fas fa-key"></i> PGP</label>
|
||||
<label class="custom-control-label" for="pgp_obj"><i class="fas fa-key"></i> PGP <i class="fas fa-info-circle text-info" data-toggle="tooltip" data-placement="right" title="PGP key/block metadata"></i></label>
|
||||
</div>
|
||||
<div class="card border-dark mb-4" id="sources_pgp_div">
|
||||
<div class="card-body">
|
||||
|
@ -351,6 +351,10 @@ $(document).ready(function(){
|
|||
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
function toggle_sidebar(){
|
||||
if($('#nav_menu').is(':visible')){
|
||||
$('#nav_menu').hide();
|
||||
|
|
Loading…
Reference in New Issue