Module: Msf::Exploit::Remote::AutoCheck

Defined in:
lib/msf/core/exploit/remote/auto_check.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(_base) ⇒ Object

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/msf/core/exploit/remote/auto_check.rb', line 6

def self.included(_base)
  raise NotImplementedError, "#{name} should not be included, it should be prepended"
end

Instance Method Details

#exploitObject



25
26
27
28
29
# File 'lib/msf/core/exploit/remote/auto_check.rb', line 25

def exploit
  with_prepended_auto_check do
    super
  end
end

#initialize(info = {}) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/msf/core/exploit/remote/auto_check.rb', line 10

def initialize(info = {})
  super

  register_advanced_options([
    OptBool.new('AutoCheck', [false, 'Run check before exploit', true]),
    OptBool.new('ForceExploit', [false, 'Override check result', false])
  ])
end

#runObject



19
20
21
22
23
# File 'lib/msf/core/exploit/remote/auto_check.rb', line 19

def run
  with_prepended_auto_check do
    super
  end
end