diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb index 38cffea5f9..7d92c62bef 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb @@ -104,9 +104,9 @@ class Config # # Returns a hash of information about the remote computer. # - def sysinfo + def sysinfo(refresh = false) request = Packet.create_request('stdapi_sys_config_sysinfo') - if @sysinfo.nil? + if @sysinfo.nil? || refresh response = client.send_request(request) @sysinfo = { diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb index 40ee133627..dba10daa5a 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb @@ -808,7 +808,7 @@ class Console::CommandDispatcher::Stdapi::Sys # Displays information about the remote system. # def cmd_sysinfo(*args) - info = client.sys.config.sysinfo + info = client.sys.config.sysinfo(:refresh) width = "Meterpreter".length info.keys.each { |k| width = k.length if k.length > width and info[k] }