File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,8 @@ def is_valid_session?(timeout=10)
307
307
308
308
begin
309
309
self . machine_id = self . core . machine_id ( timeout )
310
+ self . payload_uuid ||= self . core . uuid ( timeout )
311
+
310
312
return true
311
313
rescue ::Rex ::Post ::Meterpreter ::RequestError
312
314
# This meterpreter doesn't support core_machine_id
@@ -329,8 +331,6 @@ def load_session_info()
329
331
username = self . sys . config . getuid
330
332
sysinfo = self . sys . config . sysinfo
331
333
332
- self . payload_uuid = self . core . uuid
333
-
334
334
safe_info = "#{ username } @ #{ sysinfo [ 'Computer' ] } "
335
335
safe_info . force_encoding ( "ASCII-8BIT" ) if safe_info . respond_to? ( :force_encoding )
336
336
# Should probably be using Rex::Text.ascii_safe_hex but leave
Original file line number Diff line number Diff line change 1
1
# -*- coding: binary -*-
2
2
3
3
require 'msf/core'
4
+ require 'msf/core/payload/transport_config'
4
5
require 'msf/core/payload/windows/reverse_http'
5
6
6
7
module Msf
@@ -13,6 +14,7 @@ module Msf
13
14
14
15
module Payload ::Windows ::ReverseHttps
15
16
17
+ include Msf ::Payload ::TransportConfig
16
18
include Msf ::Payload ::Windows ::ReverseHttp
17
19
18
20
#
Original file line number Diff line number Diff line change @@ -296,10 +296,12 @@ def use(mod, opts = { })
296
296
return true
297
297
end
298
298
299
- def uuid
299
+ def uuid ( timeout = nil )
300
300
request = Packet . create_request ( 'core_uuid' )
301
301
302
- response = client . send_request ( request )
302
+ args = [ request ]
303
+ args << timeout if timeout
304
+ response = client . send_request ( *args )
303
305
304
306
id = response . get_tlv_value ( TLV_TYPE_UUID )
305
307
You can’t perform that action at this time.
0 commit comments