From 4450766d502f994497f48df0971d80e545806fd9 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 15 May 2018 00:54:13 +0100 Subject: [PATCH] Remove the -f flag before it gains too much use. Given the single-location parameter is now a URIRequirement, and can accept normal files (rather than a full URL), but is far more accurate (it matches exactly what the automagic requests). If there's much uproar we can revert this one commit. --- volatility/cli/__init__.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/volatility/cli/__init__.py b/volatility/cli/__init__.py index b9d278c6e..f152341cc 100644 --- a/volatility/cli/__init__.py +++ b/volatility/cli/__init__.py @@ -82,8 +82,6 @@ class CommandLine(interfaces.plugins.FileConsumerInterface): parser.add_argument("-q", "--quiet", help = "Remove progress feedback", default = False, action = 'store_true') parser.add_argument("-l", "--log", help = "Log output to a file as well as the console", default = None, type = str) - parser.add_argument("-f", help = "Shorthand for --single-location=file:// if single-location is not defined", - default = None, type = str) parser.add_argument("--write-config", help = "Write configuration JSON file out to config.json", default = False, action = 'store_true') @@ -146,18 +144,6 @@ class CommandLine(interfaces.plugins.FileConsumerInterface): plugin = plugin_list[args.plugin] plugin_config_path = interfaces.configuration.path_join('plugins', plugin.__name__) - # Special case the -f argument because people use is so frequently - # It has to go here so it can be overridden by single-location if it's defined - # NOTE: This will *BREAK* if LayerStacker, or the automagic configuration system, changes at all - ### - if args.f: - file_name = os.path.abspath(args.f) - if not os.path.exists(file_name): - vollog.log(logging.INFO, "File does not exist: {}".format(file_name)) - else: - single_location = "file:" + request.pathname2url(file_name) - ctx.config['automagic.LayerStacker.single_location'] = single_location - # UI fills in the config, here we load it from the config file and do it before we process the CL parameters if args.config: with open(args.config, "r") as f: