refresh sysinfo when explicitly requested on a session

bug/bundler_fix
Brent Cook 2016-10-04 22:06:06 -05:00
parent 548efc3e98
commit b7ea465855
2 changed files with 3 additions and 3 deletions

View File

@ -104,9 +104,9 @@ class Config
# #
# Returns a hash of information about the remote computer. # Returns a hash of information about the remote computer.
# #
def sysinfo def sysinfo(refresh = false)
request = Packet.create_request('stdapi_sys_config_sysinfo') request = Packet.create_request('stdapi_sys_config_sysinfo')
if @sysinfo.nil? if @sysinfo.nil? || refresh
response = client.send_request(request) response = client.send_request(request)
@sysinfo = { @sysinfo = {

View File

@ -808,7 +808,7 @@ class Console::CommandDispatcher::Stdapi::Sys
# Displays information about the remote system. # Displays information about the remote system.
# #
def cmd_sysinfo(*args) def cmd_sysinfo(*args)
info = client.sys.config.sysinfo info = client.sys.config.sysinfo(:refresh)
width = "Meterpreter".length width = "Meterpreter".length
info.keys.each { |k| width = k.length if k.length > width and info[k] } info.keys.each { |k| width = k.length if k.length > width and info[k] }