fuzzbert 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f1e0ffe2bf43123f27889301b43659f13dae71ab
4
+ data.tar.gz: 5ccd7760862432183de49ec470ee1ddfb6f4957e
5
+ SHA512:
6
+ metadata.gz: ed0b6e49224cc3d39f3c09b51987182a4cea9d9019016d33419cb180a67e9337b5491690ccaa7f3c4dfbbd85515bee19babb3c5311d0dcb79951a0d9b6c006e1
7
+ data.tar.gz: 9c18743c7985558b1bc3099935ad5180c1c6745fabc192e97748c128348f360f09b297bd256c5466a525d973d26e60c2f8a4a77b3c3bac166bf959d5df1aa682
data/README.md CHANGED
@@ -68,8 +68,8 @@ end
68
68
  line tool", "fuzz this particular URL of my web app" or "fuzz this library method
69
69
  taking external input".
70
70
 
71
- Within a `fuzz` block, there must be one occurence of `deploy` and one or several
72
- occurences of `data`. The `deploy` block is the spot where we deliver the random
71
+ Within a `fuzz` block, there must be one occurrences of `deploy` and one or several
72
+ occurrences of `data`. The `deploy` block is the spot where we deliver the random
73
73
  payload that has been generated. It is agnostic about the actual target in order to
74
74
  leave you free to fuzz whatever you require in your particular case. The `data`
75
75
  blocks define the shape of the random data being generated. There can be more than
@@ -35,7 +35,6 @@ module FuzzBert::AutoRun
35
35
 
36
36
  def process_args(args = [])
37
37
  options = {}
38
- orig_args = args.dup
39
38
 
40
39
  OptionParser.new do |opts|
41
40
  add_banner(opts)
@@ -3,7 +3,6 @@ module FuzzBert::Handler
3
3
 
4
4
  module ConsoleHelper
5
5
  def info(error_data)
6
- id = error_data[:id]
7
6
  status = error_data[:status]
8
7
 
9
8
  crashed = status.termsig
@@ -119,11 +119,11 @@ class FuzzBert::Executor
119
119
 
120
120
  def interrupted(status)
121
121
  return false if status.exited?
122
- return true if status.termsig == nil || status.termsig == 2
122
+ status.termsig == nil || status.termsig == 2
123
123
  end
124
124
 
125
125
  def conditional_sleep
126
- sleep @sleep_delay until @running == false
126
+ sleep @sleep_delay until !@running
127
127
  end
128
128
 
129
129
  class DataProducer
@@ -1,4 +1,4 @@
1
1
  module FuzzBert
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.4"
3
3
  end
4
4
 
@@ -5,6 +5,7 @@ describe FuzzBert::Executor do
5
5
 
6
6
  describe "::new" do
7
7
  let(:test) do
8
+ #NOTE: Do we need the test variable here?
8
9
  test = FuzzBert::Test.new(lambda { |data| data })
9
10
  FuzzBert::TestSuite.create("suite") do
10
11
  deploy { |data| data }
@@ -87,7 +88,7 @@ describe FuzzBert::Executor do
87
88
  data("1") { -> { "a" } }
88
89
  end
89
90
  end
90
- let (:handler) { TestHandler.new { |data| raise RuntimeError.new } }
91
+ let (:handler) { TestHandler.new { |_| raise RuntimeError.new } }
91
92
  it { -> { subject }.should_not raise_error }
92
93
  end
93
94
 
@@ -95,22 +96,22 @@ describe FuzzBert::Executor do
95
96
  called = false
96
97
  let (:suite) do
97
98
  FuzzBert::TestSuite.create("suite") do
98
- deploy { |data| raise "boo!" }
99
+ deploy { |_| raise "boo!" }
99
100
  data("1") { -> { "a" } }
100
101
  end
101
102
  end
102
- let (:handler) { TestHandler.new { |data| called = true } }
103
+ let (:handler) { TestHandler.new { |_| called = true } }
103
104
  it { -> { subject }.should_not raise_error; called.should be_true }
104
105
  end
105
106
 
106
107
  context "allows rescued exceptions" do
107
108
  let (:suite) do
108
109
  FuzzBert::TestSuite.create("suite") do
109
- deploy { |data| begin; raise "boo!"; rescue RuntimeError; end }
110
+ deploy { |_| begin; raise "boo!"; rescue RuntimeError; end }
110
111
  data("1") { -> { "a" } }
111
112
  end
112
113
  end
113
- let (:handler) { TestHandler.new { |data| raise RuntimeError.new } }
114
+ let (:handler) { TestHandler.new { |_| raise RuntimeError.new } }
114
115
  it { -> { subject }.should_not raise_error }
115
116
  end
116
117
 
@@ -118,11 +119,11 @@ describe FuzzBert::Executor do
118
119
  called = false
119
120
  let (:suite) do
120
121
  FuzzBert::TestSuite.create("suite") do
121
- deploy { |data| Process.kill(:SEGV, Process.pid) }
122
+ deploy { |_| Process.kill(:SEGV, Process.pid) }
122
123
  data("1") { -> { "a" } }
123
124
  end
124
125
  end
125
- let (:handler) { TestHandler.new { |data| called = true } }
126
+ let (:handler) { TestHandler.new { |_| called = true } }
126
127
  let (:generator) { FuzzBert::Generator.new("test") { "a" } }
127
128
  it { -> { subject }.should_not raise_error; called.should be_true }
128
129
  end if false #don't want to SEGV every time
@@ -15,6 +15,6 @@ module FuzzBert::Spec
15
15
  end
16
16
 
17
17
  fuzz "failing" do
18
- deploy { |data| raise "boo!" }
18
+ deploy { |_| raise "boo!" }
19
19
  data("some") { -> {"a"} }
20
20
  end
@@ -1,6 +1,6 @@
1
1
  require 'fuzzbert'
2
2
 
3
3
  fuzz "nothing" do
4
- deploy { |data| }
4
+ deploy { |_| }
5
5
  data("some") { -> {"a"} }
6
6
  end
@@ -6,7 +6,7 @@ describe FuzzBert::Mutator do
6
6
  describe "::new" do
7
7
  it "takes a (valid) base value" do
8
8
  value = "test"
9
- mut = FuzzBert::Mutator.new(value)
9
+ -> {FuzzBert::Mutator.new(value)}.should_not raise_error
10
10
  end
11
11
  end
12
12
 
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuzzbert
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
5
- prerelease:
4
+ version: 1.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Martin Bosslet
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-05 00:00:00.000000000 Z
11
+ date: 2014-06-22 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A random testing / fuzzer framework for Ruby.
15
14
  email: Martin.Bosslet@gmail.com
@@ -19,65 +18,64 @@ extensions: []
19
18
  extra_rdoc_files:
20
19
  - README.md
21
20
  files:
22
- - lib/fuzzbert/rake_task.rb
21
+ - LICENSE
22
+ - README.md
23
+ - bin/fuzzbert
24
+ - lib/fuzzbert.rb
25
+ - lib/fuzzbert/autorun.rb
26
+ - lib/fuzzbert/container.rb
27
+ - lib/fuzzbert/dsl.rb
28
+ - lib/fuzzbert/error_handler.rb
29
+ - lib/fuzzbert/executor.rb
23
30
  - lib/fuzzbert/generation.rb
24
31
  - lib/fuzzbert/generator.rb
25
- - lib/fuzzbert/test_suite.rb
26
- - lib/fuzzbert/autorun.rb
27
- - lib/fuzzbert/template.rb
28
32
  - lib/fuzzbert/generators.rb
33
+ - lib/fuzzbert/mutator.rb
34
+ - lib/fuzzbert/rake_task.rb
35
+ - lib/fuzzbert/template.rb
29
36
  - lib/fuzzbert/test.rb
37
+ - lib/fuzzbert/test_suite.rb
30
38
  - lib/fuzzbert/version.rb
31
- - lib/fuzzbert/error_handler.rb
32
- - lib/fuzzbert/mutator.rb
33
- - lib/fuzzbert/executor.rb
34
- - lib/fuzzbert/dsl.rb
35
- - lib/fuzzbert/container.rb
36
- - lib/fuzzbert.rb
37
- - LICENSE
38
- - README.md
39
- - spec/template_spec.rb
39
+ - spec/autorun_spec.rb
40
40
  - spec/dsl_spec.rb
41
- - spec/generator_spec.rb
42
- - spec/mutator_spec.rb
43
41
  - spec/executor_spec.rb
44
- - spec/autorun_spec.rb
45
42
  - spec/fuzz/fuzz_custom_handler.rb
46
43
  - spec/fuzz/fuzz_nothing.rb
44
+ - spec/generator_spec.rb
45
+ - spec/mutator_spec.rb
46
+ - spec/template_spec.rb
47
47
  - spec/test_spec.rb
48
- - bin/fuzzbert
49
48
  homepage: https://github.com/krypt/FuzzBert
50
49
  licenses:
51
50
  - MIT
51
+ metadata: {}
52
52
  post_install_message:
53
53
  rdoc_options: []
54
54
  require_paths:
55
55
  - lib
56
56
  required_ruby_version: !ruby/object:Gem::Requirement
57
- none: false
58
57
  requirements:
59
- - - ! '>='
58
+ - - ">="
60
59
  - !ruby/object:Gem::Version
61
60
  version: '0'
62
61
  required_rubygems_version: !ruby/object:Gem::Requirement
63
- none: false
64
62
  requirements:
65
- - - ! '>='
63
+ - - ">="
66
64
  - !ruby/object:Gem::Version
67
65
  version: '0'
68
66
  requirements: []
69
67
  rubyforge_project:
70
- rubygems_version: 1.8.23
68
+ rubygems_version: 2.2.2
71
69
  signing_key:
72
- specification_version: 3
70
+ specification_version: 4
73
71
  summary: Fuzz your applications and libraries with minimal effort.
74
72
  test_files:
75
- - spec/template_spec.rb
76
- - spec/dsl_spec.rb
77
- - spec/generator_spec.rb
78
- - spec/mutator_spec.rb
79
- - spec/executor_spec.rb
80
73
  - spec/autorun_spec.rb
81
74
  - spec/fuzz/fuzz_custom_handler.rb
82
75
  - spec/fuzz/fuzz_nothing.rb
76
+ - spec/template_spec.rb
77
+ - spec/mutator_spec.rb
78
+ - spec/executor_spec.rb
79
+ - spec/dsl_spec.rb
80
+ - spec/generator_spec.rb
83
81
  - spec/test_spec.rb