Merge branch 'feature/deprecated-module-mixin' of github.com:jlee-r7/metasploit-framework into jlee-r7-feature/deprecated-module-mixin
commit
d17a6f99e5
|
@ -0,0 +1,58 @@
|
|||
|
||||
module Msf::Module::Deprecated
|
||||
|
||||
# Additional class methods for deprecated modules
|
||||
module ClassMethods
|
||||
# Mark this module as deprecated
|
||||
#
|
||||
# Any time this module is run it will print warnings to that effect.
|
||||
#
|
||||
# @param deprecation_date [Date,#to_s] The date on which this module will
|
||||
# be removed
|
||||
# @param replacement_module [String] The name of a module that users
|
||||
# should be using instead of this deprecated one
|
||||
# @return [void]
|
||||
def deprecated(deprecation_date=nil, replacement_module=nil)
|
||||
# Yes, class instance variables.
|
||||
@replacement_module = replacement_module
|
||||
@deprecation_date = deprecation_date
|
||||
end
|
||||
|
||||
# The name of a module that users should be using instead of this
|
||||
# deprecated one
|
||||
#
|
||||
# @return [String,nil]
|
||||
# @see ClassMethods#deprecated
|
||||
def replacement_module; @replacement_module; end
|
||||
|
||||
# The date on which this module will be removed
|
||||
#
|
||||
# @return [Date,nil]
|
||||
# @see ClassMethods#deprecated
|
||||
def deprecation_date; @deprecation_date; end
|
||||
end
|
||||
|
||||
# (see ClassMethods#replacement_module)
|
||||
def replacement_module; self.class.replacement_module; end
|
||||
# (see ClassMethods#deprecation_date)
|
||||
def deprecation_date; self.class.deprecation_date; end
|
||||
|
||||
# Extends with {ClassMethods}
|
||||
def self.included(base)
|
||||
base.extend(ClassMethods)
|
||||
end
|
||||
|
||||
def setup
|
||||
print_warning("*"*72)
|
||||
print_warning("*%red"+"This module is deprecated!".center(70)+"%clr*")
|
||||
if deprecation_date
|
||||
print_warning("*"+"It will be removed on or about #{deprecation_date}".center(70)+"*")
|
||||
end
|
||||
if replacement_module
|
||||
print_warning("*"+"Use #{replacement_module} instead".center(70)+"*")
|
||||
end
|
||||
print_warning("*"*72)
|
||||
super
|
||||
end
|
||||
|
||||
end
|
|
@ -10,6 +10,10 @@ require 'rex'
|
|||
|
||||
class Metasploit3 < Msf::Post
|
||||
|
||||
require 'msf/core/module/deprecated'
|
||||
include Msf::Module::Deprecated
|
||||
deprecated Date.new(2013,1,4), "exploit/windows/local/bypassuac"
|
||||
|
||||
def initialize(info={})
|
||||
super( update_info( info,
|
||||
'Name' => 'Windows Escalate UAC Protection Bypass',
|
||||
|
@ -36,12 +40,6 @@ class Metasploit3 < Msf::Post
|
|||
end
|
||||
|
||||
def run
|
||||
print_error("***********************************************")
|
||||
print_error("* *")
|
||||
print_error("* Module will be depricated on Jan 4 2013 *")
|
||||
print_error("* Please use exploits/windows/local/bypassuac *")
|
||||
print_error("* *")
|
||||
print_error("***********************************************")
|
||||
vuln = false
|
||||
sysinfo = session.sys.config.sysinfo
|
||||
winver = sysinfo["OS"]
|
||||
|
|
|
@ -12,6 +12,11 @@ require 'zlib'
|
|||
|
||||
|
||||
class Metasploit3 < Msf::Post
|
||||
|
||||
require 'msf/core/module/deprecated'
|
||||
include Msf::Module::Deprecated
|
||||
deprecated Date.new(2013,6,1), "exploit/windows/local/ms10_092_schelevator"
|
||||
|
||||
include Msf::Post::Common
|
||||
|
||||
def initialize(info={})
|
||||
|
|
|
@ -8,10 +8,13 @@
|
|||
require 'msf/core'
|
||||
require 'msf/core/post/windows/services'
|
||||
require 'rex'
|
||||
require 'msf/core//post/windows/services'
|
||||
|
||||
class Metasploit3 < Msf::Post
|
||||
|
||||
require 'msf/core/module/deprecated'
|
||||
include Msf::Module::Deprecated
|
||||
deprecated Date.new(2013,1,10), "exploit/windows/local/service_permissions"
|
||||
|
||||
include ::Msf::Post::Windows::Services
|
||||
def initialize(info={})
|
||||
super( update_info( info,
|
||||
|
@ -42,12 +45,6 @@ class Metasploit3 < Msf::Post
|
|||
end
|
||||
|
||||
def run
|
||||
print_error("*********************************************************")
|
||||
print_error("* *")
|
||||
print_error("* Module will be depricated on Jan 10 2013 *")
|
||||
print_error("* Please use exploits/windows/local/service_permissions *")
|
||||
print_error("* *")
|
||||
print_error("*********************************************************")
|
||||
print_status("running")
|
||||
|
||||
lhost = datastore["LHOST"] || Rex::Socket.source_address
|
||||
|
|
Loading…
Reference in New Issue