refresh sysinfo when explicitly requested on a session
parent
548efc3e98
commit
b7ea465855
|
@ -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 = {
|
||||||
|
|
|
@ -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] }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue