Sha256: 68bb931ae33274b0bf44ad5820679a43edc2a1ca895686ebe2e707c5f04def00

Contents?: true

Size: 1 KB

Versions: 5

Compression:

Stored size: 1 KB

Contents

=begin
    Copyright 2010-2022 Ecsypno <http://www.ecsypno.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

class Arachni::Plugins::Suspendable < Arachni::Plugin::Base

    attr_reader :counter

    def prepare
        @counter = 0
    end

    def restore( counter )
        @counter = counter
    end

    def run
        options[:my_option] = 'updated'
        @counter += 1

        wait_while_framework_running
    end

    def suspend
        @counter
    end

    def self.info
        {
            name:        'Suspendable',
            description: %q{},
            author:      'Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>',
            version:     '0.1',
            options:     [
                Options::String.new( 'my_option', required: true, description: 'Required option' )
            ]
        }
    end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arachni-1.6.1.3 spec/support/fixtures/plugins/suspendable.rb
arachni-1.6.1.2 spec/support/fixtures/plugins/suspendable.rb
arachni-1.6.1.1 spec/support/fixtures/plugins/suspendable.rb
arachni-1.6.1 spec/support/fixtures/plugins/suspendable.rb
arachni-1.6.0 spec/support/fixtures/plugins/suspendable.rb