Land #9081, Fix ftp.rb to get files larger than 16384

bug/bundler_fix
Brent Cook 2017-10-23 22:11:36 -05:00
commit 402e926151
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 8 additions and 1 deletions

View File

@ -219,7 +219,7 @@ module Exploit::Remote::Ftp
if (type == "get") if (type == "get")
# failed listings just disconnect.. # failed listings just disconnect..
begin begin
data = self.datasocket.get_once(-1, ftp_timeout) data = datasocket.get(ftp_timeout, ftp_data_timeout)
rescue ::EOFError rescue ::EOFError
data = nil data = nil
end end
@ -341,6 +341,13 @@ module Exploit::Remote::Ftp
(datastore['FTPTimeout'] || 10).to_i (datastore['FTPTimeout'] || 10).to_i
end end
#
# Returns the number of seconds to wait to get more FTP data
#
def ftp_data_timeout
(datastore['FTPDataTimeout'] || 1).to_i
end
protected protected
# #