th3PythonG3nteleman
@th3PythonG3nteleman
scriptkiddie

Как решить проблему с database.yml в Metasploit?

Не могу подключить базу msf.
Каждый раз она отваливается при выходе.

db_status
msf6 > db_status
[-] Error while running command db_status: FATAL: role "root" does not exist

Call stack:
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:696:in `rescue in connect'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:691:in `connect'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in `new_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/activerecord-5.2.4.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:413:in `with_connection'
/opt/metasploit-framework/embedded/framework/lib/msf/core/db_manager/connection.rb:118:in `connection_established?'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/data_service/proxy/core.rb:136:in `method_missing'
/opt/metasploit-framework/embedded/framework/lib/msf/ui/console/command_dispatcher/db.rb:1683:in `cmd_db_status'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:525:in `run_command'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:476:in `block in run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:470:in `each'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:470:in `run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/shell.rb:158:in `run'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/console.rb:48:in `start'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/base.rb:82:in `start'
/opt/metasploit-framework/bin/../embedded/framework/msfconsole:23:in `'


db_connect
msf6 > db_connect -y database.yml
Connected to the database specified in the YAML file.
msf6 >

  • Вопрос задан
  • 37 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы