Module: Arachni

Included in:
Component::Base
Defined in:
components/fingerprinters/os/bsd.rb,
components/fingerprinters/os/unix.rb,
components/fingerprinters/os/linux.rb,
components/fingerprinters/os/solaris.rb,
components/fingerprinters/os/windows.rb,
components/fingerprinters/servers/iis.rb,
components/fingerprinters/languages/asp.rb,
components/fingerprinters/languages/php.rb,
components/fingerprinters/servers/jetty.rb,
components/fingerprinters/servers/nginx.rb,
components/fingerprinters/frameworks/jsf.rb,
components/fingerprinters/languages/aspx.rb,
components/fingerprinters/languages/java.rb,
components/fingerprinters/languages/ruby.rb,
components/fingerprinters/servers/apache.rb,
components/fingerprinters/servers/tomcat.rb,
components/fingerprinters/frameworks/rack.rb,
components/fingerprinters/frameworks/nette.rb,
components/fingerprinters/frameworks/rails.rb,
components/fingerprinters/languages/python.rb,
components/fingerprinters/servers/gunicorn.rb,
components/fingerprinters/frameworks/django.rb,
components/fingerprinters/frameworks/cakephp.rb,
components/fingerprinters/frameworks/symfony.rb,
components/fingerprinters/frameworks/aspx_mvc.rb,
components/fingerprinters/frameworks/cherrypy.rb,
lib/arachni.rb,
lib/arachni/uri.rb,
lib/arachni/data.rb,
lib/arachni/page.rb,
lib/arachni/error.rb,
lib/arachni/issue.rb,
lib/arachni/scope.rb,
lib/arachni/state.rb,
lib/arachni/banner.rb,
lib/arachni/parser.rb,
lib/arachni/report.rb,
lib/arachni/browser.rb,
lib/arachni/options.rb,
lib/arachni/session.rb,
lib/arachni/trainer.rb,
lib/arachni/version.rb,
lib/arachni/page/dom.rb,
lib/arachni/snapshot.rb,
lib/arachni/framework.rb,
lib/arachni/uri/scope.rb,
lib/arachni/utilities.rb,
lib/arachni/check/base.rb,
lib/arachni/page/scope.rb,
lib/arachni/parser/sax.rb,
lib/arachni/state/http.rb,
lib/arachni/data/issues.rb,
lib/arachni/http/client.rb,
lib/arachni/plugin/base.rb,
lib/arachni/rest/server.rb,
lib/arachni/state/audit.rb,
lib/arachni/data/plugins.rb,
lib/arachni/data/session.rb,
lib/arachni/element/base.rb,
lib/arachni/http/headers.rb,
lib/arachni/http/message.rb,
lib/arachni/http/request.rb,
lib/arachni/option_group.rb,
lib/arachni/support/glob.rb,
lib/arachni/check/auditor.rb,
lib/arachni/check/manager.rb,
lib/arachni/http/response.rb,
lib/arachni/platform/list.rb,
lib/arachni/reporter/base.rb,
lib/arachni/state/options.rb,
lib/arachni/state/plugins.rb,
lib/arachni/ui/foo/output.rb,
lib/arachni/component/base.rb,
lib/arachni/data/framework.rb,
lib/arachni/element_filter.rb,
lib/arachni/issue/severity.rb,
lib/arachni/plugin/manager.rb,
lib/arachni/rpc/serializer.rb,
lib/arachni/browser_cluster.rb,
lib/arachni/http/cookie_jar.rb,
lib/arachni/parser/document.rb,
lib/arachni/rpc/client/base.rb,
lib/arachni/rpc/server/base.rb,
lib/arachni/state/framework.rb,
lib/arachni/component/output.rb,
lib/arachni/platform/manager.rb,
lib/arachni/plugin/formatter.rb,
lib/arachni/reporter/manager.rb,
lib/arachni/reporter/options.rb,
lib/arachni/support/profiler.rb,
lib/arachni/component/manager.rb,
lib/arachni/component/options.rb,
lib/arachni/http/proxy_server.rb,
lib/arachni/parser/nodes/base.rb,
lib/arachni/parser/nodes/text.rb,
lib/arachni/processes/manager.rb,
lib/arachni/rpc/server/output.rb,
lib/arachni/browser/javascript.rb,
lib/arachni/data/framework/rpc.rb,
lib/arachni/http/message/scope.rb,
lib/arachni/http/request/scope.rb,
lib/arachni/support/cache/base.rb,
lib/arachni/browser_cluster/job.rb,
lib/arachni/component/utilities.rb,
lib/arachni/http/response/scope.rb,
lib/arachni/issue/severity/base.rb,
lib/arachni/page/dom/transition.rb,
lib/arachni/processes/instances.rb,
lib/arachni/rpc/client/instance.rb,
lib/arachni/rpc/server/instance.rb,
lib/arachni/state/framework/rpc.rb,
lib/arachni/support/buffer/base.rb,
lib/arachni/support/lookup/base.rb,
lib/arachni/framework/parts/data.rb,
lib/arachni/parser/nodes/comment.rb,
lib/arachni/parser/nodes/element.rb,
lib/arachni/parser/with_children.rb,
lib/arachni/rpc/server/framework.rb,
lib/arachni/state/element_filter.rb,
lib/arachni/support/lookup/moolb.rb,
lib/arachni/framework/parts/audit.rb,
lib/arachni/framework/parts/check.rb,
lib/arachni/framework/parts/scope.rb,
lib/arachni/framework/parts/state.rb,
lib/arachni/processes/dispatchers.rb,
lib/arachni/rpc/client/dispatcher.rb,
lib/arachni/rpc/server/dispatcher.rb,
lib/arachni/support/database/base.rb,
lib/arachni/support/database/hash.rb,
lib/arachni/browser_cluster/worker.rb,
lib/arachni/framework/parts/plugin.rb,
lib/arachni/framework/parts/report.rb,
lib/arachni/parser/extractors/base.rb,
lib/arachni/platform/fingerprinter.rb,
lib/arachni/support/database/queue.rb,
lib/arachni/browser/element_locator.rb,
lib/arachni/framework/parts/browser.rb,
lib/arachni/parser/nodes/with_value.rb,
lib/arachni/support/lookup/hash_set.rb,
lib/arachni/support/mixins/terminal.rb,
lib/arachni/browser/javascript/proxy.rb,
lib/arachni/framework/parts/platform.rb,
lib/arachni/http/proxy_server/tunnel.rb,
lib/arachni/rpc/server/check/manager.rb,
lib/arachni/support/buffer/autoflush.rb,
lib/arachni/support/cache/preference.rb,
lib/arachni/rpc/server/active_options.rb,
lib/arachni/rpc/server/plugin/manager.rb,
lib/arachni/support/mixins/observable.rb,
lib/arachni/browser_cluster/job/result.rb,
lib/arachni/reporter/formatter_manager.rb,
lib/arachni/rpc/server/dispatcher/node.rb,
lib/arachni/rpc/server/framework/slave.rb,
lib/arachni/support/crypto/rsa_aes_cbc.rb,
lib/arachni/parser/with_children/search.rb,
lib/arachni/rpc/client/instance/service.rb,
lib/arachni/rpc/server/framework/master.rb,
lib/arachni/element/capabilities/mutable.rb,
lib/arachni/http/proxy_server/connection.rb,
lib/arachni/rest/server/instance_helpers.rb,
lib/arachni/browser/javascript/proxy/stub.rb,
lib/arachni/element/capabilities/dom_only.rb,
lib/arachni/element/capabilities/with_dom.rb,
lib/arachni/rpc/client/instance/framework.rb,
lib/arachni/rpc/server/dispatcher/service.rb,
lib/arachni/browser/javascript/dom_monitor.rb,
lib/arachni/element/capabilities/auditable.rb,
lib/arachni/element/capabilities/with_node.rb,
lib/arachni/browser/javascript/taint_tracer.rb,
lib/arachni/element/capabilities/analyzable.rb,
lib/arachni/element/capabilities/inputtable.rb,
lib/arachni/element/capabilities/with_scope.rb,
lib/arachni/http/client/dynamic_404_handler.rb,
lib/arachni/browser_cluster/jobs/taint_trace.rb,
lib/arachni/element/capabilities/submittable.rb,
lib/arachni/element/capabilities/with_source.rb,
lib/arachni/rpc/server/framework/distributor.rb,
lib/arachni/support/cache/random_replacement.rb,
lib/arachni/element/capabilities/with_auditor.rb,
lib/arachni/http/proxy_server/ssl_interceptor.rb,
lib/arachni/support/cache/least_recently_used.rb,
lib/arachni/rpc/server/framework/multi_instance.rb,
lib/arachni/support/cache/least_recently_pushed.rb,
lib/arachni/browser_cluster/jobs/dom_exploration.rb,
lib/arachni/parser/nodes/element/with_attributes.rb,
lib/arachni/support/cache/least_cost_replacement.rb,
lib/arachni/browser/javascript/taint_tracer/frame.rb,
lib/arachni/browser_cluster/jobs/browser_provider.rb,
lib/arachni/element/capabilities/with_scope/scope.rb,
lib/arachni/browser_cluster/jobs/taint_trace/result.rb,
lib/arachni/element/capabilities/analyzable/timeout.rb,
lib/arachni/element/capabilities/auditable/buffered.rb,
lib/arachni/element/capabilities/with_auditor/output.rb,
lib/arachni/browser/javascript/taint_tracer/sink/base.rb,
lib/arachni/element/capabilities/analyzable/signature.rb,
lib/arachni/browser_cluster/jobs/dom_exploration/result.rb,
lib/arachni/element/capabilities/analyzable/differential.rb,
lib/arachni/element/capabilities/auditable/line_buffered.rb,
lib/arachni/browser/javascript/taint_tracer/sink/data_flow.rb,
lib/arachni/browser_cluster/jobs/taint_trace/event_trigger.rb,
lib/arachni/parser/nodes/element/with_attributes/attributes.rb,
lib/arachni/browser_cluster/jobs/dom_exploration/event_trigger.rb,
lib/arachni/browser/javascript/taint_tracer/sink/execution_flow.rb,
lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb,
lib/arachni/browser_cluster/jobs/taint_trace/event_trigger/result.rb,
lib/arachni/browser_cluster/jobs/dom_exploration/event_trigger/result.rb,
ui/cli/output.rb,
ui/cli/reporter.rb,
ui/cli/framework.rb,
ui/cli/reproduce.rb,
ui/cli/utilities.rb,
ui/cli/rest/server.rb,
ui/cli/option_parser.rb,
ui/cli/rpc/client/local.rb,
ui/cli/rpc/client/remote.rb,
ui/cli/restored_framework.rb,
ui/cli/rpc/client/instance.rb,
ui/cli/rpc/server/dispatcher.rb,
ui/cli/reporter/option_parser.rb,
ui/cli/framework/option_parser.rb,
ui/cli/reproduce/option_parser.rb,
ui/cli/rest/server/option_parser.rb,
ui/cli/rpc/client/dispatcher_monitor.rb,
ui/cli/rpc/client/local/option_parser.rb,
ui/cli/rpc/client/remote/option_parser.rb,
ui/cli/restored_framework/option_parser.rb,
ui/cli/rpc/server/dispatcher/option_parser.rb,
ui/cli/rpc/client/dispatcher_monitor/option_parser.rb

Overview

Copyright 2010-2017 Sarosys LLC http://www.sarosys.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.

Defined Under Namespace

Modules: Check, Checks, Component, Element, HTTP, Mixins, OptionGroups, Platform, Plugin, Plugins, Processes, RPC, Reporter, Reporters, Rest, Support, UI, Utilities Classes: Browser, BrowserCluster, Data, ElementFilter, Error, Framework, Issue, OptionGroup, Options, Page, Parser, Report, Scope, Session, Snapshot, State, Trainer, URI

Constant Summary collapse

WEBSITE =
'http://arachni-scanner.com'
WIKI =
"#{WEBSITE}/wiki"
<<EOBANNER
Arachni - Web Application Security Scanner Framework v#{VERSION}
   Author: Tasos "Zapotek" Laskos <[email protected]>

           (With the support of the community and the Arachni Team.)

   Website:       #{WEBSITE}
   Documentation: #{WIKI}
EOBANNER
VERSION =

the universal system version

IO.read( File.dirname( __FILE__ ) + '/../version' ).strip
XML =
Arachni::Element::XML
Form =
Arachni::Element::Form
JSON =
Arachni::Element::JSON
Arachni::Element::Link
Arachni::Element::Cookie
Header =
Arachni::Element::Header
Severity =
Arachni::Issue::Severity
UIForm =
Arachni::Element::UIForm
UIInput =
Arachni::Element::UIInput
LinkTemplate =
Arachni::Element::LinkTemplate

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.collect_young_objectsObject

Runs a minor GC to collect young, short-lived objects.

Generally called after analysis operations that generate a lot of new temporary objects.


27
28
29
# File 'lib/arachni.rb', line 27

def collect_young_objects
    GC.start( full_mark: false )
end

.jruby?Bool

Returns:

  • (Bool)

36
37
38
# File 'lib/arachni.rb', line 36

def jruby?
    RUBY_PLATFORM == 'java'
end

.null_deviceObject


31
32
33
# File 'lib/arachni.rb', line 31

def null_device
    Gem.win_platform? ? 'NUL' : '/dev/null'
end

.profile?Bool

Returns true if the ARACHNI_PROFILE env variable is set, false otherwise.

Returns:

  • (Bool)

    true if the ARACHNI_PROFILE env variable is set, false otherwise.


47
48
49
# File 'lib/arachni.rb', line 47

def profile?
    !!ENV['ARACHNI_PROFILER']
end

.URI(uri) ⇒ Object

Helper method which parses a URL using Arachni::URI.parse.

See Also:


19
20
21
# File 'lib/arachni/uri.rb', line 19

def self.URI( uri )
    Arachni::URI.parse( uri )
end

.windows?Bool

Returns:

  • (Bool)

41
42
43
# File 'lib/arachni.rb', line 41

def windows?
    Gem.win_platform?
end

Instance Method Details

#get_long_win32_filename(short_name) ⇒ Object


57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/arachni.rb', line 57

def get_long_win32_filename( short_name )
    short_name = short_name.dup
    max_path   = 1024
    long_name  = ' ' * max_path

    lfn_size = Win32API.new(
        "kernel32", 
        "GetLongPathName",
        ['P','P','L'],
        'L'
    ).call( short_name, long_name, max_path )

    (1..max_path).include?( lfn_size ) ? 
        long_name[0..lfn_size-1] : short_name
end