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


有问题可以留言

猜你喜欢

转载自blog.csdn.net/qq_21063873/article/details/74356372