From 38f773fc910853d3021e4254356f3a52a2f5021d Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 17 Sep 2019 01:04:10 +0100 Subject: [PATCH] Slightly tidy up volshell messages. --- volatility/cli/volshell/shellplugin.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/volatility/cli/volshell/shellplugin.py b/volatility/cli/volshell/shellplugin.py index 0c3e66d03..75e990d34 100644 --- a/volatility/cli/volshell/shellplugin.py +++ b/volatility/cli/volshell/shellplugin.py @@ -57,23 +57,24 @@ class Volshell(interfaces.plugins.PluginInterface): # TODO: provide help, consider generic functions (pslist?) and/or providing windows/linux functions sys.ps1 = "({}) >>> ".format(self.current_layer) - code.interact(local = self.construct_locals()) + code.interact(banner = "\nCall help() to see available functions\n", local = self.construct_locals()) return renderers.TreeGrid([("Terminating", str)], None) def help(self): """Describes the available commands""" variables = [] - print("Methods:") + print("\nMethods:") for name, item in self.construct_locals().items(): if item.__doc__ and callable(item): - print("{} - {}".format(name, item.__doc__)) + print("* {}".format(name)) + print(" {}".format(item.__doc__)) else: variables.append(name) - print("Variables:") + print("\nVariables:") for var in variables: - print(var) + print(" {}".format(var)) def construct_locals(self) -> Dict[str, Any]: """Returns a dictionary listing the functions to be added to the