We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1f612b commit 29bb788Copy full SHA for 29bb788
lib/msf/http/wordpress/login.rb
@@ -15,8 +15,13 @@ def wordpress_login(user, pass)
15
})
16
17
if res and (res.code == 301 or res.code == 302) and res.headers['Location'] == redirect
18
- return res.get_cookies
+ cookies = res.get_cookies
19
+ # Check if a valid wordpress cookie is returned
20
+ return cookies if cookies =~ /wordpress(?:_sec)?_logged_in_[^=]+=[^;]+;/i ||
21
+ cookies =~ /wordpress(?:user|pass)_[^=]+=[^;]+;/i ||
22
+ cookies =~ /wordpress_[a-z0-9]+=[^;]+;/i
23
end
24
+
25
return nil
26
27
0 commit comments