Skip to content

Commit cf395ea

Browse files
committed
Make error checks more consistent
1 parent 0d56676 commit cf395ea

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

modules/auxiliary/scanner/http/wordpress_content_injection.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def check_host(_ip)
6666

6767
def run_host(_ip)
6868
if !wordpress_and_online?
69-
vprint_error("WordPress not detected at #{full_uri}")
69+
print_error("WordPress not detected at #{full_uri}")
7070
return
7171
end
7272

@@ -82,7 +82,7 @@ def do_list
8282
posts_to_list = list_posts
8383

8484
if posts_to_list.empty?
85-
vprint_status("No posts found at #{full_uri}")
85+
print_status("No posts found at #{full_uri}")
8686
return
8787
end
8888

@@ -113,7 +113,7 @@ def do_update
113113
end
114114

115115
if posts_to_update.empty?
116-
vprint_status("No posts to update at #{full_uri}")
116+
print_status("No posts to update at #{full_uri}")
117117
return
118118
end
119119

@@ -130,8 +130,6 @@ def do_update
130130
print_good("SUCCESS: #{post_url} (Post updated)")
131131
elsif res && (error = res.get_json_document['message'])
132132
print_error("FAILURE: #{post_url} (#{error})")
133-
else
134-
print_error("FAILURE: #{post_url} (Unknown error)")
135133
end
136134
end
137135
end

0 commit comments

Comments
 (0)