Skip to content

Commit 035e688

Browse files
committed
Land rapid7#7401, refresh support for sysinfo
2 parents 548efc3 + a89607b commit 035e688

File tree

2 files changed

+3
-3
lines changed
  • lib/rex/post/meterpreter

2 files changed

+3
-3
lines changed

lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ def getenv(var_name)
104104
#
105105
# Returns a hash of information about the remote computer.
106106
#
107-
def sysinfo
107+
def sysinfo(refresh: false)
108108
request = Packet.create_request('stdapi_sys_config_sysinfo')
109-
if @sysinfo.nil?
109+
if @sysinfo.nil? || refresh
110110
response = client.send_request(request)
111111

112112
@sysinfo = {

lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ def cmd_drop_token(*args)
808808
# Displays information about the remote system.
809809
#
810810
def cmd_sysinfo(*args)
811-
info = client.sys.config.sysinfo
811+
info = client.sys.config.sysinfo(refresh: true)
812812
width = "Meterpreter".length
813813
info.keys.each { |k| width = k.length if k.length > width and info[k] }
814814

0 commit comments

Comments
 (0)