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.
2 parents 722d9a2 + ef7434b commit c0efb7bCopy full SHA for c0efb7b
lib/metasploit/framework/login_scanner/gitlab.rb
@@ -61,6 +61,10 @@ def attempt_login(credential)
61
local_session_cookie = res.get_cookies.scan(/(_gitlab_session=[A-Za-z0-9%-]+)/).flatten[0]
62
auth_token = res.body.scan(/<input name="authenticity_token" type="hidden" value="(.*?)"/).flatten[0]
63
64
+ # New versions of GitLab use an alternative scheme
65
+ # Try it, if the old one was not successfull
66
+ auth_token = res.body.scan(/<input type="hidden" name="authenticity_token" value="(.*?)"/).flatten[0] unless auth_token
67
+
68
fail RuntimeError, 'Unable to get Session Cookie' unless local_session_cookie
69
fail RuntimeError, 'Unable to get Authentication Token' unless auth_token
70
0 commit comments