Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
+diff --git a/lib/wpscan/modules/wp_usernames.rb b/lib/wpscan/modules/wp_usernames.rb index ced4ff72..94f421d7 100644 --- a/lib/wpscan/modules/wp_usernames.rb +++ b/lib/wpscan/modules/wp_usernames.rb @@ -43,7 +43,7 @@ module WpUsernames nickname = get_nickname_from_url(url) elsif response.code == 200 # username in body? # get the username from the author feed URL - username = response.body[%r{/author/([^/\b]+)/?}i, 1] + username = get_username_from_response(response) nickname = get_nickname_from_response(response) end @@ -76,6 +76,16 @@ module WpUsernames nickname end + def get_username_from_response(resp) + # Feed URL with Permalinks + username = resp.body[%r{/author/([^/\b]+)/?}i, 1] + if username.nil? + # No Permalinks + username = resp.body[%r{
+ + + + + + + + + +
+
+
+
+
+
+ Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
+