Make error checks more consistent

This commit is contained in:
William Vu
2017-02-08 18:00:44 -06:00
parent 0d56676690
commit cf395ea7b1
@@ -66,7 +66,7 @@ class MetasploitModule < Msf::Auxiliary
def run_host(_ip)
if !wordpress_and_online?
vprint_error("WordPress not detected at #{full_uri}")
print_error("WordPress not detected at #{full_uri}")
return
end
@@ -82,7 +82,7 @@ class MetasploitModule < Msf::Auxiliary
posts_to_list = list_posts
if posts_to_list.empty?
vprint_status("No posts found at #{full_uri}")
print_status("No posts found at #{full_uri}")
return
end
@@ -113,7 +113,7 @@ class MetasploitModule < Msf::Auxiliary
end
if posts_to_update.empty?
vprint_status("No posts to update at #{full_uri}")
print_status("No posts to update at #{full_uri}")
return
end
@@ -130,8 +130,6 @@ class MetasploitModule < Msf::Auxiliary
print_good("SUCCESS: #{post_url} (Post updated)")
elsif res && (error = res.get_json_document['message'])
print_error("FAILURE: #{post_url} (#{error})")
else
print_error("FAILURE: #{post_url} (Unknown error)")
end
end
end