From 7e03bf838b62b3466842d9eb815fcb2da980a75c Mon Sep 17 00:00:00 2001 From: a1exdandy Date: Thu, 15 Feb 2018 17:44:41 +0500 Subject: [PATCH] Fix src_size view --- lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb index ffcb020202..4ab5dbb395 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb @@ -286,7 +286,8 @@ class File < Rex::Post::Meterpreter::Extensions::Stdapi::Fs::IO while (buf = src_fd.read(buf_size)) dest_fd.write(buf) percent = dest_fd.pos.to_f / src_size.to_f * 100.0 - msg = "Uploaded #{Filesize.new(dest_fd.pos).pretty} of #{src_size} (#{percent.round(2)}%)" + msg = "Uploaded #{Filesize.new(dest_fd.pos).pretty} of " \ + "#{Filesize.new(src_size).pretty} (#{percent.round(2)}%)" stat.call(msg, src_file, dest_file) end ensure