Skip to content

Commit da779b1

Browse files
committed
Fix login for 9.1
1 parent c70e38a commit da779b1

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

lib/metasploit/framework/login_scanner/glassfish.rb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,9 @@ def try_glassfish_2(credential)
145145
# * :proof [String] the HTTP response body
146146
def try_glassfish_9(credential)
147147
res = try_login(credential)
148-
if res && res.code == 302
149-
opts = {
150-
'uri' => '/applications/upload.jsf',
151-
'method' => 'GET',
152-
'headers' => {
153-
'Cookie' => "JSESSIONID=#{self.jsession}"
154-
}
155-
}
156148

157-
res = send_request(opts)
158-
if res && res.code.to_i == 302 && res.headers['Location'].to_s !~ /loginError\.jsf$/
159-
return {:status => Metasploit::Model::Login::Status::SUCCESSFUL, :proof => res.body}
160-
end
149+
if res && res.code.to_i == 302 && res.headers['Location'].to_s !~ /loginError\.jsf$/
150+
return {:status => Metasploit::Model::Login::Status::SUCCESSFUL, :proof => res.body}
161151
end
162152

163153
{:status => Metasploit::Model::Login::Status::INCORRECT, :proof => res.body}

0 commit comments

Comments
 (0)