We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 844460d commit 8f720efCopy full SHA for 8f720ef
lib/msf/core/post/windows/runas.rb
@@ -12,7 +12,7 @@ module Msf::Post::Windows::Runas
12
def shell_execute_exe(filename = nil, path = nil)
13
exe_payload = generate_payload_exe
14
payload_filename = filename || Rex::Text.rand_text_alpha((rand(8) + 6)) + '.exe'
15
- payload_path = path || expand_path('%TEMP%')
+ payload_path = path || get_env('TEMP')
16
cmd_location = "#{payload_path}\\#{payload_filename}"
17
print_status("Uploading #{payload_filename} - #{exe_payload.length} bytes to the filesystem...")
18
write_file(cmd_location, exe_payload)
0 commit comments