Module: Gauntlt

Defined in:
lib/gauntlt/attack_adapters/support/cli_helper.rb,
lib/gauntlt.rb,
lib/gauntlt/attack.rb,
lib/gauntlt/version.rb,
lib/gauntlt/runtime.rb,
lib/gauntlt/stepdef.rb,
lib/gauntlt/attack_adapters/support/xml_helper.rb,
lib/gauntlt/attack_adapters/support/nmap_helper.rb,
lib/gauntlt/attack_adapters/support/cookie_helper.rb,
lib/gauntlt/attack_adapters/support/profile_helper.rb,
lib/gauntlt/attack_adapters/support/attack_step_helper.rb,
lib/gauntlt/attack_adapters/support/python_script_helper.rb

Overview

TODO: get this explicit require to work require 'gauntlt/support/cli_helper'

Defined Under Namespace

Modules: Support Classes: Attack, Runtime, Stepdef

Constant Summary collapse

CURRENT_DIR =

ruby 1.9

if defined?(Pathname) # ruby 1.9
  Pathname.new(__FILE__).dirname.to_s
else
  File.dirname(File.expand_path(__FILE__))
end
GAUNTLT_DIR =
File.join(CURRENT_DIR, 'gauntlt')
ATTACK_ADAPTERS_DIR =
File.join(GAUNTLT_DIR, 'attack_adapters')
ATTACK_ADAPTERS_GLOB_PATTERN =
ATTACK_ADAPTERS_DIR + '/*.rb'
ATTACK_ALIASES_DIR =
File.join(GAUNTLT_DIR, 'attack_aliases')
ATTACK_ALIASES_GLOB_PATTERN =
ATTACK_ALIASES_DIR + '/*.json'
VERSION =
"1.0.11"

Class Method Summary collapse

Class Method Details

.attack(path, tags = [], format = "") ⇒ Object


35
36
37
# File 'lib/gauntlt.rb', line 35

def attack(path, tags=[], format="")
  Attack.new(path, tags, format).run
end

.attack_adaptersObject


25
26
27
# File 'lib/gauntlt.rb', line 25

def attack_adapters
  Dir.glob(ATTACK_ADAPTERS_GLOB_PATTERN)
end

.attacksObject


29
30
31
32
33
# File 'lib/gauntlt.rb', line 29

def attacks
  attack_adapters.map do |full_path|
    File.basename(full_path, '.rb')
  end.sort
end

.stepdefs(path, tags = []) ⇒ Object


39
40
41
42
# File 'lib/gauntlt.rb', line 39

def stepdefs(path, tags=[])
  cuke_runtime = Gauntlt::Runtime.cuke_runtime(path, tags)
  Stepdef.sources(cuke_runtime)
end