Sha256: f0743834e445a029fede0b7a9612e05359d287082b3629ca2c7b66f322d52631

Contents?: true

Size: 1.27 KB

Versions: 6

Compression:

Stored size: 1.27 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

# Beeps when the scan finishes.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
# @version 0.1.2
class Arachni::Plugins::BeepNotify < Arachni::Plugin::Base

    def run
        wait_while_framework_running
        options[:repeat].times do
            sleep options[:interval]
            print_info 'Beep!'
            print 7.chr
        end
    end

    def self.info
        {
            name: 'Beep notify',
            description: %q{It beeps when the scan finishes.},
            author: 'Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>',
            version: '0.1.2',
            options: [
                Options::Int.new( 'repeat',
                    description: 'How many times to beep.',
                    default:     4
                ),
                Options::Float.new( 'interval',
                    description: 'How long to wait between beeps.',
                    default:     0.4
                )
            ]
        }
    end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arachni-1.3.2 components/plugins/beep_notify.rb
arachni-1.3.1 components/plugins/beep_notify.rb
arachni-1.3 components/plugins/beep_notify.rb
arachni-1.2.1 components/plugins/beep_notify.rb
arachni-1.2 components/plugins/beep_notify.rb
arachni-1.1 components/plugins/beep_notify.rb