Method: Msf::DBManager::Login#delete_logins
- Defined in:
- lib/msf/core/db_manager/login.rb
#delete_logins(opts) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/msf/core/db_manager/login.rb', line 20 def delete_logins(opts) raise ArgumentError.new("The following options are required: :ids") if opts[:ids].nil? ::ApplicationRecord.connection_pool.with_connection { deleted = [] opts[:ids].each do |login_id| login = Metasploit::Credential::Login.find(login_id) begin deleted << login.destroy rescue # refs suck elog("Forcibly deleting #{login}") deleted << login.delete end end return deleted } end |