Class: Msf::OptRhosts
Overview
RHosts option
Instance Attribute Summary
Attributes inherited from OptBase
#advanced, #aliases, #conditions, #default, #desc, #enums, #evasion, #fallbacks, #max_length, #name, #owner, #regex, #required
Instance Method Summary collapse
- #normalize(value) ⇒ Object
- #type ⇒ Object
- #valid?(value, check_empty: true) ⇒ Boolean
- #validate_on_assignment? ⇒ Boolean
Methods inherited from OptBase
#advanced?, #display_value, #empty_required_value?, #evasion?, #initialize, #invalid_value_length?, #required?, #type?
Constructor Details
This class inherits a constructor from Msf::OptBase
Instance Method Details
#normalize(value) ⇒ Object
18 19 20 |
# File 'lib/msf/core/opt_rhosts.rb', line 18 def normalize(value) value end |
#type ⇒ Object
10 11 12 |
# File 'lib/msf/core/opt_rhosts.rb', line 10 def type 'rhosts' end |
#valid?(value, check_empty: true) ⇒ Boolean
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/msf/core/opt_rhosts.rb', line 22 def valid?(value, check_empty: true) return false if check_empty && empty_required_value?(value) return false unless value.is_a?(String) || value.is_a?(NilClass) if !value.nil? && value.empty? == false return Msf::RhostsWalker.new(value).valid? end super end |
#validate_on_assignment? ⇒ Boolean
14 15 16 |
# File 'lib/msf/core/opt_rhosts.rb', line 14 def validate_on_assignment? false end |