先安利一下Deepin,整合了各种常用的软件,使用Linux不再迷茫~~
女神镇楼
1. 获取kali源
vim /etc/apt/sources.list
添加源
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
2. 安装msf
sudo apt-get install metasploit-framework
3. 配置postgresql
- 设置密码
sudo passwd -d postgres
提示密码过期信息已更改
create user msf with password 'msfadmin' nocreatedb;
- 进入数据库管理
psql -U postgres -h 127.0.0.1
- 创建密码是msf的用户msf
记住这个密码,下面有用的哦
create user msf with password 'msf' nocreatedb;
- 创建数据库
create database msf with owner=msf;
4. 配置msf数据库的连接
在msf安装目录下的 config目录下,即/usr/share/metasploit-framework/config$
创建database.yml
文件
production:
adapter: postgresql
database: msf
username: msf
password: msf #我在上一步创建用户的时候 设置的密码
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5
5. 在msfconsole下手动连接数据库
db_connect -y /usr/share/metasploit-framework/config/database.yml
然后
db_status
提示postgresql connected to msf
连接成功!!