Update URLhaus_analyzer.py

This commit is contained in:
garanews 2020-10-05 12:11:44 +02:00 committed by GitHub
parent e3918f5231
commit f17f067fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,8 @@ class URLhausAnalyzer(Analyzer):
namespace = "URLhaus"
if raw['query_status'] == 'no_results' \
or raw['query_status'] == 'ok' and raw['md5_hash'] == None and raw['sha256_hash'] == None:
or (raw['query_status'] == 'ok' and not raw.get('md5_hash', None) \
and not raw.get('sha256_hash', None)):
taxonomies.append(self.build_taxonomy(
'info',
namespace,