File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
lib/rex/post/meterpreter/extensions/stdapi/sys Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -87,16 +87,19 @@ def getenv(var_name)
87
87
#
88
88
def sysinfo
89
89
request = Packet . create_request ( 'stdapi_sys_config_sysinfo' )
90
- response = client . send_request ( request )
91
-
92
- {
93
- 'Computer' => response . get_tlv_value ( TLV_TYPE_COMPUTER_NAME ) ,
94
- 'OS' => response . get_tlv_value ( TLV_TYPE_OS_NAME ) ,
95
- 'Architecture' => response . get_tlv_value ( TLV_TYPE_ARCHITECTURE ) ,
96
- 'System Language' => response . get_tlv_value ( TLV_TYPE_LANG_SYSTEM ) ,
97
- 'Domain' => response . get_tlv_value ( TLV_TYPE_DOMAIN ) ,
98
- 'Logged On Users' => response . get_tlv_value ( TLV_TYPE_LOGGED_ON_USER_COUNT )
99
- }
90
+ if @sysinfo . nil?
91
+ response = client . send_request ( request )
92
+
93
+ @sysinfo = {
94
+ 'Computer' => response . get_tlv_value ( TLV_TYPE_COMPUTER_NAME ) ,
95
+ 'OS' => response . get_tlv_value ( TLV_TYPE_OS_NAME ) ,
96
+ 'Architecture' => response . get_tlv_value ( TLV_TYPE_ARCHITECTURE ) ,
97
+ 'System Language' => response . get_tlv_value ( TLV_TYPE_LANG_SYSTEM ) ,
98
+ 'Domain' => response . get_tlv_value ( TLV_TYPE_DOMAIN ) ,
99
+ 'Logged On Users' => response . get_tlv_value ( TLV_TYPE_LOGGED_ON_USER_COUNT )
100
+ }
101
+ end
102
+ @sysinfo
100
103
end
101
104
102
105
#
You can’t perform that action at this time.
0 commit comments