Sha256: 105f8c8ae9bb2502cdd21a3b086616c1f8cfe110c7b42d0fe34fbf9129159af4
Contents?: true
Size: 1.55 KB
Versions: 6
Compression:
Stored size: 1.55 KB
Contents
=begin Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.com> This file is part of the Arachni Framework project and is subject to redistribution and commercial restrictions. Please see the Arachni Framework web site for more information on licensing and terms of use. =end module Arachni::OptionGroups # Holds login options for the {Arachni::Framework}'s {Arachni::Session} manager. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class Session < Arachni::OptionGroup # @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 attr_accessor :check_url # @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 attr_accessor :check_pattern def check_pattern=( pattern ) return @check_pattern = nil if !pattern @check_pattern = Regexp.new( pattern ) end def validate return {} if (check_url && check_pattern) || (!check_url && !check_pattern) { (check_url ? :check_pattern : :check_url) => 'Option is missing.' } end def to_rpc_data d = super d['check_pattern'] = d['check_pattern'].to_s if d['check_pattern'] d end end end
Version data entries
6 entries across 6 versions & 1 rubygems