From 6f5fd11a26c7e7f20254d9190db03bd4fb88a571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Fri, 11 Jun 2021 17:15:12 +0200 Subject: [PATCH] Modifying iocs search to show the source --- app/backend/src/assets/custom.css | 1 - app/backend/src/views/iocs-search.vue | 27 ++++++++++++++++++++------- server/backend/app/classes/iocs.py | 3 ++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/app/backend/src/assets/custom.css b/app/backend/src/assets/custom.css index 51a7661..17db9f8 100644 --- a/app/backend/src/assets/custom.css +++ b/app/backend/src/assets/custom.css @@ -762,7 +762,6 @@ h4, h5 { content:attr(data-tooltip); display:block; font-size: 11px; - text-transform: capitalize; left:50%; max-width:320px; opacity:0; diff --git a/app/backend/src/views/iocs-search.vue b/app/backend/src/views/iocs-search.vue index 1390e99..dc633df 100644 --- a/app/backend/src/views/iocs-search.vue +++ b/app/backend/src/views/iocs-search.vue @@ -13,27 +13,37 @@ Indicator - Type Tag TLP - + Source + Action {{ r.value }} - {{ r.type }} {{ r.tag }} + {{ r.source }}
-
-

IOCs not found.

-

Try wildcard search to expend your search.

+
+
+

+ +

+

Finding your IOC(s)...

+
+
+
+
+

IOCs not found.

+

Try wildcard search to expend your search.

+
@@ -49,7 +59,8 @@ export default { return { results: [], first_search: true, - jwt:"" + jwt:"", + loading:false } }, props: { }, @@ -57,6 +68,7 @@ export default { search_iocs: function() { this.results = [] this.first_search = false + this.loading = true; this.iocs.match(/[^\r\n]+/g).forEach(ioc => { ioc = ioc.trim() if("alert " != ioc.slice(0,6)) { @@ -72,6 +84,7 @@ export default { if(response.data.results.length>0){ this.results = [].concat(this.results, response.data.results); } + this.loading = false; }) .catch(err => (console.log(err))) }); diff --git a/server/backend/app/classes/iocs.py b/server/backend/app/classes/iocs.py index c2126d4..41c03c6 100644 --- a/server/backend/app/classes/iocs.py +++ b/server/backend/app/classes/iocs.py @@ -116,7 +116,8 @@ class IOCs(object): "type": ioc["type"], "tag": ioc["tag"], "tlp": ioc["tlp"], - "value": ioc["value"]} + "value": ioc["value"], + "source": ioc["source"]} @staticmethod def get_types():