Add a rescue for the file download
git-svn-id: file:///home/svn/framework3/trunk@12176 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
30b25994d7
commit
c0bde3f030
|
@ -227,10 +227,14 @@ class Metasploit3 < Msf::Post
|
||||||
print_good("Downloading #{file} file from: #{path}")
|
print_good("Downloading #{file} file from: #{path}")
|
||||||
file = path + "\\" + file
|
file = path + "\\" + file
|
||||||
fd = session.fs.file.new(file)
|
fd = session.fs.file.new(file)
|
||||||
|
begin
|
||||||
until fd.eof?
|
until fd.eof?
|
||||||
loot << fd.read
|
loot << fd.read
|
||||||
end
|
end
|
||||||
|
rescue EOFError
|
||||||
|
ensure
|
||||||
fd.close
|
fd.close
|
||||||
|
end
|
||||||
|
|
||||||
ext = file.split('.')[2]
|
ext = file.split('.')[2]
|
||||||
if ext == "txt"
|
if ext == "txt"
|
||||||
|
|
Loading…
Reference in New Issue