Sha256: 02a75ce516ac659b94245a18885c377fe9c497707795db56cd27bd553193e8d2

Contents?: true

Size: 1.87 KB

Versions: 1

Compression:

Stored size: 1.87 KB

Contents

# Require all of the Ruby files in the given directory.
#
# path - The String relative path from here to the directory.
def require_all(path)
  glob = File.join(File.dirname(__FILE__), path, '*.rb')
  Dir[glob].each do |f|
    require f
  end
end

require 'uri'
require 'resolv'
require 'net/http'
require 'socket'

require File.dirname(__FILE__) + '/string_ext'
require File.dirname(__FILE__) + '/uri_ext'
require File.dirname(__FILE__) + '/util'

require_all '/commands'
require_all '/scanner'
require_all '/shared'

module Yawast
  VERSION = '0.2.0.beta2'
  DESCRIPTION = 'The YAWAST Antecedent Web Application Security Toolkit'
  HTTP_UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Yawast/#{VERSION} Chrome/52.0.2743.24 Safari/537.36"

  def self.header
    puts '__   _____  _    _  ___   _____ _____ '
    puts '\ \ / / _ \| |  | |/ _ \ /  ___|_   _|'
    puts ' \ V / /_\ \ |  | / /_\ \\\ `--.  | |  '
    puts '  \ /|  _  | |/\| |  _  | `--. \ | |  '
    puts '  | || | | \  /\  / | | |/\__/ / | |  '
    puts '  \_/\_| |_/\/  \/\_| |_/\____/  \_/  '
    puts ''
    puts "YAWAST v#{VERSION} - #{DESCRIPTION}"
    puts ' Copyright (c) 2013-2016 Adam Caudill <adam@adamcaudill.com>'
    puts ' Support & Documentation: https://github.com/adamcaudill/yawast'
    puts " Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}; #{OpenSSL::OPENSSL_VERSION} (#{RUBY_PLATFORM})"
    puts ''
  end

  def self.set_openssl_options
    #change certain defaults, to make things work better
    #we prefer RSA, to avoid issues with small DH keys
    OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ciphers] = "RSA:ALL:COMPLEMENTOFALL"
    OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
    OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] = OpenSSL::SSL::OP_ALL
  end

  trap 'SIGINT' do
    puts
    puts 'Scan cancelled by user.'
    exit 0
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yawast-0.2.0.beta2 lib/yawast.rb