• 更新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上的版本

  • 相关阅读:
    《网络》:关于计算机网络的必备常识【无序】(不定时更新)
    《网络》:设置三个密码:通过console口连接设备,进入特权模式,登录Telnet
    《网络》:交换机基本配置命令
    启动eclipse时出现“Failed to load the JNI shared library jvm.dll”错误及解决
    java之servlet小记
    Nokia大事录
    Android之HandlerThread
    Android进程间的通信之AIDL
    Android进程间的通信之Messenger
    Loaders
  • 原文地址:https://www.cnblogs.com/sarshes/p/5020157.html
Copyright © 2020-2023  润新知