debian、ubuntu安装metasploit通用方法

网上有很多方法让去github上下载安装,这方法的确可以但是特别慢,更新也特别慢,这里写下比较快的方法

1.添加kali源

 

vim /etc/apt/sources.list

在原有源的基础上添加国内的kali源,这里使用的腾讯云的源 //腾讯源内网与外网域名不一样

 

deb http://mirrors.cloud.tencent.com/kali/ kali-rolling main contrib non-free deb-src http://mirrors.cloud.tencent.com/kali/ kali-rolling main contrib non-free

2.添加数字签名

 

wget -q -O – https://archive.kali.org/archive-key.asc | apt-key add

3.安装msf即可

 

apt update&&apt install metaspliot-framework -y

更新msf

 

apt update; apt install metasploit-framework

添加数字证书

$wget archive.kali.org/archive-key.asc   //下载签名
$apt-key add archive-key.asc   //安装签名

更新包列表

$apt-get update

0x2 安装postgresql

添加postgresql源

deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main

安装postgresql

$wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

//添加数字证书

$apt-get update
$apt-get install postgresql

0x3 安装metasploit-framework

$apt-get install metasploit-framework #so easy

0x4 初始化metasploit-framework

$msfdb init 

0x5 完成安装,检查

msf启动

$msfconsole

检测数据库连接

msf>db_status

出现postgresql connected to xxx说明数据库连接正常

报错
warning: warning: deprecated Object#=~ is called on Integer; it always returns nil。
这个是我报告问题的路径,打开文件,跳到84行
互换SIMPLE_INT与config,后添加.to_s(此处由于不将config,msfconsole 链接数据库是会报错,提示整型没有转字符串,导致打开无法链接)

     def self.type_cast_config_to_integer(config)
              if SIMPLE_INT =~ config.to_s
          config.to_i
        else
          config
        end
      end

 

kali下其他软件也可以通过该方式安装在其他debian系的系统上

未经允许不得转载:萌萌guo angline - Apprentissage » debian、ubuntu安装metasploit通用方法

赞 (1) 打赏

评论 0

Protected with IP Blacklist CloudIP Blacklist Cloud

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏