在Ubuntu错误上运行Metasploit

时间:2016-03-31 00:52:24

标签: ruby ubuntu

http://www.darkoperator.com/installing-metasploit-in-ubunt/ 这是我用于安装过程的站点 我输入了

  

msfconsole

安装rbenv ruby​​之后(我知道它安装时间较长,但我仍然这样做了),并且出现了这个错误。

  

/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:370:in

     

解析:( /opt/metasploit-framework/config/database.yml):映射   在第9行第22行的上下文中不允许使用值

     

(精极度紧张::的SyntaxError)
          来自/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:370:in   parse_stream
          来自/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:318:in   解析
          来自/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:245:in loading
          来自/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:464:in block
  在load_file中           来自/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:464:in open
          来自/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:464:in   LOAD_FILE
          来自/opt/metasploit-framework/lib/msf/ui/console/driver.rb:164:in   初始化           来自/opt/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in   新           来自/opt/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in   司机           来自/opt/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in
  启动
          来自/opt/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in
  启动
          来自/ usr / local / bin / msfconsole:48:in

请帮助!!!

2 个答案:

答案 0 :(得分:0)

完全归功于Iraklis Mathiopoulos @ https://medium.com/@iraklis/sometimes-you-need-metasploit-running-on-a-box-with-a-public-ip-in-order-to-get-reverse-shells-to-74fda07165a5#.2tplo6bnh

安装先决条件。

  1. adduser msfdev
  2. adduser msfdev sudo
  3. apt-get update
  4. apt-get -y install autoconf bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt -dev libyaml-dev locate ncurses-dev openssl wget xsel zlib1g zlib1g-dev
  5. 使用msfdev进行安装

    1. su - msfdev
    2. wget https://raw.githubusercontent.com/iam1980/metasploit-vps-installer/master/msf_vps_installer.sh
    3. bash msf_vps_installer.sh

答案 1 :(得分:-1)

我通常总是使用免费的安装程序来安装独立版本的metasploit。

这里概述了安装。

你可以简单地git clone然后安装

git clone https://github.com/rapid7/metasploit-framework.git