diff --git a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb index 5ec16f86fc..72ab8bfa71 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb @@ -373,7 +373,7 @@ class File < Rex::Post::Meterpreter::Extensions::Stdapi::Fs::IO end # Keep transferring until EOF is reached... - block_size = opts['block_size'] || 1024 * 1024 + block_size = (opts && opts['block_size']) || 1024 * 1024 begin if tries # resume when timeouts encountered