diff --git a/lib/msf/core/module.rb b/lib/msf/core/module.rb index 168d3bcf02..897885a648 100644 --- a/lib/msf/core/module.rb +++ b/lib/msf/core/module.rb @@ -140,9 +140,7 @@ class Module # Return a comma separated list of supported platforms, if any # def platform_to_s - # TODO: fix me spoonm! - - return "TODO" + return (platform.all?) ? [ "All" ] : platform.names end # @@ -163,9 +161,9 @@ protected 'Name' => 'No module name', 'Description' => 'No module description', 'Version' => '0', - 'Author' => nil, - 'Arch' => nil, - 'Platform' => nil, + 'Author' => '', + 'Arch' => '', + 'Platform' => '', 'Ref' => nil, 'Privileged' => false, }.update(self.module_info) diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index ae0f203ae1..1f64fb7996 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -91,10 +91,15 @@ class Core # def cmd_info(args) if (args.length == 0) - print( - "Usage: info mod1 mod2 mod3 ...\n\n" + - "Queries the supplied module or modules for information.\n") - return false + if (mod = get_active_module()) + cmd_info([ mod.refname ]) + return true + else + print( + "Usage: info mod1 mod2 mod3 ...\n\n" + + "Queries the supplied module or modules for information.\n") + return false + end end args.each { |name| diff --git a/lib/msf/ui/console/driver.rb b/lib/msf/ui/console/driver.rb index e34aa935c5..f5009f406d 100644 --- a/lib/msf/ui/console/driver.rb +++ b/lib/msf/ui/console/driver.rb @@ -55,7 +55,7 @@ class Driver < Msf::Ui::Driver found = true") end rescue - output.print_error("Error while running command #{method}: #{$!}\n#{$@}\n.") + output.print_error("Error while running command #{method}: #{$!}\n#{$@.join("\n")}\n.") end # If the dispatcher stack changed as a result of this command,