Class: Arachni::OptionGroups::Session
- Inherits:
-
Arachni::OptionGroup
- Object
- Arachni::OptionGroup
- Arachni::OptionGroups::Session
- Defined in:
- lib/arachni/option_groups/session.rb
Overview
Instance Attribute Summary collapse
-
#check_pattern ⇒ Regexp
Pattern which should match the #check_url response HTTP::Response#body when a valid webapp session has been established.
-
#check_url ⇒ String
URL whose response HTTP::Response#body should match #check_pattern when a valid webapp session has been established.
Instance Method Summary collapse
Methods inherited from Arachni::OptionGroup
#==, attr_accessor, attributes, #attributes, defaults, #defaults, #hash, inherited, #initialize, #merge, set_defaults, #to_h, #to_hash, #update
Constructor Details
This class inherits a constructor from Arachni::OptionGroup
Instance Attribute Details
#check_pattern ⇒ Regexp
Returns Pattern which should match the #check_url response HTTP::Response#body when a valid webapp session has been established.
30 31 32 |
# File 'lib/arachni/option_groups/session.rb', line 30 def check_pattern @check_pattern end |
#check_url ⇒ String
Returns URL whose response HTTP::Response#body should match #check_pattern when a valid webapp session has been established.
22 23 24 |
# File 'lib/arachni/option_groups/session.rb', line 22 def check_url @check_url end |
Instance Method Details
#to_rpc_data ⇒ Object
47 48 49 50 51 |
# File 'lib/arachni/option_groups/session.rb', line 47 def to_rpc_data d = super d['check_pattern'] = d['check_pattern'].to_s if d['check_pattern'] d end |
#validate ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/arachni/option_groups/session.rb', line 38 def validate return {} if (check_url && check_pattern) || (!check_url && !check_pattern) { (check_url ? :check_pattern : :check_url) => 'Option is missing.' } end |