allow the browser_autopwn mixin access to exploit modules' Rank constants. see 628
git-svn-id: file:///home/svn/framework3/trunk@7876 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
f3a0bbc6d6
commit
f1a5103b32
|
@ -15,16 +15,25 @@ module Msf
|
|||
module Exploit::Remote::BrowserAutopwn
|
||||
|
||||
include Msf::Auxiliary::Report
|
||||
|
||||
|
||||
# this is the magic
|
||||
def self.included(base)
|
||||
base.extend(Autopwn)
|
||||
base.extend(AutopwnClassMethods)
|
||||
end
|
||||
|
||||
module Autopwn
|
||||
module AutopwnClassMethods
|
||||
def self.extended(base)
|
||||
if base.const_defined? "Rank"
|
||||
@@autopwn_rank = base.const_get("Rank")
|
||||
else
|
||||
@@autopwn_rank = RankingName.invert['manual']
|
||||
end
|
||||
end
|
||||
|
||||
def autopwn_opts
|
||||
@autopwn_opts.dup
|
||||
end
|
||||
|
||||
def autopwn_info(opts={})
|
||||
# prefix_html and postfix_html are only used for noscript exploits
|
||||
# vuln_test is only used for javascript exploits
|
||||
|
@ -39,8 +48,9 @@ module Exploit::Remote::BrowserAutopwn
|
|||
@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[:rank] = opts[:rank] || nil
|
||||
@autopwn_opts[:vuln_test] = opts[:vuln_test] || opts[:vulntest] || ""
|
||||
|
||||
@autopwn_opts[:rank] = opts[:rank] || @@autopwn_rank
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue