diff --git a/volatility/framework/automagic/stacker.py b/volatility/framework/automagic/stacker.py index 205091bd5..eef908dd7 100644 --- a/volatility/framework/automagic/stacker.py +++ b/volatility/framework/automagic/stacker.py @@ -8,7 +8,8 @@ once a layer successfully stacks on top of the existing layers, it is removed fr """ import logging -from urllib import parse +import urllib.parse +import urllib.request import volatility from volatility.framework import configuration, interfaces @@ -64,12 +65,12 @@ class LayerStacker(interfaces.automagic.AutomagicInterface): return [] self._check_type(location, str) self._check_type(requirement, interfaces.configuration.RequirementInterface) - location = parse.urlparse(location) + location = urllib.parse.urlparse(location) # Setup the local copy of the resource self.local_store = None if location.scheme == "file": - self.local_store = location.path + self.local_store = urllib.request.url2pathname(location.path) else: vollog.warning("Only file scheme supported for single-location") return [] diff --git a/volatility/framework/symbols/intermed.py b/volatility/framework/symbols/intermed.py index f6a2543f3..cd8be04f6 100644 --- a/volatility/framework/symbols/intermed.py +++ b/volatility/framework/symbols/intermed.py @@ -6,6 +6,7 @@ import lzma import os import pathlib import urllib.parse +import urllib.request from volatility import schemas from volatility.framework import class_subclasses, constants, exceptions, interfaces, objects @@ -76,7 +77,7 @@ class IntermediateSymbolTable(interfaces.symbols.SymbolTableInterface): # Open the file and test the version self._versions = dict([(x.version, x) for x in class_subclasses(ISFormatTable)]) - url_path = urllib.parse.unquote(url.path) + url_path = urllib.request.url2pathname(url.path) if url_path.endswith('.xz'): fp = lzma.open(url_path, 'rt') else: