mirror of https://github.com/CIRCL/lookyloo
fix: urlscan dislikes URLs without scheme.
parent
39979c8708
commit
09a69622c0
|
@ -548,7 +548,12 @@ class UrlScan():
|
|||
return {'success': 'Module triggered'}
|
||||
|
||||
def __submit_url(self, url: str, useragent: str, referer: str, visibility: str) -> Dict:
|
||||
data = {"url": url, 'customagent': useragent, 'referer': referer}
|
||||
data = {'customagent': useragent, 'referer': referer}
|
||||
|
||||
if not url.startswith('http'):
|
||||
url = f'http://{url}'
|
||||
data['url'] = url
|
||||
|
||||
if self.force_visibility is False:
|
||||
data["visibility"] = visibility
|
||||
elif self.force_visibility in ["public", "unlisted", "private"]:
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{% from "macros.html" import shorten_string %}
|
||||
|
||||
<div>
|
||||
{% if urlscan %}
|
||||
{% if urlscan and urlscan.get('permaurl') %}
|
||||
<hr>
|
||||
<center>
|
||||
<h1 class="display-4">urlscan.io</h1>
|
||||
<div>
|
||||
<p>A scan was triggered for this capture,
|
||||
<a href="{{urlscan['permaurl']}}">click to view it</a> on urlscan.io.</p>
|
||||
<a href="{{ urlscan['permaurl'] }}">click to view it</a> on urlscan.io.</p>
|
||||
{% if urlscan['malicious']%}
|
||||
<p>It is considered malicious.</p>
|
||||
{% endif%}
|
||||
|
|
Loading…
Reference in New Issue