Method: Arachni::Plugins::Exec#prepare

Defined in:
components/plugins/exec.rb

#prepareObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'components/plugins/exec.rb', line 15

def prepare
    parsed_url = Arachni::URI( framework.options.url )

    @data          = {}
    @substitutions = {
        '__URL__'               => framework.options.url,
        '__URL_SCHEME__'        => parsed_url.scheme,
        '__URL_HOST__'          => parsed_url.host,
        '__URL_PORT__'          => parsed_url.port || 80,
        '__STAGE__'             => proc { @stage },
        '__ISSUE_COUNT__'       => proc do
            Arachni::Data.issues.size
        end,
        '__SITEMAP_SIZE__'      => proc do
            framework.data.sitemap.size
        end,
        '__FRAMEWORK_RUNTIME__' => proc do
            framework.statistics[:runtime]
        end,
        '__FRAMEWORK_STATUS__'  => proc do
            framework.status
        end
    }

    exec( :pre )
end