CLI: Add configuration option for blatting over config files

This commit is contained in:
Mike Auty
2022-03-16 01:41:18 +00:00
parent eb38756dbe
commit 0f4f4f2b3a
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ class CommandLine:
constructed = plugins.construct_plugin(ctx, automagics, plugin, base_config_path, progress_callback,
self.file_handler_class_factory())
backup_filename = True
backup_filename = constants.BACKUP_EXISTING_CONFIG_OUTPUT
if args.write_config:
vollog.warning('Use of --write-config has been deprecated, replaced by --save-config <filename>')
args.save_config = 'config.json'
+1 -1
View File
@@ -237,7 +237,7 @@ class VolShell(cli.CommandLine):
constructed = plugins.construct_plugin(ctx, automagics, plugin, base_config_path, progress_callback,
self.file_handler_class_factory())
backup_filename = True
backup_filename = constants.BACKUP_EXISTING_CONFIG_OUTPUT
if args.write_config:
vollog.warning('Use of --write-config has been deprecated, replaced by --save-config <filename>')
args.save_config = 'config.json'
+5 -1
View File
@@ -9,7 +9,7 @@ volatility This includes default scanning block sizes, etc.
import enum
import os.path
import sys
from typing import Optional, Callable
from typing import Callable, Optional
import volatility3.framework.constants.linux
import volatility3.framework.constants.windows
@@ -80,6 +80,7 @@ ProgressCallback = Optional[Callable[[float, str], None]]
OS_CATEGORIES = ['windows', 'mac', 'linux']
class Parallelism(enum.IntEnum):
"""An enumeration listing the different types of parallelism applied to
volatility."""
@@ -100,3 +101,6 @@ OFFLINE = False
REMOTE_ISF_URL = None # 'http://localhost:8000/banners.json'
"""Remote URL to query for a list of ISF addresses"""
BACKUP_EXISTING_CONFIG_OUTPUT = True
"""Whether existing files are backed up or overwritten when writing configuration output"""