@@ -86,7 +86,7 @@ def initialize
86
86
OptString . new ( 'AD_DOMAIN' , [ false , "Optional AD domain to prepend to usernames" , '' ] )
87
87
] , self . class )
88
88
89
- deregister_options ( 'BLANK_PASSWORDS' , 'RHOSTS' )
89
+ deregister_options ( 'BLANK_PASSWORDS' , 'RHOSTS' , 'PASSWORD' , 'USERNAME' )
90
90
end
91
91
92
92
def cleanup
@@ -101,8 +101,6 @@ def run
101
101
102
102
# OWA doesn't support blank passwords or usernames!
103
103
datastore [ 'BLANK_PASSWORDS' ] = false
104
- datastore [ 'USERNAME' ] = nil
105
- datastore [ 'PASSWORD' ] = nil
106
104
107
105
# If there's a pre-defined username/password, we need to turn off USER_AS_PASS
108
106
# so that the module won't just try username:username, and then exit.
@@ -141,6 +139,7 @@ def run
141
139
142
140
begin
143
141
each_user_pass do |user , pass |
142
+ next if ( user . blank? or pass . blank? )
144
143
vprint_status ( "#{ msg } Trying #{ user } : #{ pass } " )
145
144
try_user_pass ( { "user" => user , "domain" => domain , "pass" => pass , "auth_path" => auth_path , "inbox_path" => inbox_path , "login_check" => login_check , "vhost" => vhost } )
146
145
end
@@ -158,6 +157,8 @@ def try_user_pass(opts)
158
157
vhost = opts [ "vhost" ]
159
158
domain = opts [ "domain" ]
160
159
160
+
161
+
161
162
user = domain + '\\' + user if domain
162
163
163
164
headers = {
0 commit comments