|
25 | 25 |
|
26 | 26 | REQUIRED_PYTHON_VERSION = (3, 8, 0) |
27 | 27 |
|
| 28 | +CACHE_PATH = os.path.join( |
| 29 | + os.environ.get("XDG_CACHE_HOME") or os.path.join(os.path.expanduser("~"), ".cache"), |
| 30 | + "volatility3", |
| 31 | +) |
| 32 | +"""Default path to store cached data""" |
| 33 | + |
| 34 | +if sys.platform == "win32": |
| 35 | + CACHE_PATH = os.path.realpath( |
| 36 | + os.path.join(os.environ.get("APPDATA", os.path.expanduser("~")), "volatility3") |
| 37 | + ) |
| 38 | +os.makedirs(CACHE_PATH, exist_ok=True) |
| 39 | + |
28 | 40 | PLUGINS_PATH = [ |
29 | 41 | os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "plugins")), |
30 | 42 | os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "plugins")), |
|
34 | 46 | SYMBOL_BASEPATHS = [ |
35 | 47 | os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "symbols")), |
36 | 48 | os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "symbols")), |
| 49 | + os.path.abspath( |
| 50 | + os.path.join(CACHE_PATH, "symbols") |
| 51 | + ), # User cache fallback for automatically downloaded temporary symbols |
37 | 52 | ] |
38 | 53 | """Default list of paths to load symbols from (volatility3/symbols and volatility3/framework/symbols)""" |
39 | 54 |
|
|
71 | 86 | """Logging level for four levels of detail: -vvvvvv""" |
72 | 87 |
|
73 | 88 |
|
74 | | -CACHE_PATH = os.path.join( |
75 | | - os.environ.get("XDG_CACHE_HOME") or os.path.join(os.path.expanduser("~"), ".cache"), |
76 | | - "volatility3", |
77 | | -) |
78 | | -"""Default path to store cached data""" |
79 | | - |
80 | 89 | SQLITE_CACHE_PERIOD = "-3 days" |
81 | 90 | """SQLite time modifier for how long each item is valid in the cache for""" |
82 | 91 |
|
83 | | -if sys.platform == "win32": |
84 | | - CACHE_PATH = os.path.realpath( |
85 | | - os.path.join(os.environ.get("APPDATA", os.path.expanduser("~")), "volatility3") |
86 | | - ) |
87 | | -os.makedirs(CACHE_PATH, exist_ok=True) |
88 | | - |
89 | 92 | IDENTIFIERS_FILENAME = "identifier.cache" |
90 | 93 | """Default location to record information about available identifiers""" |
91 | 94 |
|
|
0 commit comments