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

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