Windows下安装metasploit-framework所遇到的问题

Windows下安装metasploit-framework所遇到的问题

首先说明,msf最好还是安装在linux下,安装在windows下的话问题实在太多了。

1. Metasploit-framework v6.2.19 Setup Wizard ended prematurely

截图如下:

出现这个的原因其实很简单:权限不够。

所以,只需要切换成administrator,或者以管理员权限运行cmd,在cmd中执行安装文件即可。

2. msfdb init失败

报错如下:

:85:in `require': 126: The specified module could not be found. - C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg_ext.so (LoadError)

from :85:in `require'

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:49:in `block in '

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:32:in `rescue in block in '

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:26:in `block in '

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:42:in `'

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:6:in `'

from :160:in `require'

from :160:in `rescue in require'

from :149:in `require'

from C:/metasploit-framework/bin/../embedded/framework/msfdb:15:in `

'

:85:in `require': 126: The specified module could not be found. - C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg_ext.so (LoadError)

from :85:in `require'

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:49:in `block in '

from C:/metasploit-framework/embedded/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/dll_directory.rb:67:in `initialize'

from C:/metasploit-framework/embedded/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/singleton.rb:12:in `new'

from C:/metasploit-framework/embedded/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/singleton.rb:12:in `add_dll_directory'

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:28:in `block in '

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:42:in `'

from C:/metasploit-framework/embedded/lib/ruby/gems/3.0.0/gems/pg-1.4.3/lib/pg.rb:6:in `'

from :160:in `require'

from :160:in `rescue in require'

from :149:in `require'

from C:/metasploit-framework/bin/../embedded/framework/msfdb:15:in `

'

:85:in `require': cannot load such file -- pg (LoadError)

from :85:in `require'

from C:/metasploit-framework/bin/../embedded/framework/msfdb:15:in `

'

出现这种报错就是因为第1个错误,也就是msf的相关文件没有安装完全。

同时,这个错误反应在msfconsole中就是使用db_status等命令时提示:No database driver installed

3.msfdb init出现以下错误:

别看数据库在启动,但是永远也启动不了。目前这个错误原因还不是很清楚,也没找到直接的解决方法。

只想到了一个替代方案:安装一个postgresql,然后让msf连接到这个安装的postgresql上。

但是后续还有很多麻烦的地方。所以,msf的数据库问题我就放弃了,还是乖乖用kali上的msf吧。

相关推荐

《侠盗猎车手5》全流程图文攻略(11)
365不给提款流水数据异常

《侠盗猎车手5》全流程图文攻略(11)

📅 09-13 👁️ 7708
三国杀牌种详览:种类与数量解析
BT365账户网址多少

三国杀牌种详览:种类与数量解析

📅 09-28 👁️ 600
我该如何爱你
365不给提款流水数据异常

我该如何爱你

📅 08-13 👁️ 3635