From 6b7177d285d58770115d8aed881ffb5f4f9fa2df Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Mon, 25 Jan 2021 00:05:21 +0000 Subject: [PATCH] Volshell: Fix recent script option for non-generic volshell --- volatility/cli/volshell/generic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/volatility/cli/volshell/generic.py b/volatility/cli/volshell/generic.py index de43f8c71..be76eabe9 100644 --- a/volatility/cli/volshell/generic.py +++ b/volatility/cli/volshell/generic.py @@ -86,7 +86,9 @@ class Volshell(interfaces.plugins.PluginInterface): sys.ps1 = "({}) >>> ".format(self.current_layer) self.__console = code.InteractiveConsole(locals = self._construct_locals_dict()) - if self.config['script'] is not None: + # Since we have to do work to add the option only once for all different modes of volshell, we can't + # rely on the default having been set + if self.config.get('script', None) is not None: self.run_script(location = self.config['script']) self.__console.interact(banner = banner)