Skip to content

Commit 0659232

Browse files
committed
fix: fixed sysinfo fails when cwd in the implant is deleted
1 parent 580e7ff commit 0659232

File tree

1 file changed

+4
-2
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,10 @@ def cmd_drop_token(*args)
12241224
#
12251225
def cmd_sysinfo(*args)
12261226
info = client.sys.config.sysinfo(refresh: true)
1227-
client.update_session_info
1228-
1227+
begin
1228+
client.update_session_info
1229+
rescue
1230+
end
12291231
width = "Meterpreter".length
12301232
info.keys.each { |k| width = k.length if k.length > width and info[k] }
12311233

0 commit comments

Comments
 (0)