Do elog() when print_error()
parent
0eab2fa98d
commit
7378e7b128
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue