File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
modules/post/multi/manage Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def wsh_script(dst, src)
43
43
script_file = File . read ( File . join ( Msf ::Config . data_directory , "post" , "zip" , "zip.js" ) )
44
44
src . gsub! ( "\\ " , "\\ \\ \\ " )
45
45
dst . gsub! ( "\\ " , "\\ \\ \\ " )
46
- script_file << "zip(\" #{ src } \" ,\" #{ dst } \" );"
46
+ script_file << "zip(\" #{ src } \" ,\" #{ dst } \" );" . force_encoding ( "UTF-8" )
47
47
script_file
48
48
end
49
49
@@ -92,7 +92,7 @@ def upload_exec_wsh_script_zip
92
92
script = wsh_script ( datastore [ 'DESTINATION' ] , datastore [ 'SOURCE' ] )
93
93
tmp_path = "#{ get_env ( 'TEMP' ) } \\ zip.js"
94
94
print_status ( "script file uploaded to #{ tmp_path } " )
95
- write_file ( tmp_path , script )
95
+ write_file ( tmp_path , script . encode ( "UTF-16LE" ) )
96
96
cmd_exec ( "cscript.exe #{ tmp_path } " )
97
97
end
98
98
You can’t perform that action at this time.
0 commit comments