1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-02 19:49:11 +00:00

Converts the login check from a negative test to a positive one

This commit is contained in:
nnposter
2017-04-09 15:10:56 +00:00
parent b80141d69e
commit 558b70645b

View File

@@ -529,9 +529,10 @@ table.insert(fingerprints, {
{username = "beef", password = "beef"}
},
login_check = function (host, port, path, user, pass)
return try_http_post_login(host, port, path, "login",
"{%s*success%s*:%s*false%s*}",
{["username-cfrm"]=user, ["password-cfrm"]=pass})
local resp = http_post_simple(host, port, url.absolute(path, "login"), nil,
{["username-cfrm"]=user, ["password-cfrm"]=pass})
return resp.status == 200
and (resp.body or ""):find("{%s*success%s*:%s*true%s*}")
end
})