Land #10165, Fix missing RequestError in a few post modules
parent
95ee536705
commit
ce48ff4382
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue