zoukankan      html  css  js  c++  java
  • 更新Kali中的metasploit

    1. Kali中的metasploit默认使用apt-get进行更新,即metasploit路径中存在.apt文件,可以查看一下其中内容。

    如果你确定自己的版本比metasploit官网上的版本低,并且在执行msfupdate时出现了如下情况,那就要修改apt源了

    # msfupdate 
    [*]
    [*] Attempting to update the Metasploit Framework...
    [*]
    
    [*] Checking for updates via the APT repository
    [*] Note: expect weekly(ish) updates using this method
    [*] No updates available

    在/etc/apt/sources.list中添加如下内容

    deb http://http.kali.org/kali sana main non-free contrib
    deb http://security.kali.org/kali-security sana/updates main contrib non-free
    
    deb-src http://http.kali.org/kali sana main non-free contrib
    deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

    deb http://http.kali.org/kali kali-rolling main contrib non-free # 现在的kali只有这一个活跃版本,之前的sana之类的版本可能已经得不到及时的更新了

    然后

    apt-get update
    apt-get upgrade  # kali-rolling版本执行升级操作将导致需要升级大量的软件和库,不建议这样做,需要哪些软件就升级哪些软件比较实际

    就可以完成更新了,当然此时msfupdate命令也可以正常使用了。

    更新完毕后,有时会出现执行msfconsole失败,并且提示需要执行bundle install之类的操作,这意味着要更新ruby相关的库文件。

    介于在国内访问官方的源非常不流畅,所以我们需要将源更换为国内的代理:

    # gem sources --remove https://rubygems.org/ -a https://ruby.taobao.org
    # gem sources -l
    # *** CURRENT SOURCES ***
    # https://ruby.taobao.org/

    或者通过下面命令将rubygems.org映射到国内代理:

    # bundle config mirror.https://rubygems.org https://ruby.taobao.org

    然后跳转到/usr/share/metasploit-framework目录,执行bundle install命令,完成后msfconsole即可正常执行。

    2. 希望通过git更新,则可以下载github上的版本

  • 相关阅读:
    【curl】Linux下命令行curl详解
    【httpwatch】httpwatch对测试的应用
    【岗位知识小记录】
    linux系统修改route路由
    yum无法正常安装,提示如下 There are no enabled repos Run "yum repolist all"
    Ubuntu14.04切换root用户
    【AAA】AAA协议介绍
    各种工具网站
    任职资格:
    推荐一个下载mac应用的良心网站
  • 原文地址:https://www.cnblogs.com/sarshes/p/5020157.html
Copyright © 2011-2022 走看看