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~

posted @   handt  阅读(587)  评论(2编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示