mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
CLI: Partial changes by @lesander contributed in #1343
This commit is contained in:
@@ -41,8 +41,8 @@ jobs:
|
||||
|
||||
- name: Testing...
|
||||
run: |
|
||||
py.test ./test/test_volatility.py --volatility=vol.py --image win-xp-laptop-2005-06-25.img -k test_windows -v
|
||||
py.test ./test/test_volatility.py --volatility=vol.py --image linux-sample-1.bin -k test_linux -v
|
||||
pytest ./test/test_volatility.py --volatility=vol.py --image win-xp-laptop-2005-06-25.img -k test_windows -v
|
||||
pytest ./test/test_volatility.py --volatility=vol.py --image linux-sample-1.bin -k test_linux -v
|
||||
|
||||
- name: Clean up post-test
|
||||
run: |
|
||||
|
||||
@@ -88,7 +88,7 @@ class MuteProgress(PrintedProgress):
|
||||
class CommandLine:
|
||||
"""Constructs a command-line interface object for users to run plugins."""
|
||||
|
||||
CLI_NAME = "volatility"
|
||||
CLI_NAME = os.path.basename(sys.argv[0]) # vol or volatility
|
||||
|
||||
def __init__(self):
|
||||
self.setup_logging()
|
||||
@@ -364,6 +364,7 @@ class CommandLine:
|
||||
self.CLI_NAME
|
||||
),
|
||||
action=volargparse.HelpfulSubparserAction,
|
||||
metavar="PLUGIN",
|
||||
)
|
||||
for plugin in sorted(plugin_list):
|
||||
plugin_parser = subparser.add_parser(
|
||||
@@ -385,7 +386,7 @@ class CommandLine:
|
||||
argcomplete.autocomplete(parser)
|
||||
args = parser.parse_args()
|
||||
if args.plugin is None:
|
||||
parser.error("Please select a plugin to run")
|
||||
parser.error(f"Please select a plugin to run (see '{self.CLI_NAME} --help' for options")
|
||||
|
||||
vollog.log(
|
||||
constants.LOGLEVEL_VVV, f"Cache directory used: {constants.CACHE_PATH}"
|
||||
|
||||
@@ -49,7 +49,7 @@ class VolShell(cli.CommandLine):
|
||||
python terminal with all the volatility support calls available.
|
||||
"""
|
||||
|
||||
CLI_NAME = "volshell"
|
||||
CLI_NAME = os.path.basename(sys.argv[0]) # volshell
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
Reference in New Issue
Block a user