Skip to content

Commit 0d56676

Browse files
committed
Add error check for listing posts
1 parent b06895b commit 0d56676

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/auxiliary/scanner/http/wordpress_content_injection.rb

Lines changed: 3 additions & 1 deletion
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-
print_error("WordPress not detected at #{full_uri}")
69+
vprint_error("WordPress not detected at #{full_uri}")
7070
return
7171
end
7272

@@ -157,6 +157,8 @@ def list_posts
157157
password: post['content']['protected']
158158
}
159159
end
160+
elsif res && (error = res.get_json_document['message'])
161+
vprint_error("Failed to list posts: #{error}")
160162
end
161163

162164
posts

0 commit comments

Comments
 (0)