Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions volatility3/framework/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@

REQUIRED_PYTHON_VERSION = (3, 8, 0)

CACHE_PATH = os.path.join(
os.environ.get("XDG_CACHE_HOME") or os.path.join(os.path.expanduser("~"), ".cache"),
"volatility3",
)
"""Default path to store cached data"""

if sys.platform == "win32":
CACHE_PATH = os.path.realpath(
os.path.join(os.environ.get("APPDATA", os.path.expanduser("~")), "volatility3")
)
os.makedirs(CACHE_PATH, exist_ok=True)

PLUGINS_PATH = [
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "plugins")),
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "plugins")),
Expand All @@ -34,6 +46,9 @@
SYMBOL_BASEPATHS = [
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "symbols")),
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "symbols")),
os.path.abspath(
os.path.join(CACHE_PATH, "symbols")
), # User cache fallback for automatically downloaded temporary symbols
]
"""Default list of paths to load symbols from (volatility3/symbols and volatility3/framework/symbols)"""

Expand Down Expand Up @@ -71,21 +86,9 @@
"""Logging level for four levels of detail: -vvvvvv"""


CACHE_PATH = os.path.join(
os.environ.get("XDG_CACHE_HOME") or os.path.join(os.path.expanduser("~"), ".cache"),
"volatility3",
)
"""Default path to store cached data"""

SQLITE_CACHE_PERIOD = "-3 days"
"""SQLite time modifier for how long each item is valid in the cache for"""

if sys.platform == "win32":
CACHE_PATH = os.path.realpath(
os.path.join(os.environ.get("APPDATA", os.path.expanduser("~")), "volatility3")
)
os.makedirs(CACHE_PATH, exist_ok=True)

IDENTIFIERS_FILENAME = "identifier.cache"
"""Default location to record information about available identifiers"""

Expand Down
2 changes: 1 addition & 1 deletion volatility3/framework/symbols/windows/pdbutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def download_pdb_isf(
)
break
except PermissionError:
vollog.warning(
vollog.debug(
f"Cannot write necessary symbol file, please check permissions on {potential_output_filename}"
)
continue
Expand Down
Loading