|
4 | 4 | ##
|
5 | 5 |
|
6 | 6 | require 'msf/core'
|
7 |
| -require 'rex/proto/ntlm/message' |
8 |
| - |
9 | 7 |
|
10 | 8 | class Metasploit3 < Msf::Auxiliary
|
11 | 9 |
|
@@ -35,10 +33,10 @@ def initialize
|
35 | 33 | OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
|
36 | 34 | File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
|
37 | 35 | OptString.new('AUTH_URI', [ true, "The URI to authenticate against", "/administrator/index.php" ]),
|
38 |
| - OptString.new('FORM_URI', [ false, "The FORM URI to authenticate against" , "/administrator"]), |
39 |
| - OptString.new('USER_VARIABLE', [ false, "The name of the variable for the user field", "username"]), |
40 |
| - OptString.new('PASS_VARIABLE', [ false, "The name of the variable for the password field" , "passwd"]), |
41 |
| - OptString.new('WORD_ERROR', [ false, "The word of message for detect that login fail","mod-login-username"]) |
| 36 | + OptString.new('FORM_URI', [ true, "The FORM URI to authenticate against" , "/administrator"]), |
| 37 | + OptString.new('USER_VARIABLE', [ true, "The name of the variable for the user field", "username"]), |
| 38 | + OptString.new('PASS_VARIABLE', [ true, "The name of the variable for the password field" , "passwd"]), |
| 39 | + OptString.new('WORD_ERROR', [ true, "The word of message for detect that login fail","mod-login-username"]) |
42 | 40 | ], self.class)
|
43 | 41 |
|
44 | 42 | register_autofilter_ports([80, 443])
|
@@ -169,7 +167,6 @@ def do_web_login(user, pass)
|
169 | 167 |
|
170 | 168 | if res
|
171 | 169 | vprint_status("#{target_url} - Login Response #{res.code}")
|
172 |
| - |
173 | 170 | if res.redirect? && res.headers['Location']
|
174 | 171 | path = res.headers['Location']
|
175 | 172 | vprint_status("#{target_url} - Following redirect to #{path}...")
|
@@ -217,7 +214,7 @@ def determine_result(response)
|
217 | 214 | return :abort unless response.code
|
218 | 215 |
|
219 | 216 | if [200, 301, 302].include?(response.code)
|
220 |
| - if response.to_s.include? datastore['WORD_ERROR'] |
| 217 | + if response.to_s.include?(datastore['WORD_ERROR']) |
221 | 218 | return :fail
|
222 | 219 | else
|
223 | 220 | return :success
|
|
0 commit comments