Merge pull request #130 from jduck/master

Address Robin Wood's bug report in the framework mailing list
unstable
Tod Beardsley 2012-01-25 13:54:58 -08:00
commit fa53ac4362
1 changed files with 8 additions and 3 deletions

View File

@ -71,9 +71,14 @@ class Metasploit3 < Msf::Auxiliary
lfd = nil
if offset != 0
begin
# Turns out ruby's implementation of seek with "ab" mode is all kind of busted.
lfd = ::File.open(datastore['LPATH'], "r+b")
lfd.seek(offset)
rescue Errno::ENOENT
print_error("Unable to open existing dump! Writing a new file instead of resuming...")
lfd = ::File.open(datastore['LPATH'], "wb")
end
else
lfd = ::File.open(datastore['LPATH'], "wb")
end