如何知道调用了哪个类成员函数?

问题描述

来自https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/smtp/smtp_version.rb#L26

class MetasploitModule < Msf::Auxiliary
  include Msf::Exploit::Remote::Smtp
  include Msf::Auxiliary::Scanner
  include Msf::Auxiliary::Report

  def initialize
    super(
      'Name'        => 'SMTP Banner Grabber','Description' => 'SMTP Banner Grabber','References'  =>
        [
          ['URL','http://www.ietf.org/rfc/rfc2821.txt'],],'Author'      => 'CG','License'     => MSF_LICENSE
    )
    deregister_options('MAILFROM','MAILTO')
  end

  def run_host(ip)
    res = connect
    banner_sanitized = Rex::Text.to_hex_ascii(banner.to_s)
    print_good("#{ip}:#{rport} SMTP #{banner_sanitized}")
    report_service(:host => rhost,:port => rport,:name => "smtp",:info => banner)
  end
end

我看到上面调用了 connectconnect 是成员函数吗?如何知道调用的是哪个超类的成员函数?谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)