Sha256: 39aee9c6d885b0606a3e863f580af2f8bdfa374179f450aeff82bdcaa2fb06c0
Contents?: true
Size: 1.04 KB
Versions: 6
Compression:
Stored size: 1.04 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 require_relative '../../../lib/arachni/processes/manager' require_relative '../../../lib/arachni/processes/helpers' require_relative '../../support/helpers/paths' require_relative 'web_server_manager' require 'arachni/rpc' # @note Needs `ENV['WEB_SERVER_DISPATCHER']` in the format of `host:port`. # # Exposes the {WebServerManager} over RPC. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class WebServerDispatcher def initialize( options = {} ) host, port = ENV['WEB_SERVER_DISPATCHER'].split( ':' ) manager = WebServerManager.instance manager.address = host rpc = Arachni::RPC::Server.new( host: host, port: port.to_i ) rpc.add_handler( 'server', manager ) rpc.run end end
Version data entries
6 entries across 6 versions & 1 rubygems