Land #10165, Fix missing RequestError in a few post modules

4.x
Wei Chen 2018-06-15 15:38:49 -05:00 committed by Metasploit
parent 95ee536705
commit ce48ff4382
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
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