求教!BT5中启用MSF4.0无法创建数据库!?
各位,大大。小弟最近才开始使用BT5,中的msf,现碰上一些问题,请教各位大大帮忙解决。在网上看了教程我发现我用"?"帮助命令之后只能看到几个数据库命令,没有db_del...
各位,大大。小弟最近才开始使用BT5,中的msf,现碰上一些问题,请教各位大大帮忙解决。
在网上看了教程我发现我用"?"帮助命令之后只能看到几个数据库命令,没有db_del之类的命令,而且我用db_nmap扫描之后的结果也无法直接在hosts中看到,貌似必须创建一个数据库才能有,现在我在创建数据库的时候发生了问题。
Database Backend Commands
=========================
Command Description
------- -----------
creds List all credentials in the database
db_connect Connect to an existing database
db_disconnect Disconnect from the current database instance
db_driver Specify a database driver
db_export Export a file containing the contents of the database
db_import Import a scan result file (filetype will be auto-detected)
db_nmap Executes nmap and records the output automatically
db_status Show the current database status
hosts List all hosts in the database
loot List all loot in the database
notes List all notes in the database
services List all services in the database
vulns List all vulnerabilities in the database
workspace Switch between database workspaces
版本:
msf > version
Framework: 4.2.0-dev.14161
Console : 4.2.0-dev.14649
msf > db_status • postgresql connected to msf3
msf > db_driver
• Active Driver: postgresql
• Available: postgresql
因为4.0之后已经没有db_create命令了,在网上看了下貌似只能通过db_connect 来直接创建了,我执行之后就报了如下错误,请各位大大看一下。
msf > db_connect TEST
[-] Error while running command db_connect: Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
Call stack:
/opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1461:in `db_connect_postgresql'
/opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1325:in `cmd_db_connect'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:380:in `run_command'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:342:in `block in run_single'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in `each'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in `run_single'
/opt/framework3/msf3/lib/rex/ui/text/shell.rb:199:in `run'
/opt/framework3/msf3/msfconsole:134:in `<main>'
msf > db_status
• postgresql selected, no connection 展开
在网上看了教程我发现我用"?"帮助命令之后只能看到几个数据库命令,没有db_del之类的命令,而且我用db_nmap扫描之后的结果也无法直接在hosts中看到,貌似必须创建一个数据库才能有,现在我在创建数据库的时候发生了问题。
Database Backend Commands
=========================
Command Description
------- -----------
creds List all credentials in the database
db_connect Connect to an existing database
db_disconnect Disconnect from the current database instance
db_driver Specify a database driver
db_export Export a file containing the contents of the database
db_import Import a scan result file (filetype will be auto-detected)
db_nmap Executes nmap and records the output automatically
db_status Show the current database status
hosts List all hosts in the database
loot List all loot in the database
notes List all notes in the database
services List all services in the database
vulns List all vulnerabilities in the database
workspace Switch between database workspaces
版本:
msf > version
Framework: 4.2.0-dev.14161
Console : 4.2.0-dev.14649
msf > db_status • postgresql connected to msf3
msf > db_driver
• Active Driver: postgresql
• Available: postgresql
因为4.0之后已经没有db_create命令了,在网上看了下貌似只能通过db_connect 来直接创建了,我执行之后就报了如下错误,请各位大大看一下。
msf > db_connect TEST
[-] Error while running command db_connect: Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
Call stack:
/opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1461:in `db_connect_postgresql'
/opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1325:in `cmd_db_connect'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:380:in `run_command'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:342:in `block in run_single'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in `each'
/opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in `run_single'
/opt/framework3/msf3/lib/rex/ui/text/shell.rb:199:in `run'
/opt/framework3/msf3/msfconsole:134:in `<main>'
msf > db_status
• postgresql selected, no connection 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询