module Arachni::Framework::Parts::Plugin

Provides a {Arachni::Plugin::Manager} and related helpers.

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

Attributes

plugins[R]

@return [Arachni::Plugin::Manager]

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/arachni/framework/parts/plugin.rb, line 21
def initialize
    super
    @plugins = Arachni::Plugin::Manager.new( self )
end

Public Instance Methods

list_plugins( patterns = nil ) click to toggle source

@return [Array<Hash>]

Information about all available {Plugins}.
# File lib/arachni/framework/parts/plugin.rb, line 28
def list_plugins( patterns = nil )
    loaded = @plugins.loaded

    begin
        @plugins.clear
        @plugins.available.map do |plugin|
            path = @plugins.name_to_path( plugin )
            next if patterns && !@plugins.matches_globs?( path, patterns )

            @plugins[plugin].info.merge(
                options:   @plugins[plugin].info[:options] || [],
                shortname: plugin,
                path:      path,
                author:    [@plugins[plugin].info[:author]].
                               flatten.map { |a| a.strip }
            )
        end.compact
    ensure
        @plugins.clear
        @plugins.load loaded
    end
end