diff --git a/CHANGELOG b/CHANGELOG index fa626f07b..5ccfcea1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o [NSE] Made http-wordpress-enum.nse able to get names of users who + have no posts. [Duarte Silva] + o Increased hop distance estimates from OS detection by one. The distance now counts the number of hops including the final one to the target, not just the number of intermediate nodes. The IPv6 diff --git a/scripts/http-wordpress-enum.nse b/scripts/http-wordpress-enum.nse index 07b090050..ee7b9fadd 100644 --- a/scripts/http-wordpress-enum.nse +++ b/scripts/http-wordpress-enum.nse @@ -51,7 +51,12 @@ local function get_wp_user(host, port, path, id) if req.status then stdnse.print_debug(1, "%s: User id #%s returned status %s", SCRIPT_NAME, id, req.status) if req.status == 301 then - local _, _, user = string.find(req.header.location, 'http://.*/.*/(.*)/') + local _, _, user = string.find(req.header.location, 'https?://.*/.*/(.*)/') + return user + elseif req.status == 200 then + -- Users with no posts get a 200 response, but the name is in an RSS link. + -- http://seclists.org/nmap-dev/2011/q3/812 + local _, _, user = string.find(req.body, 'https?://.-/author/(.-)/feed/') return user end end