gauntlt 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/bin/gauntlt CHANGED
@@ -8,7 +8,7 @@ require 'gauntlt'
8
8
  opts = Trollop::options do
9
9
  version Gauntlt::VERSION
10
10
  banner <<-EOS
11
- gauntlt is a ruggedization framework
11
+ gauntlt is a ruggedization framework that helps you be mean to your code
12
12
 
13
13
  Usage:
14
14
  gauntlt <path>+ [--tags TAG_EXPRESSION]
@@ -21,7 +21,8 @@ EOS
21
21
  :multi => true
22
22
 
23
23
  opt :list, "List defined attacks"
24
- opt :steps, "List all available step definitions"
24
+ opt :steps, "List the gauntlt step definitions that can be used inside of attack files"
25
+ opt :allsteps, "List all available step definitions including aruba step definitions which help with file and parsing operations"
25
26
  end
26
27
 
27
28
  opts[:path] = if ARGV.empty?
@@ -37,6 +38,12 @@ if opts[:list]
37
38
  elsif opts[:steps]
38
39
  all_step_defs = Gauntlt.stepdefs( opts[:path], opts[:tags].join(',') )
39
40
  puts all_step_defs[:gauntlt].sort
41
+ elsif opts[:allsteps]
42
+ all_step_defs = Gauntlt.stepdefs( opts[:path], opts[:tags].join(',') )
43
+ puts "File and output parsing steps (using Aruba)"
44
+ puts all_step_defs[:aruba].sort
45
+ puts "\nGauntlt Attack Steps"
46
+ puts all_step_defs[:gauntlt].sort
40
47
  else
41
48
  Gauntlt.attack( opts[:path], opts[:tags].join(',') )
42
49
  end
@@ -1,3 +1,4 @@
1
+ @slow
1
2
  Feature: simple nmap attack (sanity check)
2
3
 
3
4
  Background:
@@ -11,8 +12,5 @@ Feature: simple nmap attack (sanity check)
11
12
  """
12
13
  nmap -p 80,443 <hostname>
13
14
  """
14
- Then the output should contain:
15
- """
16
- 80/tcp open http
17
- 443/tcp closed https
18
- """
15
+ Then the output should contain "80/tcp open"
16
+ And the output should not contain "443/tcp open"
@@ -1,3 +1,4 @@
1
+ @slow
1
2
  Feature: XML output
2
3
 
3
4
  Background:
@@ -14,7 +15,7 @@ Feature: XML output
14
15
  And the file "foo.xml" should contain XML:
15
16
  | css |
16
17
  | ports port[protocol="tcp"][portid="80"] state[state="open"] |
17
- | ports port[protocol="tcp"][portid="443"] state[state="closed"] |
18
18
  And the file "foo.xml" should not contain XML:
19
19
  | css |
20
20
  | ports port[protocol="tcp"][portid="123"] state[state="open"] |
21
+ | ports port[protocol="tcp"][portid="443"] state[state="open"] |
@@ -0,0 +1,10 @@
1
+ Feature: simplest audit possible
2
+ Scenario:
3
+ When I launch a "generic" attack with:
4
+ """
5
+ ls -a
6
+ """
7
+ Then the output should contain:
8
+ """
9
+ .
10
+ """
@@ -11,6 +11,27 @@ Feature: Verify the attack behaviour is correct
11
11
  """
12
12
  nmap
13
13
  """
14
+
15
+ Scenario: List all available attack steps and aruba steps that are available
16
+ Given an attack "nmap" exists
17
+ And a file named "nmap.attack" with:
18
+ """
19
+ Feature: simplest attack possible
20
+ Scenario:
21
+ When I launch a "generic" attack with:
22
+ \"\"\"
23
+ ls -a
24
+ \"\"\"
25
+ Then the output should contain:
26
+ \"\"\"
27
+ .
28
+ \"\"\"
29
+ """
30
+ When I run `gauntlt --allsteps`
31
+ Then it should pass with:
32
+ """
33
+ the stdout should not contain
34
+ """
14
35
 
15
36
  Scenario: List defined step definitions
16
37
  Given an attack "nmap" exists
@@ -14,7 +14,7 @@ Feature: nmap attack
14
14
  When I run `gauntlt simple.attack`
15
15
  Then it should pass with:
16
16
  """
17
- 4 steps (4 passed)
17
+ 5 steps (5 passed)
18
18
  """
19
19
 
20
20
  Scenario: OS detection nmap attack
@@ -36,4 +36,4 @@ Feature: nmap attack
36
36
  Then it should pass with:
37
37
  """
38
38
  5 steps (5 passed)
39
- """
39
+ """
@@ -8,8 +8,8 @@ Feature: Display help info
8
8
  When I run `gauntlt --help`
9
9
  Then the output should contain:
10
10
  """
11
- gauntlt is a ruggedization framework
11
+ gauntlt is a ruggedization framework that helps you be mean to your code
12
12
 
13
13
  Usage:
14
14
  gauntlt <path>+
15
- """
15
+ """
@@ -1,3 +1,3 @@
1
1
  module Gauntlt
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gauntlt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-06 00:00:00.000000000 Z
13
+ date: 2013-07-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cucumber
@@ -171,6 +171,7 @@ files:
171
171
  - examples/nmap/tcp_ping_ports.attack
172
172
  - examples/nmap/xml_output.attack
173
173
  - examples/simplest.attack
174
+ - examples/simplest.audit
174
175
  - examples/sqlmap/sqlmap.attack
175
176
  - examples/sslyze/sslyze.attack
176
177
  - features/attack.feature