Clean up perms and whitespace for owa_login

bug/bundler_fix
William Vu 2014-04-02 01:42:28 -05:00
parent ba03890004
commit c37dbd104a
No known key found for this signature in database
GPG Key ID: E761DCB4C1629024
1 changed files with 10 additions and 13 deletions

23
modules/auxiliary/scanner/http/owa_login.rb Executable file → Normal file
View File

@ -30,7 +30,6 @@ class Metasploit3 < Msf::Auxiliary
'Brandon Knight',
'Pete (Bokojan) Arzamendi, #Outlook 2013 updates'
],
'License' => MSF_LICENSE,
'Actions' =>
[
@ -61,7 +60,7 @@ class Metasploit3 < Msf::Auxiliary
'InboxCheck' => /Inbox|location(\x20*)=(\x20*)"\\\/(\w+)\\\/logoff\.owa|A mailbox couldn\'t be found|\<a .+onclick="return JumpTo\('logoff\.aspx.+\">/
}
],
[
[
'OWA_2013',
{
'Description' => 'OWA version 2013',
@ -72,9 +71,9 @@ class Metasploit3 < Msf::Auxiliary
]
],
'DefaultAction' => 'OWA_2010',
'DefaultOptions' => {
'SSL' => true
}
'DefaultOptions' => {
'SSL' => true
}
)
@ -162,8 +161,6 @@ class Metasploit3 < Msf::Auxiliary
vhost = opts["vhost"]
domain = opts["domain"]
user = domain + '\\' + user if domain
headers = {
@ -208,8 +205,8 @@ class Metasploit3 < Msf::Auxiliary
return :abort
end
if action.name == "OWA_2013"
#Check for a response code to make sure login was valid. Changes from 2010 to 2013.
#Check if the password needs to be changed.
#Check for a response code to make sure login was valid. Changes from 2010 to 2013.
#Check if the password needs to be changed.
if res.headers['location'] =~ /expiredpassword/
print_good("#{msg} SUCCESSFUL LOGIN. '#{user}' : '#{pass}': NOTE password change required")
report_hash = {
@ -225,13 +222,13 @@ class Metasploit3 < Msf::Auxiliary
return :next_user
end
#No password change required moving on.
#No password change required moving on.
reason = res.headers['location'].split('reason=')[1]
if reason == nil
if reason == nil
headers['Cookie'] = 'PBack=0;' << res.get_cookies
else
else
#Login didn't work. no point on going on.
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")
return :Skip_pass
end
else