Skip to content

Commit 1455d4e

Browse files
committed
Fix AUTH_TIME
1 parent 7c57277 commit 1455d4e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/auxiliary/scanner/http/owa_login.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def initialize
8282
OptInt.new('RPORT', [ true, "The target port", 443]),
8383
OptAddress.new('RHOST', [ true, "The target address", true]),
8484
OptBool.new('ENUM_DOMAIN', [ true, "Automatically enumerate AD domain using NTLM authentication", true]),
85-
OptBool.new('AUTH_TIME', [ false, "Time HTTP authentication response(in seconds)", true]),
85+
OptBool.new('AUTH_TIME', [ false, "Check HTTP authentication response time", true])
8686
], self.class)
8787

8888

@@ -165,7 +165,9 @@ def try_user_pass(opts)
165165
end
166166

167167
begin
168-
start_time = Time.now
168+
if datastore['AUTH_TIME']
169+
start_time = Time.now
170+
end
169171

170172
res = send_request_cgi({
171173
'encode' => true,
@@ -175,7 +177,7 @@ def try_user_pass(opts)
175177
'data' => data
176178
})
177179

178-
if (datastore['AUTH_TIME'].to_s.match(/^(t|y|1)/i))
180+
if datastore['AUTH_TIME']
179181
elapsed_time = Time.now - start_time
180182
end
181183
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT

0 commit comments

Comments
 (0)