diff --git a/bin/lib/objects/UsersAccount.py b/bin/lib/objects/UsersAccount.py index 5777bd17..73ae7525 100755 --- a/bin/lib/objects/UsersAccount.py +++ b/bin/lib/objects/UsersAccount.py @@ -49,9 +49,9 @@ def delete(self): def get_link(self, flask_context=False): if flask_context: - url = url_for('correlation.show_correlation', type=self.type, subtype=self.subtype, id=self.id) + url = url_for('chats_explorer.objects_user_account', type=self.type, subtype=self.subtype, id=self.id) else: - url = f'{baseurl}/correlation/show?type={self.type}&subtype={self.subtype}&id={self.id}' + url = f'{baseurl}/objects/user-account?&subtype={self.subtype}&id={self.id}' return url def get_svg_icon(self): # TODO change icon/color @@ -127,6 +127,13 @@ def get_usernames(self): def update_username_timeline(self, username_global_id, timestamp): self._get_timeline_username().add_timestamp(timestamp, username_global_id) + def get_messages(self): + messages = [] + for mess in self.get_correlation('message'): + messages.append(f'message:{mess}') + return messages + + def get_messages_by_chat_obj(self, chat_obj): messages = [] for mess in self.get_correlation_iter_obj(chat_obj, 'message'): diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index a5edf49e..1222755d 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -190,8 +190,11 @@ def show_correlation(): else: dict_object["subtype"] = '' dict_object["metadata_card"] = ail_objects.get_object_card_meta(obj_type, subtype, obj_id, related_btc=related_btc) + dict_object["metadata_card"]['tags_safe'] = True return render_template("show_correlation.html", dict_object=dict_object, bootstrap_label=bootstrap_label, - tags_selector_data=Tag.get_tags_selector_data()) + tags_selector_data=Tag.get_tags_selector_data(), + meta=dict_object["metadata_card"], + ail_tags=dict_object["metadata_card"]["add_tags_modal"]) @correlation.route('/correlation/get/description') @login_required diff --git a/var/www/templates/chats_explorer/basic_card_image.html b/var/www/templates/chats_explorer/basic_card_image.html new file mode 100644 index 00000000..307dbddb --- /dev/null +++ b/var/www/templates/chats_explorer/basic_card_image.html @@ -0,0 +1,57 @@ + + +
+
+

+ + + + {{ meta["icon"]["icon"] }} + + + {{ meta["id"] }} : +

+
+
+
+ {% if meta["tags_safe"] %} + + {% else %} + + + + + {% endif %} +
+ +
+ + + + + + {{meta["first_seen"]}} + + + + + {{meta["last_seen"]}} + + + + +
+ +
+ {% for tag in meta['tags'] %} + {{ tag }} + {% endfor %} +
+ +
+ {% include 'objects/block_object_footer_small.html' %} +
\ No newline at end of file diff --git a/var/www/templates/chats_explorer/card_image.html b/var/www/templates/chats_explorer/card_image.html new file mode 100644 index 00000000..058e3c0d --- /dev/null +++ b/var/www/templates/chats_explorer/card_image.html @@ -0,0 +1,104 @@ + + + +{% with modal_add_tags=ail_tags %} + {% include 'modals/add_tags.html' %} +{% endwith %} + +{% include 'modals/edit_tag.html' %} + + + +
+
+

{{ meta["id"] }} :

+ + + {% with obj_type='image', obj_id=meta['id'], obj_subtype='' %} + {% include 'modals/investigations_register_obj.html' %} + {% endwith %} + + +
+
\ No newline at end of file diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index a3fae335..a4286471 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -121,6 +121,8 @@ {% include 'correlation/metadata_card_etag.html' %} {% elif dict_object["object_type"] == "hhhash" %} {% include 'correlation/metadata_card_hhhash.html' %} + {% elif dict_object["object_type"] == "image" %} + {% include 'chats_explorer/card_image.html' %} {% elif dict_object["object_type"] == "item" %} {% include 'correlation/metadata_card_item.html' %} {% elif dict_object["object_type"] == "favicon" %} diff --git a/var/www/templates/domains/card_img_domain.html b/var/www/templates/domains/card_img_domain.html index 66447a72..b9eecfd3 100644 --- a/var/www/templates/domains/card_img_domain.html +++ b/var/www/templates/domains/card_img_domain.html @@ -55,7 +55,7 @@
- {{dict_domain["first_seen"]}} + {{dict_domain["last_seen"]}} diff --git a/var/www/templates/objects/block_object_footer_small.html b/var/www/templates/objects/block_object_footer_small.html new file mode 100644 index 00000000..670c38ca --- /dev/null +++ b/var/www/templates/objects/block_object_footer_small.html @@ -0,0 +1,12 @@ +
+{#
#} +{# #} +{# #} +{# #} +{#
#} +
+ + + +
+