error handling adjustments on loggedin_users.rb

unstable
Royce Davis 2012-11-09 08:33:05 -06:00
parent 7ce3859e8c
commit a889c8ae99
1 changed files with 2 additions and 7 deletions

View File

@ -53,15 +53,9 @@ class Metasploit3 < Msf::Auxiliary
text = "\\WINDOWS\\Temp\\#{Rex::Text.rand_text_alpha(16)}.txt" text = "\\WINDOWS\\Temp\\#{Rex::Text.rand_text_alpha(16)}.txt"
smbshare = datastore['SMBSHARE'] smbshare = datastore['SMBSHARE']
#Try and Connect to the target
begin
connect()
rescue
return
end
#Try and authenticate with given credentials #Try and authenticate with given credentials
begin begin
connect()
smb_login() smb_login()
rescue StandardError => autherror rescue StandardError => autherror
print_error("#{ip} - #{autherror}") print_error("#{ip} - #{autherror}")
@ -77,6 +71,7 @@ class Metasploit3 < Msf::Auxiliary
check_hku_entry(key, ip, smbshare, cmd, text, bat) check_hku_entry(key, ip, smbshare, cmd, text, bat)
end end
cleanup_after(smbshare, ip, cmd, text, bat) cleanup_after(smbshare, ip, cmd, text, bat)
disconnect()
end end