Do elog() when print_error()

bug/bundler_fix
wchen-r7 2015-12-08 11:06:59 -06:00
parent 0eab2fa98d
commit 7378e7b128
3 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class Metasploit3 < Msf::Auxiliary
# If there's no exception raised at this point, we assume the file has been removed.
print_good("#{peer}: Deleted: #{remote_path}")
rescue Rex::Proto::SMB::Exceptions::ErrorCode => e
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
print_error("#{peer}: Cannot delete #{remote_path}: #{e.message}")
end
end
@ -68,6 +69,7 @@ class Metasploit3 < Msf::Auxiliary
begin
smb_delete_files
rescue Rex::Proto::SMB::Exceptions::LoginError => e
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
print_error("#{peer}: Unable to login: #{e.message}")
end
end

View File

@ -68,6 +68,7 @@ class Metasploit3 < Msf::Auxiliary
path = store_loot("smb.shares.file", "application/octet-stream", rhost, data, fname)
print_good("#{peer}: #{remote_path} saved as: #{path}")
rescue Rex::Proto::SMB::Exceptions::ErrorCode => e
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
print_error("#{peer} Unable to download #{remote_path}: #{e.message}")
end
end
@ -77,6 +78,7 @@ class Metasploit3 < Msf::Auxiliary
begin
smb_download
rescue Rex::Proto::SMB::Exceptions::LoginError => e
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
print_error("#{peer} Unable to login: #{e.message}")
end
end

View File

@ -72,10 +72,12 @@ class Metasploit3 < Msf::Auxiliary
print_good("#{peer}: #{local_path} uploaded to #{remote_path}")
rescue Rex::Proto::SMB::Exceptions::ErrorCode => e
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
print_error("#{peer} Unable to upload #{local_path} to #{remote_path} : #{e.message}")
end
end
rescue Rex::Proto::SMB::Exceptions::LoginError => e
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
print_error("#{peer} Unable to login: #{e.message}")
end
end