【问题标题】:metasploit couldnt find my new created modulesmetasploit 找不到我新创建的模块
【发布时间】:2021-07-23 10:52:30
【问题描述】:

我首先创建了一个名为~/.msf6/modules/auxiliary/scanner/mssql 的新文件夹,然后我创建了一个名为 ihaz_sql.rb 的新 ruby​​ 文件 这是代码

require 'msf/core'

class MetasploitModule < Msf::Auxiliary 
  include Msf::Exploit::Remote::MSSQL
  include Msf::Auxiliary::Scanner

  def initialize
    super(
      'Name' => 'I HAZ SQL Utility',
      'Version' => '$Revision: 7243 $',
      'Description' => 'This just prints some funny stuff.',
      'Author' => 'TESTs security',
      'License' => MSF_LICENSE
    )

    deregister_options('RPORT', 'PHOST')
  end

  def run_host(ip)
    begin
      puts 'I HAZ SQL!!!!'
    end
  end
end

然后我使用msfconsole打开metasploit

并执行search ihazsearch ihaz_sql,但以上所有结果均显示 [-] No results from search

这是我正在关注的教程https://www.offensive-security.com/metasploit-unleashed/building-module/

【问题讨论】:

    标签: metasploit


    【解决方案1】:

    我本人对 Metasploit 还是很陌生,所以这个答案可能对你有帮助,也可能对你没有帮助。

    我之前遇到过这样的问题,它的“修复”只是运行命令: use &lt;full pathname to the ruby script&gt;。例如添加~/.msf6/modules/exploits/cgi/webapps/example.rb ruby​​脚本文件后,运行updatedb命令,直接运行use exploit/cgi/webapps/example.rb命令即可使用exploit。

    希望这能解决您的问题。

    【讨论】:

      猜你喜欢
      • 2018-08-28
      • 1970-01-01
      • 2017-10-26
      • 1970-01-01
      • 2019-05-22
      • 2020-01-26
      • 2016-08-17
      • 2019-08-09
      • 1970-01-01
      相关资源
      最近更新 更多