From 7dbc96cee20e787b6e6820f1073fa27af6075b71 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Wed, 18 Dec 2019 16:17:29 +0100 Subject: [PATCH] chg: [UI correlation graph + UI domain] correlation screenshot: show img in toolip + show hash in ShowDomain TODO: pixelate images --- bin/lib/Domain.py | 2 + bin/lib/Screenshot.py | 2 +- .../correlation/show_correlation.html | 6 ++- .../crawler/crawler_splash/showDomain.html | 41 ++++++++++++++++++- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/bin/lib/Domain.py b/bin/lib/Domain.py index 38fc406f..c2ab508e 100755 --- a/bin/lib/Domain.py +++ b/bin/lib/Domain.py @@ -476,6 +476,8 @@ def get_domain_total_nb_correlation(correlation_dict): total_correlation = 0 if 'decoded' in correlation_dict: total_correlation += len(correlation_dict['decoded']) + if 'screenshot' in correlation_dict: + total_correlation += len(correlation_dict['screenshot']) if 'cryptocurrency' in correlation_dict: total_correlation += correlation_dict['cryptocurrency'].get('nb', 0) if 'pgp' in correlation_dict: diff --git a/bin/lib/Screenshot.py b/bin/lib/Screenshot.py index 72456e46..fa85c5f2 100755 --- a/bin/lib/Screenshot.py +++ b/bin/lib/Screenshot.py @@ -32,7 +32,7 @@ def exist_screenshot(sha256_string): def get_metadata(sha256_string): metadata_dict = {} - metadata_dict['sha256'] = sha256_string + metadata_dict['img'] = get_screenshot_rel_path(sha256_string) return metadata_dict diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index 1e65d654..d99b2d1f 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -460,12 +460,16 @@ if (d.popover) { desc = desc + "fa-times-circle\">DOWN" } desc = desc + "" - } else if (key!="tags" && key!="id") { + } else if (key!="tags" && key!="id" && key!="img") { desc = desc + "
" + sanitize_text(key) + "
" + sanitize_text(data[key]) + "
" } }); desc = desc + "" + if (data["img"]) { + desc = desc + ""; + } + if (data["tags"]) { data["tags"].forEach(function(tag) { desc = desc + ""+ sanitize_text(tag) +""; diff --git a/var/www/templates/crawler/crawler_splash/showDomain.html b/var/www/templates/crawler/crawler_splash/showDomain.html index 9e5cf3d4..4cd4053c 100644 --- a/var/www/templates/crawler/crawler_splash/showDomain.html +++ b/var/www/templates/crawler/crawler_splash/showDomain.html @@ -270,7 +270,46 @@ {% endif %} - + {% if 'screenshot' in dict_domain%} +
+
+
+
+
+
+ Screenshot   +
{{dict_domain['screenshot']|length}}
+
+
+
+ +
+
+
+
+
+ + + + + + + + {% for decoded in dict_domain['decoded']%} + + + + {% endfor %} + +
Decoded
{{ decoded }}
+
+
+
+
+ {% endif %} + {% if dict_domain["crawler_history"] %}