fuzzbert 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -2
- data/lib/fuzzbert/autorun.rb +0 -1
- data/lib/fuzzbert/error_handler.rb +0 -1
- data/lib/fuzzbert/executor.rb +2 -2
- data/lib/fuzzbert/version.rb +1 -1
- data/spec/executor_spec.rb +8 -7
- data/spec/fuzz/fuzz_custom_handler.rb +1 -1
- data/spec/fuzz/fuzz_nothing.rb +1 -1
- data/spec/mutator_spec.rb +1 -1
- metadata +29 -31
checksums.yaml
ADDED
@@ -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
|
72
|
-
|
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
|
data/lib/fuzzbert/autorun.rb
CHANGED
data/lib/fuzzbert/executor.rb
CHANGED
@@ -119,11 +119,11 @@ class FuzzBert::Executor
|
|
119
119
|
|
120
120
|
def interrupted(status)
|
121
121
|
return false if status.exited?
|
122
|
-
|
122
|
+
status.termsig == nil || status.termsig == 2
|
123
123
|
end
|
124
124
|
|
125
125
|
def conditional_sleep
|
126
|
-
sleep @sleep_delay until
|
126
|
+
sleep @sleep_delay until !@running
|
127
127
|
end
|
128
128
|
|
129
129
|
class DataProducer
|
data/lib/fuzzbert/version.rb
CHANGED
data/spec/executor_spec.rb
CHANGED
@@ -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 { |
|
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 { |
|
99
|
+
deploy { |_| raise "boo!" }
|
99
100
|
data("1") { -> { "a" } }
|
100
101
|
end
|
101
102
|
end
|
102
|
-
let (:handler) { TestHandler.new { |
|
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 { |
|
110
|
+
deploy { |_| begin; raise "boo!"; rescue RuntimeError; end }
|
110
111
|
data("1") { -> { "a" } }
|
111
112
|
end
|
112
113
|
end
|
113
|
-
let (:handler) { TestHandler.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 { |
|
122
|
+
deploy { |_| Process.kill(:SEGV, Process.pid) }
|
122
123
|
data("1") { -> { "a" } }
|
123
124
|
end
|
124
125
|
end
|
125
|
-
let (:handler) { TestHandler.new { |
|
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
|
data/spec/fuzz/fuzz_nothing.rb
CHANGED
data/spec/mutator_spec.rb
CHANGED
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.
|
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:
|
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
|
-
-
|
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
|
-
-
|
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:
|
68
|
+
rubygems_version: 2.2.2
|
71
69
|
signing_key:
|
72
|
-
specification_version:
|
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
|