mirror of https://github.com/CIRCL/lookyloo
chg: shorten_string can return a div with title
parent
cff9962013
commit
603303560a
|
@ -64,7 +64,7 @@ $(document).ready(function () {
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<p title="{{ page_title }}"><a href="{{ url_for('tree', tree_uuid=uuid) }}">{{ page_title }}</a></p>
|
<p title="{{ page_title }}"><a href="{{ url_for('tree', tree_uuid=uuid) }}">{{ page_title }}</a></p>
|
||||||
<p title="{{ url }}">{{ shorten_string(url, 150) }}</p>
|
{{ shorten_string(url, 50, with_title=True) }}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ datetime }}</td>
|
<td>{{ datetime }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -281,10 +281,19 @@
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro shorten_string(string, cut_length) %}
|
{% macro shorten_string(string, cut_length, with_title=False) %}
|
||||||
|
{% if with_title %}
|
||||||
|
<div title={{string}}>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
{% if string|length > cut_length %}
|
{% if string|length > cut_length %}
|
||||||
{{ string[:cut_length] }} [...]
|
{{ string[:cut_length] }} [...]
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ string }}
|
{{ string }}
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
|
{% if with_title %}
|
||||||
|
</div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
|
{% from "macros.html" import shorten_string %}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{% if vt %}
|
{% if vt %}
|
||||||
<center><h1 class="display-4">Virus Total</h1></center>
|
<center><h1 class="display-4">Virus Total</h1></center>
|
||||||
{% for url, entries in vt.items() %}
|
{% for url, entries in vt.items() %}
|
||||||
<div class="border-top my-3"></div>
|
<div class="border-top my-3"></div>
|
||||||
<center><h3><small class="text-muted">URL</small><br>{{ url }}</h3></center>
|
<center>
|
||||||
|
<h3><small class="text-muted">URL</small>
|
||||||
|
{{ shorten_string(url, 50, with_title=True) }}
|
||||||
|
</h3>
|
||||||
|
</center>
|
||||||
{% if entries['malicious'] %}
|
{% if entries['malicious'] %}
|
||||||
<center>
|
<center>
|
||||||
<p class="lead">Detected as malicious by the following vendors</p>
|
<p class="lead">Detected as malicious by the following vendors</p>
|
||||||
|
@ -23,7 +29,10 @@
|
||||||
{% if pi%}
|
{% if pi%}
|
||||||
<center><h1 class="display-4">Phishing Initiative</h1></center>
|
<center><h1 class="display-4">Phishing Initiative</h1></center>
|
||||||
{% for url, tag in pi.items() %}
|
{% for url, tag in pi.items() %}
|
||||||
<center><h3><small class="text-muted">URL</small><br>{{ url }}</h3>
|
<center>
|
||||||
|
<h3><small class="text-muted">URL</small>
|
||||||
|
{{ shorten_string(url, 50, with_title=True) }}
|
||||||
|
</h3>
|
||||||
<div>This URL is tagged as <b>{{ tag }}</b> on Phishing Initiative</div>
|
<div>This URL is tagged as <b>{{ tag }}</b> on Phishing Initiative</div>
|
||||||
</center>
|
</center>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue