File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ fuzz "My Web App" do
190190 data " JSON generated from a template" do
191191 t = FuzzBert ::Template .new ' { user: { id: ${id}, name: "${name}" } }'
192192 t.set(:id , FuzzBert ::Generators .cycle(1 ..10000 ))
193- t.set(:name ) { " fixed " + FuzzBert ::Generators .random_fixlen(2 ).call }
193+ t.set(:name ) { " Fixed text plus two random bytes: #{ FuzzBert ::Generators .random_fixlen(2 ).call} " }
194194 t.generator
195195 end
196196
Original file line number Diff line number Diff line change @@ -15,21 +15,16 @@ def handle(error_data)
1515 end
1616end
1717
18- fuzz "OpenSSL command line (asn1parse) " do
18+ fuzz "Some application " do
1919
2020 deploy do |data |
21- IO . popen ( "openssl asn1parse -inform DER -noout" , "w" ) do |io |
22- io . write ( data )
23- end
24- status = $?
25- unless status . exited? && status . success?
26- raise RuntimeError . new ( "bug!" )
27- end
21+ #send the generated data to your application here instead
22+ p data
2823 end
2924
3025 data ( "completely random" ) { FuzzBert ::Generators . random }
3126
32- data "Indefinite length sequence " do
27+ data "Payload " do
3328 c = FuzzBert ::Container . new
3429 c << FuzzBert ::Generators . fixed ( "\x30 \x80 " )
3530 c << FuzzBert ::Generators . random
Original file line number Diff line number Diff line change 22
33fuzz "Web App" do
44 deploy do |data |
5- #send JSON data via HTTP
5+ #send JSON data via HTTP here instead
6+ p data
67 end
78
89 data "template" do
910 t = FuzzBert ::Template . new <<-EOS
1011 { user: { id: ${id}, name: "${name}", text: "${text}" } }
1112 EOS
1213 t . set ( :id , FuzzBert ::Generators . cycle ( 1 ..10000 ) )
13- t . set ( :name ) { "fixed" + FuzzBert ::Generators . random . call }
14- t . set ( :text , FuzzBert ::Generators . random )
14+ name = FuzzBert ::Container . new
15+ name << FuzzBert ::Generators . fixed ( "fixed" )
16+ name << FuzzBert ::Generators . random_fixlen ( 2 )
17+ t . set ( :name , name . generator )
18+ t . set ( :text ) { "Fixed text plus two random bytes: #{ FuzzBert ::Generators . random_fixlen ( 2 ) . call } " }
1519 t . generator
1620 end
1721end
You can’t perform that action at this time.
0 commit comments