This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automated login plugin using a custom login sequence. | |
# | |
# @author Tasos "Zapotek" Laskos <[email protected]> | |
class Arachni::Plugins::MyLogin < Arachni::Plugin::Base | |
# Login operation using Watir. | |
# | |
# @param [Watir] watir | |
# | |
# @see http://watirwebdriver.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Copyright 2010-2012 Tasos Laskos <[email protected]> | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Copyright 2010-2012 Tasos Laskos <[email protected]> | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Test done on: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz | |
# | |
require 'yaml' | |
TIMES = 1000 | |
obj = [] | |
500.times { |i| obj << { 'key' * i => [ 'value' * i ] } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Helps to see status messages when developing. | |
#require 'arachni/ui/cli/output' | |
# Only works with the latest code from the experimental branch. | |
require 'arachni' | |
# to avoid having to prefix every object's name with it | |
include Arachni | |
include Utilities |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# You need to grab the latest code from: | |
# https://github.com/Zapotek/arachni/tree/experimental | |
# | |
# for this to work. | |
# | |
# require_relative '../lib/arachni/ui/cli/output' | |
# require_relative '../lib/arachni' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'v8' | |
require 'open-uri' | |
require 'pp' | |
require 'ap' | |
require 'taka' | |
require 'ostruct' | |
# | |
# Monkey patch all elements to include a 'style' attribute | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'openssl' | |
require 'yaml' | |
require 'ap' | |
class Connection | |
def initialize( opts ) | |
@opts = opts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'eventmachine' | |
class Handler < EventMachine::Connection | |
def initialize( opts = {} ) | |
@role = opts[:role] | |
@ssl_opts = opts[:ssl] || {} | |
@ssl_opts[:verify_peer] = true | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'eventmachine' | |
module EventMachine::Protocols::ObjectProtocol | |
def serializer | |
Marshal | |
end | |
def receive_data data | |
(@buf ||= '') << data |