mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-26 03:24:50 +02:00
Merge pull request #1733 from volatilityfoundation/add-script-only-volshell-feature
Add a --script-only flag that exits after the given volshell script i…
This commit is contained in:
@@ -60,7 +60,13 @@ class Volshell(interfaces.plugins.PluginInterface):
|
||||
description="File to load and execute at start",
|
||||
default=None,
|
||||
optional=True,
|
||||
)
|
||||
),
|
||||
requirements.BooleanRequirement(
|
||||
name="script-only",
|
||||
description="Exit volshell after the script specified in --script completes",
|
||||
default=False,
|
||||
optional=True,
|
||||
),
|
||||
]
|
||||
return reqs + [
|
||||
requirements.TranslationLayerRequirement(
|
||||
@@ -135,6 +141,9 @@ class Volshell(interfaces.plugins.PluginInterface):
|
||||
if self.config.get("script", None) is not None:
|
||||
self.run_script(location=self.config["script"])
|
||||
|
||||
if self.config.get("script-only"):
|
||||
exit()
|
||||
|
||||
if has_ipython:
|
||||
self.__console()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user