From c37dbd104adcdf5783e99700e295015f84e3f3f9 Mon Sep 17 00:00:00 2001 From: William Vu Date: Wed, 2 Apr 2014 01:42:28 -0500 Subject: [PATCH] Clean up perms and whitespace for owa_login --- modules/auxiliary/scanner/http/owa_login.rb | 23 +++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) mode change 100755 => 100644 modules/auxiliary/scanner/http/owa_login.rb diff --git a/modules/auxiliary/scanner/http/owa_login.rb b/modules/auxiliary/scanner/http/owa_login.rb old mode 100755 new mode 100644 index c0d2279c39..8240a0ae11 --- a/modules/auxiliary/scanner/http/owa_login.rb +++ b/modules/auxiliary/scanner/http/owa_login.rb @@ -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|\/ } ], - [ + [ '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