commit
da92e4705c
|
@ -55,7 +55,7 @@ module Auxiliary
|
|||
|
||||
# Verify the ACTION
|
||||
if (mod.actions.length > 0 and not mod.action)
|
||||
raise MissingActionError, "You must specify a valid Action", caller
|
||||
raise MissingActionError, "Please use: #{mod.actions.collect {|e| e.name} * ", "}"
|
||||
end
|
||||
|
||||
# Verify the options
|
||||
|
|
|
@ -210,9 +210,15 @@ end
|
|||
###
|
||||
class MissingActionError < ArgumentError
|
||||
include AuxiliaryError
|
||||
attr_accessor :reason
|
||||
|
||||
def initialize(reason='')
|
||||
self.reason = reason
|
||||
super
|
||||
end
|
||||
|
||||
def to_s
|
||||
"A valid action has not been selected."
|
||||
"Invalid action: #{reason}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -19,7 +19,12 @@ class Msf::Post < Msf::Module
|
|||
|
||||
include Msf::PostMixin
|
||||
|
||||
def setup; end
|
||||
def setup
|
||||
m = replicant
|
||||
if m.actions.length > 0 && !m.action
|
||||
raise Msf::MissingActionError, "Please use: #{m.actions.collect {|e| e.name} * ", "}"
|
||||
end
|
||||
end
|
||||
|
||||
def type
|
||||
Msf::MODULE_POST
|
||||
|
|
Loading…
Reference in New Issue