|
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")), |
31 | 43 | ] |
32 | 44 | """Default list of paths to load plugins from (volatility3/plugins and volatility3/framework/plugins)""" |
33 | 45 |
|
34 | 46 | SYMBOL_BASEPATHS = [ |
| 47 | + os.path.join( |
| 48 | + CACHE_PATH, "symbols" |
| 49 | + ), # User cache for automatically downloaded temporary symbols; searched after --symbol-dirs |
35 | 50 | os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "symbols")), |
36 | 51 | os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "symbols")), |
37 | 52 | ] |
|
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