Skip to content

Commit 0c5ac01

Browse files
committed
Undo psh net change
1 parent dd5b66f commit 0c5ac01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/util/exe.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,6 @@ def self.to_win32pe_psh_net(framework, code, opts={})
900900
hash_sub[:var_compileParams] = Rex::Text.rand_text_alpha(rand(8)+8)
901901
hash_sub[:var_syscode] = Rex::Text.rand_text_alpha(rand(8)+8)
902902

903-
904903
hash_sub[:b64shellcode] = Rex::Text.encode_base64(code)
905904

906905
return read_replace_script_template("to_mem_dotnet.ps1.template", hash_sub).gsub(/(?<!\r)\n/, "\r\n")
@@ -915,6 +914,7 @@ def self.to_win32pe_psh(framework, code, opts={})
915914
hash_sub[:var_rwx] = Rex::Text.rand_text_alpha(rand(8)+8)
916915
hash_sub[:var_iter] = Rex::Text.rand_text_alpha(rand(8)+8)
917916
hash_sub[:var_syscode] = Rex::Text.rand_text_alpha(rand(8)+8)
917+
918918
hash_sub[:shellcode] = Rex::Text.to_powershell(code, hash_sub[:var_code])
919919

920920
return read_replace_script_template("to_mem_old.ps1.template", hash_sub).gsub(/(?<!\r)\n/, "\r\n")

0 commit comments

Comments
 (0)