mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-10 19:57:39 +02:00
Merge pull request #467 from volatilityfoundation/feature/partial-cache-to-tmpfile-move
Layers: Allow manual cache control and disable for PDB
This commit is contained in:
@@ -79,7 +79,7 @@ class ResourceAccessor(object):
|
||||
"""Determines whether a URLs contents should be cached"""
|
||||
parsed_url = urllib.parse.urlparse(url)
|
||||
|
||||
return not parsed_url.scheme in self._non_cached_schemes()
|
||||
return self._enable_cache and not parsed_url.scheme in self._non_cached_schemes()
|
||||
|
||||
@staticmethod
|
||||
def _non_cached_schemes() -> List[str]:
|
||||
@@ -225,7 +225,6 @@ class JarHandler(VolatilityHandler):
|
||||
Actual reference (found from https://www.w3.org/wiki/UriSchemes/jar) seemed not to return:
|
||||
http://developer.java.sun.com/developer/onlineTraining/protocolhandlers/
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def non_cached_schemes(cls) -> List[str]:
|
||||
return ['jar']
|
||||
|
||||
@@ -937,7 +937,8 @@ class PdbRetreiver:
|
||||
for suffix in [file_name, file_name[:-1] + '_']:
|
||||
try:
|
||||
vollog.debug("Attempting to retrieve {}".format(url + suffix))
|
||||
result = resources.ResourceAccessor(progress_callback).open(url + suffix)
|
||||
# Don't cache the PDB files since they might build up and there's little benefit
|
||||
result = resources.ResourceAccessor(progress_callback, enable_cache = False).open(url + suffix)
|
||||
except (error.HTTPError, error.URLError) as excp:
|
||||
vollog.debug("Failed with {}".format(excp))
|
||||
if result:
|
||||
|
||||
Reference in New Issue
Block a user