Fixes #3199, jduck caught the funky behavior of seek and ruby's "ab" and "wb" file mode. See also http://pastie.org/2789573

git-svn-id: file:///home/svn/framework3/trunk@14128 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2011-10-31 19:06:09 +00:00
parent e14668ece9
commit e1ffdfdb18
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ class Metasploit3 < Msf::Auxiliary
lfd = nil
if offset != 0
lfd = ::File.open(datastore['LPATH'], "wb")
# 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)
else
lfd = ::File.open(datastore['LPATH'], "wb")