Skip to content

Commit 37546c7

Browse files
committed
to_exe_vbs - Allow for exe_filename to be defined
1 parent b40e9f6 commit 37546c7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/msf/util/exe.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,16 +1035,16 @@ def self.to_exe_vbs(exes = '', opts = {})
10351035
persist = opts[:persist] || false
10361036

10371037
hash_sub = {}
1038+
hash_sub[:exe_filename] = opts[:exe_filename] || Rex::Text.rand_text_alpha(rand(8)+8) << '.exe'
10381039
hash_sub[:var_shellcode] = Rex::Text.rand_text_alpha(rand(8)+8)
1039-
hash_sub[:exe_filename] = Rex::Text.rand_text_alpha(rand(8)+8) << '.exe'
1040-
hash_sub[:var_fname] = Rex::Text.rand_text_alpha(rand(8)+8)
1041-
hash_sub[:var_func] = Rex::Text.rand_text_alpha(rand(8)+8)
1042-
hash_sub[:var_stream] = Rex::Text.rand_text_alpha(rand(8)+8)
1043-
hash_sub[:var_obj] = Rex::Text.rand_text_alpha(rand(8)+8)
1044-
hash_sub[:var_shell] = Rex::Text.rand_text_alpha(rand(8)+8)
1045-
hash_sub[:var_tempdir] = Rex::Text.rand_text_alpha(rand(8)+8)
1046-
hash_sub[:var_tempexe] = Rex::Text.rand_text_alpha(rand(8)+8)
1047-
hash_sub[:var_basedir] = Rex::Text.rand_text_alpha(rand(8)+8)
1040+
hash_sub[:var_fname] = Rex::Text.rand_text_alpha(rand(8)+8)
1041+
hash_sub[:var_func] = Rex::Text.rand_text_alpha(rand(8)+8)
1042+
hash_sub[:var_stream] = Rex::Text.rand_text_alpha(rand(8)+8)
1043+
hash_sub[:var_obj] = Rex::Text.rand_text_alpha(rand(8)+8)
1044+
hash_sub[:var_shell] = Rex::Text.rand_text_alpha(rand(8)+8)
1045+
hash_sub[:var_tempdir] = Rex::Text.rand_text_alpha(rand(8)+8)
1046+
hash_sub[:var_tempexe] = Rex::Text.rand_text_alpha(rand(8)+8)
1047+
hash_sub[:var_basedir] = Rex::Text.rand_text_alpha(rand(8)+8)
10481048

10491049
hash_sub[:hex_shellcode] = exes.unpack('H*').join('')
10501050

0 commit comments

Comments
 (0)