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


有問題可以留言

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章