diff --git a/volatility3/cli/volshell/generic.py b/volatility3/cli/volshell/generic.py index 71b2173c6..3a5d514fe 100644 --- a/volatility3/cli/volshell/generic.py +++ b/volatility3/cli/volshell/generic.py @@ -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: