Skip to content

Commit 4b48045

Browse files
committed
Fixes issues based on feedback
This commit addresses comments made by @jvazquez-r7.
1 parent af40e95 commit 4b48045

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/auxiliary/scanner/http/owa_login.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,25 +247,26 @@ def get_ad_domain
247247
'uri' => "/#{url}",
248248
'method' => 'GET',
249249
'headers' => {"Authorization" => "NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw=="}
250-
}, 25)
250+
})
251251

252252
if not res
253253
print_error("#{msg} HTTP Connection Error, Aborting")
254-
return :abort
254+
return nil
255255
end
256256

257257
if res and res.code == 401 and res['WWW-Authenticate'].match(/^NTLM/i)
258258
hash = res['WWW-Authenticate'].split('NTLM ')[1]
259259
domain = Rex::Proto::NTLM::Message.parse(Rex::Text.decode_base64(hash))[:target_name].value().gsub(/\0/,'')
260260
print_good("Found target domain: " + domain)
261-
break
261+
return domain
262262
end
263263
end
264264

265265
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
266266
print_error("#{msg} HTTP Connection Failed, Aborting")
267-
return :abort
267+
return nil
268268
end
269+
269270
return domain
270271
end
271272

0 commit comments

Comments
 (0)