Fix #13798, Fix #14128, fix meterpreter > download * on utf-8 filenames

This commit is contained in:
Tim W
2021-03-12 19:51:40 +00:00
parent 17ef194c52
commit 1a7704787f
@@ -280,6 +280,7 @@ class Dir < Rex::Post::Dir
end
dir_files.each { |src_sub|
src_sub.force_encoding('UTF-8')
dst_sub = src_sub.dup
dst_sub.gsub!(::File::SEPARATOR, '_') # '/' on all systems
dst_sub.gsub!(::File::ALT_SEPARATOR, '_') if ::File::ALT_SEPARATOR # nil on Linux, '\' on Windows