Module: Msf::Exploit::Remote::BrowserAutopwn::AutopwnClassMethods

Defined in:
lib/msf/core/exploit/browser_autopwn.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object


21
22
23
24
25
26
27
# File 'lib/msf/core/exploit/browser_autopwn.rb', line 21

def self.extended(base)
  if base.const_defined? "Rank"
    @@autopwn_rank = base.const_get("Rank")
  else
    @@autopwn_rank = RankingName.invert['manual']
  end
end

Instance Method Details

#autopwn_info(opts = {}) ⇒ Object


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/msf/core/exploit/browser_autopwn.rb', line 33

def autopwn_info(opts={})
  # prefix_html and postfix_html are only used for noscript exploits
  # vuln_test is only used for javascript exploits
  @autopwn_opts = {}
  @autopwn_opts[:ua_name]      = opts[:ua_name] || nil
  @autopwn_opts[:ua_minver]    = opts[:ua_minver]  || opts[:ua_minversion] || nil
  @autopwn_opts[:ua_maxver]    = opts[:ua_maxver]  || opts[:ua_maxversion] || nil
  @autopwn_opts[:ua_ver]       = opts[:ua_ver]  || opts[:ua_version] || nil
  @autopwn_opts[:classid]      = opts[:classid] || opts[:clsid] || nil
  @autopwn_opts[:method]       = opts[:method]  || opts[:method] || nil
  @autopwn_opts[:javascript]   = (opts[:javascript].nil?) ? true : opts[:javascript]
  @autopwn_opts[:os_name]      = opts[:os_name] || nil
  @autopwn_opts[:os_ver]       = opts[:os_ver]  || opts[:os_version] || nil
  @autopwn_opts[:postfix_html] = opts[:postfix_html] || nil
  @autopwn_opts[:prefix_html]  = opts[:prefix_html]  || nil
  @autopwn_opts[:vuln_test]    = opts[:vuln_test] || opts[:vulntest] || ""

  @autopwn_opts[:rank]         = opts[:rank] || @@autopwn_rank
end

#autopwn_optsObject


29
30
31
# File 'lib/msf/core/exploit/browser_autopwn.rb', line 29

def autopwn_opts
  @autopwn_opts.dup
end