Land #8330, fix ps_wmi_exec and psh staging

bug/bundler_fix
Spencer McIntyre 2017-05-13 14:26:47 -04:00
commit f39e378496
No known key found for this signature in database
GPG Key ID: C00D6B6AA5E15412
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ module Msf
count = 8000
while index < compressed_script.size - 1
# Define random, but serialized variable name
env_prefix = format("%05d%s", ((index + 8000) / 8000), env_suffix)
env_variable = format("%05d%s", ((index + 8000) / 8000), env_suffix)
# Create chunk
chunk = compressed_script[index, count]

View File

@ -80,7 +80,7 @@ class MetasploitModule < Msf::Exploit::Local
sleep_time = rand(5)+5
psh_payload = "function #{fun_name}{#{psh_payload}};while(1){Start-Sleep -s #{sleep_time};#{fun_name};1}"
end
psh_payload = compress_script(psh_payload_raw, eof)
psh_payload = encode_script(compress_script(psh_payload_raw, eof), eof)
# WMI exec function - this is going into powershell.rb after pull 701 is commited
script = ps_wmi_exec(run_opts)
# Build WMI exec calls to every host into the script to reduce PS instances