From 8f0d1b37cc2f88646b5858509e1bc0d5bf4941e0 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 28 Apr 2024 20:51:25 +0100 Subject: [PATCH] Core: Improve error handling for proxy authentication issue --- volatility3/framework/layers/resources.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/volatility3/framework/layers/resources.py b/volatility3/framework/layers/resources.py index a64fa7d7a..2dba7caa8 100644 --- a/volatility3/framework/layers/resources.py +++ b/volatility3/framework/layers/resources.py @@ -151,6 +151,12 @@ def open(self, url: str, mode: str = "rb") -> Any: raise excp else: raise excp + except ValueError as excp: + # Reraise errors such as proxy auth errors as offline exception errors + # Example Proxy auth error - ValueError: AbstractDigestAuthHandler does not support the following scheme: 'Negotiate' + vollog.info(f"Cannot access {url} due to {excp} - Setting OFFLINE") + constants.OFFLINE = True + raise exceptions.OfflineException(url) except exceptions.OfflineException: vollog.info(f"Not accessing {url} in offline mode") raise