Method: Msf::DBManager::Login#delete_logins

Defined in:
lib/msf/core/db_manager/login.rb

#delete_logins(opts) ⇒ Object

Raises:

  • (ArgumentError)


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 ||
       = Metasploit::Credential::Login.find()
      begin
        deleted << .destroy
      rescue # refs suck
        elog("Forcibly deleting #{}")
        deleted << .delete
      end
    end

    return deleted
  }
end