Not using bare except and removed unused var

This commit is contained in:
Nex 2022-08-16 15:55:29 +02:00
parent 631354c131
commit f536af1124
2 changed files with 4 additions and 4 deletions

View File

@ -103,8 +103,8 @@ class Manifest(IOSExtraction):
parts = rel_path.split("_")
for part in parts:
try:
part_parsed = URL(part)
except:
URL(part)
except Exception:
continue
ioc = self.indicators.check_domain(part)

View File

@ -62,7 +62,7 @@ class SafariHistory(IOSExtraction):
try:
origin_domain = URL(result["url"]).domain
except:
except Exception:
origin_domain = ""
# We loop again through visits in order to find redirect record.
@ -72,7 +72,7 @@ class SafariHistory(IOSExtraction):
try:
redirect_domain = URL(redirect["url"]).domain
except:
except Exception:
redirect_domain = ""
# If the redirect destination is the same domain as the origin,