mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
o [NSE] Made http-wordpress-enum.nse able to get names of users who
have no posts. [Duarte Silva]
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# Nmap Changelog ($Id$); -*-text-*-
|
# 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
|
o Increased hop distance estimates from OS detection by one. The
|
||||||
distance now counts the number of hops including the final one to
|
distance now counts the number of hops including the final one to
|
||||||
the target, not just the number of intermediate nodes. The IPv6
|
the target, not just the number of intermediate nodes. The IPv6
|
||||||
|
|||||||
@@ -51,7 +51,12 @@ local function get_wp_user(host, port, path, id)
|
|||||||
if req.status then
|
if req.status then
|
||||||
stdnse.print_debug(1, "%s: User id #%s returned status %s", SCRIPT_NAME, id, req.status)
|
stdnse.print_debug(1, "%s: User id #%s returned status %s", SCRIPT_NAME, id, req.status)
|
||||||
if req.status == 301 then
|
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
|
return user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user