class Arachni::OptionGroups::Session

Holds login options for the {Arachni::Framework}‘s {Arachni::Session} manager.

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Attributes

check_pattern[RW]

@return [Regexp]

Pattern which should match the {#check_url} {Arachni::HTTP::Response response}
{Arachni::HTTP::Response#body} when a valid webapp {Session session} has
been established.

@see Session

check_url[RW]

@return [String]

URL whose {Arachni::HTTP::Response response} {Arachni::HTTP::Response#body}
should match {#check_pattern} when a valid webapp {Arachni::Session session}
has been established.

@see Session

Public Instance Methods

check_pattern=( pattern ) click to toggle source
# File lib/arachni/option_groups/session.rb, line 32
def check_pattern=( pattern )
    return @check_pattern = nil if !pattern

    @check_pattern = Regexp.new( pattern )
end
to_rpc_data() click to toggle source
Calls superclass method Arachni::OptionGroup#to_rpc_data
# 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() click to toggle source
# 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