metasploit 使用search报错

错误如下:


msf > search

[-] Error while running command search: undefined method `print_warning' for #<Framework (0 sessions, 0 jobs, 0 plugins)>


Call stack:
/opt/metasploit-framework/embedded/framework/lib/msf/core/framework.rb:238:in `search'
/opt/metasploit-framework/embedded/framework/lib/msf/ui/console/command_dispatcher/modules.rb:403:in `cmd_search'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:430:in `run_command'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:392:in `block in run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `each'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/shell.rb:205:in `run'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/console.rb:48:in `start'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/base.rb:82:in `start'

/opt/metasploit-framework/bin/../embedded/framework/msfconsole:48:in `<main>'


解决方式:

修改该文件:

sudo vim /opt/metasploit-framework/embedded/framework/lib/msf/core/framework.rb


增加一个 缺少的 print_warning 函数即可:


def print_warning(str)
      print str
end


有问题可以留言

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值