Skip to content

Commit 5ef40e3

Browse files
committed
Removed bad sets on datastore['USERNAME'] and datastore['PASSWORD']
1 parent 2b8a825 commit 5ef40e3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/auxiliary/scanner/http/owa_login.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def initialize
8686
OptString.new('AD_DOMAIN', [ false, "Optional AD domain to prepend to usernames", ''])
8787
], self.class)
8888

89-
deregister_options('BLANK_PASSWORDS', 'RHOSTS')
89+
deregister_options('BLANK_PASSWORDS', 'RHOSTS','PASSWORD','USERNAME')
9090
end
9191

9292
def cleanup
@@ -101,8 +101,6 @@ def run
101101

102102
# OWA doesn't support blank passwords or usernames!
103103
datastore['BLANK_PASSWORDS'] = false
104-
datastore['USERNAME'] = nil
105-
datastore['PASSWORD'] = nil
106104

107105
# If there's a pre-defined username/password, we need to turn off USER_AS_PASS
108106
# so that the module won't just try username:username, and then exit.
@@ -141,6 +139,7 @@ def run
141139

142140
begin
143141
each_user_pass do |user, pass|
142+
next if (user.blank? or pass.blank?)
144143
vprint_status("#{msg} Trying #{user} : #{pass}")
145144
try_user_pass({"user" => user, "domain"=>domain, "pass"=>pass, "auth_path"=>auth_path, "inbox_path"=>inbox_path, "login_check"=>login_check, "vhost"=>vhost})
146145
end
@@ -158,6 +157,8 @@ def try_user_pass(opts)
158157
vhost = opts["vhost"]
159158
domain = opts["domain"]
160159

160+
161+
161162
user = domain + '\\' + user if domain
162163

163164
headers = {

0 commit comments

Comments
 (0)