Start Postgresql within Metasploit 4.4
Following the instruction in the book "Metasploit The Penetration Tester's Guide", i used to study penetration, i am stucked at page 20 when practice this instruction:
========================
root@bt~#/etc/init.d/postgresql-8.3 start
At first, postgresql-8.3 cannot be found under the dir named "/etc/init.d/".
After a short time of searching by google, i found this article:
http://www.pentest-labs.org/blog/backtrack-5-metasploit-and-postgresql
Intergrated with my environment, the final solution are as follows:
1. check your environment:
msf > version Framework: 4.4.0-dev.15205 Console : 4.4.0-dev.15168
2. find your db config file
root@bt:/opt/framework/msf3# locate database.yml /home/pentest/misc/dradis/server/config/database.yml /home/pentest/misc/dradis/server/config/database.yml.template /home/pentest/misc/dradis/server/vendor/plugins/acts_as_tree/test/database.yml /home/pentest/telephony/warvox/web/config/database.yml /home/pentest/telephony/warvox/web/config/.svn/text-base/database.yml.svn-base /opt/framework/config/database.yml /opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/railties-3.2.2/guides/code/getting_started/config/database.yml
3. db_connect
msf > help db_connect [*] Usage: db_connect <user:pass>@<host:port>/<database> [*] OR: db_connect -y [path/to/database.yml] // it's graceful, enh? There is no necessary to remember your password any more. [*] Examples: [*] db_connect user@metasploit3 [*] db_connect user:pass@192.168.0.2/metasploit3 [*] db_connect user:pass@192.168.0.2:1500/metasploit3 msf > db_connect -y /opt/framework/config/database.yml msf > db_status [*] postgresql connected to msf3
embrace your enjoyment with msf now~
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步