Update urlscan.py

Avoid exiting after 'net::ERR_ABORTED' and 'net::ERR_FAILED'; still return the results.
pull/701/head
Koen Van Impe 2024-11-12 22:07:50 +01:00 committed by GitHub
parent e17aad3aeb
commit 27751e9dcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -81,6 +81,10 @@ def lookup_indicator(client, query):
for request in result['data']['requests']:
if request['response'].get('failed'):
if request['response']['failed']['errorText']:
if request['response']['failed']['errorText'] == "net::ERR_ABORTED":
continue
elif request['response']['failed']['errorText'] == "net::ERR_FAILED":
continue
log.debug('The page could not load')
r.append(
{'error': 'Domain could not be resolved: {}'.format(request['response']['failed']['errorText'])})