From dd5edc395a071c6d01ec5fd866380dfda8af9ad4 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Mon, 3 Sep 2018 22:14:48 +0100 Subject: [PATCH] Add in commented code for keeping the zip file in sync if we decide it's needed. --- volatility/framework/automagic/linux_symbol_cache.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/volatility/framework/automagic/linux_symbol_cache.py b/volatility/framework/automagic/linux_symbol_cache.py index d8870e5b8..cbe8ca49d 100644 --- a/volatility/framework/automagic/linux_symbol_cache.py +++ b/volatility/framework/automagic/linux_symbol_cache.py @@ -38,6 +38,15 @@ class LinuxSymbolCache(interfaces.automagic.AutomagicInterface): vollog.log(constants.LOGLEVEL_V, "Removing cached path {} for banner {}: file does not exist".format(path, banner)) linux_banners[banner].remove(path) + # This is probably excessive, but it's here if we need it + # if url.scheme == 'jar': + # zip_file, zip_path = url.path.split("!") + # zip_file = urllib.parse.urlparse(zip_file).path + # if ((not os.path.exists(zip_file)) or (zip_path not in zipfile.ZipFile(zip_file).namelist())): + # vollog.log(constants.LOGLEVEL_V, + # "Removing cached path {} for banner {}: file does not exist".format(path, banner)) + # linux_banners[banner].remove(path) + if not linux_banners[banner]: remove_banners.append(banner) for remove_banner in remove_banners: