Skip to content

Commit 63fca1b

Browse files
committed
Make some datastore options required
1 parent 436ac70 commit 63fca1b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

modules/auxiliary/scanner/http/joomla_bruteforce_login.rb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
##
55

66
require 'msf/core'
7-
require 'rex/proto/ntlm/message'
8-
97

108
class Metasploit3 < Msf::Auxiliary
119

@@ -35,10 +33,10 @@ def initialize
3533
OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line",
3634
File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]),
3735
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"])
4240
], self.class)
4341

4442
register_autofilter_ports([80, 443])
@@ -169,7 +167,6 @@ def do_web_login(user, pass)
169167

170168
if res
171169
vprint_status("#{target_url} - Login Response #{res.code}")
172-
173170
if res.redirect? && res.headers['Location']
174171
path = res.headers['Location']
175172
vprint_status("#{target_url} - Following redirect to #{path}...")
@@ -217,7 +214,7 @@ def determine_result(response)
217214
return :abort unless response.code
218215

219216
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'])
221218
return :fail
222219
else
223220
return :success

0 commit comments

Comments
 (0)