Fix missing RequestError in a few post modules

Should be Rex::Post::Meterpreter::RequestError.
GSoC/Meterpreter_Web_Console
William Vu 2018-06-12 17:11:29 -05:00
parent c3c6bc19da
commit 14da99bb3d
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ class MetasploitModule < Msf::Post
def load_file(fname)
begin
data = cmd_exec("cat #{fname}")
rescue RequestError => e
rescue Rex::Post::Meterpreter::RequestError => e
print_error("Failed to retrieve file. #{e.message}")
data = ''
end

View File

@ -75,7 +75,7 @@ class MetasploitModule < Msf::Post
select(nil, nil, nil, datastore['DELAY'])
begin
data = session.espia.espia_image_get_dev_screen
rescue RequestError => e
rescue Rex::Post::Meterpreter::RequestError => e
print_error("Error taking the screenshot: #{e.class} #{e} #{e.backtrace}")
return false
end

View File

@ -43,7 +43,7 @@ class MetasploitModule < Msf::Post
begin
# Download the remote file to the temporary file
client.fs.file.download_file(temp_path, 'C:\\WINDOWS\\System32\\drivers\\etc\\hosts')
rescue RequestError => re
rescue Rex::Post::Meterpreter::RequestError => re
# If the file doesn't exist, then it's okay. Otherwise, throw the
# error.
if re.result != 2