rfuzz 0.8 → 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/doc/rdoc/classes/RFuzz.html +1 -1
- data/doc/rdoc/classes/RFuzz/Browser.html +15 -15
- data/doc/rdoc/classes/RFuzz/Browser.src/M000084.html +12 -10
- data/doc/rdoc/classes/RFuzz/Browser.src/M000085.html +10 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000086.html +24 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.html +72 -64
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000020.html +12 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html +21 -15
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html +15 -17
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000023.html +17 -22
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html +22 -9
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000025.html +9 -31
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000026.html +31 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000027.html +25 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000028.html +13 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html +21 -5
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html +5 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000031.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpResponse.html +15 -15
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html +9 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html +5 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000034.html +18 -0
- data/doc/rdoc/classes/RFuzz/Notifier.html +36 -36
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000059.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000060.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000061.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000062.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000063.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000064.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000058.html → M000065.html} +4 -4
- data/doc/rdoc/classes/RFuzz/PushBackIO.html +55 -40
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000010.html +2 -1
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000011.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000012.html +8 -6
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000013.html +7 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000014.html +6 -31
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000015.html +32 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html +5 -9
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000019.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.html +62 -62
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000047.html +8 -10
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000048.html +23 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000051.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html +7 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000053.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000054.html +7 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000055.html +5 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000056.html +5 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html +9 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000058.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.html +60 -60
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000072.html +6 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000073.html +10 -13
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000074.html +13 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000075.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000076.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000077.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000078.html +5 -6
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000079.html +6 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000080.html +5 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000081.html +10 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000082.html +5 -7
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000083.html +20 -0
- data/doc/rdoc/classes/RFuzz/Session.html +63 -63
- data/doc/rdoc/classes/RFuzz/Session.src/M000035.html +18 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000036.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000037.html +5 -21
- data/doc/rdoc/classes/RFuzz/Session.src/M000038.html +21 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000039.html +6 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000040.html +6 -13
- data/doc/rdoc/classes/RFuzz/Session.src/M000041.html +13 -16
- data/doc/rdoc/classes/RFuzz/Session.src/M000042.html +16 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000043.html +6 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000044.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000045.html +5 -10
- data/doc/rdoc/classes/RFuzz/Session.src/M000046.html +23 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.html +32 -32
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000066.html +6 -6
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000067.html +6 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000068.html +5 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000069.html +5 -15
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000070.html +15 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000065.html → M000071.html} +5 -6
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/lib/rfuzz/client_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/pushbackio_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
- data/doc/rdoc/fr_method_index.html +76 -75
- data/examples/kill_routes.rb +5 -4
- data/examples/mongrel_test_suite/test/rails/put.rb +14 -7
- data/examples/random_sockets.rb +37 -0
- data/examples/randomizer.rb +19 -0
- data/ext/http11_client/http11_parser.c +33 -34
- data/lib/rfuzz/client.rb +1 -1
- data/lib/rfuzz/pushbackio.rb +16 -2
- data/lib/rfuzz/session.rb +1 -1
- metadata +14 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000083.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000031.html +0 -22
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000046.html +0 -21
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000050.html +0 -22
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000071.html +0 -19
- data/doc/rdoc/classes/RFuzz/Session.src/M000034.html +0 -31
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'rfuzz/session'
|
|
3
|
+
require 'socket'
|
|
4
|
+
include RFuzz
|
|
5
|
+
|
|
6
|
+
r = RandomGenerator.new
|
|
7
|
+
|
|
8
|
+
loop do
|
|
9
|
+
begin
|
|
10
|
+
s = TCPSocket.new("127.0.0.1", 3000)
|
|
11
|
+
nout = 0
|
|
12
|
+
loop do
|
|
13
|
+
nout += s.write(r.bytes(100))
|
|
14
|
+
end
|
|
15
|
+
rescue Object
|
|
16
|
+
puts nout
|
|
17
|
+
s.close rescue Object
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
/** Data **/
|
|
25
25
|
|
|
26
26
|
#line 27 "ext/http11_client/http11_parser.c"
|
|
27
|
-
static int httpclient_parser_start = 0;
|
|
27
|
+
static const int httpclient_parser_start = 0;
|
|
28
28
|
|
|
29
|
-
static int httpclient_parser_first_final = 36;
|
|
29
|
+
static const int httpclient_parser_first_final = 36;
|
|
30
30
|
|
|
31
|
-
static int httpclient_parser_error = 1;
|
|
31
|
+
static const int httpclient_parser_error = 1;
|
|
32
32
|
|
|
33
33
|
#line 99 "ext/http11_client/http11_parser.rl"
|
|
34
34
|
|
|
@@ -69,8 +69,7 @@ size_t httpclient_parser_execute(httpclient_parser *parser, const char *buffer,
|
|
|
69
69
|
|
|
70
70
|
#line 71 "ext/http11_client/http11_parser.c"
|
|
71
71
|
{
|
|
72
|
-
p
|
|
73
|
-
if ( ++p == pe )
|
|
72
|
+
if ( p == pe )
|
|
74
73
|
goto _out;
|
|
75
74
|
switch ( cs )
|
|
76
75
|
{
|
|
@@ -114,7 +113,7 @@ st2:
|
|
|
114
113
|
if ( ++p == pe )
|
|
115
114
|
goto _out2;
|
|
116
115
|
case 2:
|
|
117
|
-
#line
|
|
116
|
+
#line 117 "ext/http11_client/http11_parser.c"
|
|
118
117
|
if ( (*p) == 10 )
|
|
119
118
|
goto tr34;
|
|
120
119
|
goto st1;
|
|
@@ -157,7 +156,7 @@ st36:
|
|
|
157
156
|
if ( ++p == pe )
|
|
158
157
|
goto _out36;
|
|
159
158
|
case 36:
|
|
160
|
-
#line
|
|
159
|
+
#line 160 "ext/http11_client/http11_parser.c"
|
|
161
160
|
goto st1;
|
|
162
161
|
tr16:
|
|
163
162
|
#line 23 "ext/http11_client/http11_parser.rl"
|
|
@@ -167,7 +166,7 @@ st3:
|
|
|
167
166
|
if ( ++p == pe )
|
|
168
167
|
goto _out3;
|
|
169
168
|
case 3:
|
|
170
|
-
#line
|
|
169
|
+
#line 170 "ext/http11_client/http11_parser.c"
|
|
171
170
|
switch( (*p) ) {
|
|
172
171
|
case 13: goto tr50;
|
|
173
172
|
case 59: goto tr51;
|
|
@@ -209,7 +208,7 @@ st4:
|
|
|
209
208
|
if ( ++p == pe )
|
|
210
209
|
goto _out4;
|
|
211
210
|
case 4:
|
|
212
|
-
#line
|
|
211
|
+
#line 212 "ext/http11_client/http11_parser.c"
|
|
213
212
|
if ( (*p) == 10 )
|
|
214
213
|
goto tr35;
|
|
215
214
|
goto st1;
|
|
@@ -221,7 +220,7 @@ st5:
|
|
|
221
220
|
if ( ++p == pe )
|
|
222
221
|
goto _out5;
|
|
223
222
|
case 5:
|
|
224
|
-
#line
|
|
223
|
+
#line 224 "ext/http11_client/http11_parser.c"
|
|
225
224
|
switch( (*p) ) {
|
|
226
225
|
case 13: goto tr25;
|
|
227
226
|
case 59: goto tr27;
|
|
@@ -263,7 +262,7 @@ st6:
|
|
|
263
262
|
if ( ++p == pe )
|
|
264
263
|
goto _out6;
|
|
265
264
|
case 6:
|
|
266
|
-
#line
|
|
265
|
+
#line 266 "ext/http11_client/http11_parser.c"
|
|
267
266
|
if ( (*p) == 10 )
|
|
268
267
|
goto tr33;
|
|
269
268
|
goto st1;
|
|
@@ -295,7 +294,7 @@ st7:
|
|
|
295
294
|
if ( ++p == pe )
|
|
296
295
|
goto _out7;
|
|
297
296
|
case 7:
|
|
298
|
-
#line
|
|
297
|
+
#line 298 "ext/http11_client/http11_parser.c"
|
|
299
298
|
switch( (*p) ) {
|
|
300
299
|
case 33: goto tr9;
|
|
301
300
|
case 124: goto tr9;
|
|
@@ -327,7 +326,7 @@ st8:
|
|
|
327
326
|
if ( ++p == pe )
|
|
328
327
|
goto _out8;
|
|
329
328
|
case 8:
|
|
330
|
-
#line
|
|
329
|
+
#line 330 "ext/http11_client/http11_parser.c"
|
|
331
330
|
switch( (*p) ) {
|
|
332
331
|
case 13: goto tr28;
|
|
333
332
|
case 33: goto st8;
|
|
@@ -366,7 +365,7 @@ st9:
|
|
|
366
365
|
if ( ++p == pe )
|
|
367
366
|
goto _out9;
|
|
368
367
|
case 9:
|
|
369
|
-
#line
|
|
368
|
+
#line 369 "ext/http11_client/http11_parser.c"
|
|
370
369
|
switch( (*p) ) {
|
|
371
370
|
case 33: goto tr10;
|
|
372
371
|
case 124: goto tr10;
|
|
@@ -398,7 +397,7 @@ st10:
|
|
|
398
397
|
if ( ++p == pe )
|
|
399
398
|
goto _out10;
|
|
400
399
|
case 10:
|
|
401
|
-
#line
|
|
400
|
+
#line 401 "ext/http11_client/http11_parser.c"
|
|
402
401
|
switch( (*p) ) {
|
|
403
402
|
case 13: goto tr22;
|
|
404
403
|
case 33: goto st10;
|
|
@@ -452,7 +451,7 @@ st11:
|
|
|
452
451
|
if ( ++p == pe )
|
|
453
452
|
goto _out11;
|
|
454
453
|
case 11:
|
|
455
|
-
#line
|
|
454
|
+
#line 455 "ext/http11_client/http11_parser.c"
|
|
456
455
|
switch( (*p) ) {
|
|
457
456
|
case 33: goto tr63;
|
|
458
457
|
case 124: goto tr63;
|
|
@@ -484,7 +483,7 @@ st12:
|
|
|
484
483
|
if ( ++p == pe )
|
|
485
484
|
goto _out12;
|
|
486
485
|
case 12:
|
|
487
|
-
#line
|
|
486
|
+
#line 487 "ext/http11_client/http11_parser.c"
|
|
488
487
|
switch( (*p) ) {
|
|
489
488
|
case 13: goto tr56;
|
|
490
489
|
case 33: goto st12;
|
|
@@ -523,7 +522,7 @@ st13:
|
|
|
523
522
|
if ( ++p == pe )
|
|
524
523
|
goto _out13;
|
|
525
524
|
case 13:
|
|
526
|
-
#line
|
|
525
|
+
#line 526 "ext/http11_client/http11_parser.c"
|
|
527
526
|
switch( (*p) ) {
|
|
528
527
|
case 33: goto tr61;
|
|
529
528
|
case 124: goto tr61;
|
|
@@ -555,7 +554,7 @@ st14:
|
|
|
555
554
|
if ( ++p == pe )
|
|
556
555
|
goto _out14;
|
|
557
556
|
case 14:
|
|
558
|
-
#line
|
|
557
|
+
#line 558 "ext/http11_client/http11_parser.c"
|
|
559
558
|
switch( (*p) ) {
|
|
560
559
|
case 13: goto tr47;
|
|
561
560
|
case 33: goto st14;
|
|
@@ -603,7 +602,7 @@ st15:
|
|
|
603
602
|
if ( ++p == pe )
|
|
604
603
|
goto _out15;
|
|
605
604
|
case 15:
|
|
606
|
-
#line
|
|
605
|
+
#line 606 "ext/http11_client/http11_parser.c"
|
|
607
606
|
switch( (*p) ) {
|
|
608
607
|
case 33: goto tr62;
|
|
609
608
|
case 124: goto tr62;
|
|
@@ -635,7 +634,7 @@ st16:
|
|
|
635
634
|
if ( ++p == pe )
|
|
636
635
|
goto _out16;
|
|
637
636
|
case 16:
|
|
638
|
-
#line
|
|
637
|
+
#line 638 "ext/http11_client/http11_parser.c"
|
|
639
638
|
switch( (*p) ) {
|
|
640
639
|
case 13: goto tr52;
|
|
641
640
|
case 33: goto st16;
|
|
@@ -674,7 +673,7 @@ st17:
|
|
|
674
673
|
if ( ++p == pe )
|
|
675
674
|
goto _out17;
|
|
676
675
|
case 17:
|
|
677
|
-
#line
|
|
676
|
+
#line 677 "ext/http11_client/http11_parser.c"
|
|
678
677
|
switch( (*p) ) {
|
|
679
678
|
case 33: goto tr60;
|
|
680
679
|
case 124: goto tr60;
|
|
@@ -706,7 +705,7 @@ st18:
|
|
|
706
705
|
if ( ++p == pe )
|
|
707
706
|
goto _out18;
|
|
708
707
|
case 18:
|
|
709
|
-
#line
|
|
708
|
+
#line 709 "ext/http11_client/http11_parser.c"
|
|
710
709
|
switch( (*p) ) {
|
|
711
710
|
case 13: goto tr44;
|
|
712
711
|
case 33: goto st18;
|
|
@@ -740,7 +739,7 @@ st19:
|
|
|
740
739
|
if ( ++p == pe )
|
|
741
740
|
goto _out19;
|
|
742
741
|
case 19:
|
|
743
|
-
#line
|
|
742
|
+
#line 743 "ext/http11_client/http11_parser.c"
|
|
744
743
|
if ( (*p) == 84 )
|
|
745
744
|
goto st20;
|
|
746
745
|
goto st1;
|
|
@@ -807,7 +806,7 @@ st27:
|
|
|
807
806
|
if ( ++p == pe )
|
|
808
807
|
goto _out27;
|
|
809
808
|
case 27:
|
|
810
|
-
#line
|
|
809
|
+
#line 810 "ext/http11_client/http11_parser.c"
|
|
811
810
|
if ( 48 <= (*p) && (*p) <= 57 )
|
|
812
811
|
goto tr4;
|
|
813
812
|
goto st1;
|
|
@@ -819,7 +818,7 @@ st28:
|
|
|
819
818
|
if ( ++p == pe )
|
|
820
819
|
goto _out28;
|
|
821
820
|
case 28:
|
|
822
|
-
#line
|
|
821
|
+
#line 822 "ext/http11_client/http11_parser.c"
|
|
823
822
|
if ( (*p) == 32 )
|
|
824
823
|
goto tr11;
|
|
825
824
|
if ( 48 <= (*p) && (*p) <= 57 )
|
|
@@ -835,7 +834,7 @@ st29:
|
|
|
835
834
|
if ( ++p == pe )
|
|
836
835
|
goto _out29;
|
|
837
836
|
case 29:
|
|
838
|
-
#line
|
|
837
|
+
#line 838 "ext/http11_client/http11_parser.c"
|
|
839
838
|
goto tr40;
|
|
840
839
|
tr40:
|
|
841
840
|
#line 23 "ext/http11_client/http11_parser.rl"
|
|
@@ -845,7 +844,7 @@ st30:
|
|
|
845
844
|
if ( ++p == pe )
|
|
846
845
|
goto _out30;
|
|
847
846
|
case 30:
|
|
848
|
-
#line
|
|
847
|
+
#line 848 "ext/http11_client/http11_parser.c"
|
|
849
848
|
if ( (*p) == 13 )
|
|
850
849
|
goto tr39;
|
|
851
850
|
goto st30;
|
|
@@ -865,7 +864,7 @@ st31:
|
|
|
865
864
|
if ( ++p == pe )
|
|
866
865
|
goto _out31;
|
|
867
866
|
case 31:
|
|
868
|
-
#line
|
|
867
|
+
#line 868 "ext/http11_client/http11_parser.c"
|
|
869
868
|
if ( (*p) == 10 )
|
|
870
869
|
goto st32;
|
|
871
870
|
goto st1;
|
|
@@ -905,7 +904,7 @@ st33:
|
|
|
905
904
|
if ( ++p == pe )
|
|
906
905
|
goto _out33;
|
|
907
906
|
case 33:
|
|
908
|
-
#line
|
|
907
|
+
#line 908 "ext/http11_client/http11_parser.c"
|
|
909
908
|
switch( (*p) ) {
|
|
910
909
|
case 33: goto st33;
|
|
911
910
|
case 58: goto tr8;
|
|
@@ -944,7 +943,7 @@ st34:
|
|
|
944
943
|
if ( ++p == pe )
|
|
945
944
|
goto _out34;
|
|
946
945
|
case 34:
|
|
947
|
-
#line
|
|
946
|
+
#line 947 "ext/http11_client/http11_parser.c"
|
|
948
947
|
switch( (*p) ) {
|
|
949
948
|
case 13: goto tr37;
|
|
950
949
|
case 32: goto tr42;
|
|
@@ -958,7 +957,7 @@ st35:
|
|
|
958
957
|
if ( ++p == pe )
|
|
959
958
|
goto _out35;
|
|
960
959
|
case 35:
|
|
961
|
-
#line
|
|
960
|
+
#line 961 "ext/http11_client/http11_parser.c"
|
|
962
961
|
if ( (*p) == 13 )
|
|
963
962
|
goto tr37;
|
|
964
963
|
goto st35;
|
|
@@ -1017,7 +1016,7 @@ case 35:
|
|
|
1017
1016
|
if(parser->body_start) {
|
|
1018
1017
|
/* final \r\n combo encountered so stop right here */
|
|
1019
1018
|
|
|
1020
|
-
#line
|
|
1019
|
+
#line 1020 "ext/http11_client/http11_parser.c"
|
|
1021
1020
|
#line 144 "ext/http11_client/http11_parser.rl"
|
|
1022
1021
|
parser->nread++;
|
|
1023
1022
|
}
|
|
@@ -1030,7 +1029,7 @@ int httpclient_parser_finish(httpclient_parser *parser)
|
|
|
1030
1029
|
int cs = parser->cs;
|
|
1031
1030
|
|
|
1032
1031
|
|
|
1033
|
-
#line
|
|
1032
|
+
#line 1033 "ext/http11_client/http11_parser.c"
|
|
1034
1033
|
#line 155 "ext/http11_client/http11_parser.rl"
|
|
1035
1034
|
|
|
1036
1035
|
parser->cs = cs;
|
data/lib/rfuzz/client.rb
CHANGED
|
@@ -224,7 +224,7 @@ module RFuzz
|
|
|
224
224
|
CRLF="\r\n"
|
|
225
225
|
|
|
226
226
|
# Access to the host, port, default options, and cookies currently in play
|
|
227
|
-
attr_accessor :host, :port, :options, :cookies, :allowed_methods, :notifier
|
|
227
|
+
attr_accessor :host, :port, :options, :cookies, :allowed_methods, :notifier, :sock
|
|
228
228
|
|
|
229
229
|
# Doesn't make the connect until you actually call a .put,.get, etc.
|
|
230
230
|
def initialize(host, port, options = {})
|
data/lib/rfuzz/pushbackio.rb
CHANGED
|
@@ -11,22 +11,33 @@ module RFuzz
|
|
|
11
11
|
def initialize(secondary)
|
|
12
12
|
@secondary = secondary
|
|
13
13
|
@buffer = StringIO.new
|
|
14
|
+
@die_after = rand($io_death_count) if $io_death_count
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def random_death
|
|
18
|
+
if $io_death_count
|
|
19
|
+
@die_after -= 1
|
|
20
|
+
close if @die_after <= 0
|
|
21
|
+
end
|
|
14
22
|
end
|
|
15
23
|
|
|
16
24
|
# Pushes the given string content back onto the stream for the
|
|
17
25
|
# next read to handle.
|
|
18
26
|
def push(content)
|
|
27
|
+
random_death
|
|
19
28
|
if content.length > 0
|
|
20
29
|
@buffer.write(content)
|
|
21
30
|
end
|
|
22
31
|
end
|
|
23
32
|
|
|
24
33
|
def pop(n)
|
|
34
|
+
random_death
|
|
25
35
|
@buffer.rewind
|
|
26
36
|
@buffer.read(n) || ""
|
|
27
37
|
end
|
|
28
38
|
|
|
29
39
|
def reset
|
|
40
|
+
random_death
|
|
30
41
|
@buffer.string = @buffer.read # reset out internal buffer
|
|
31
42
|
end
|
|
32
43
|
|
|
@@ -38,6 +49,7 @@ module RFuzz
|
|
|
38
49
|
#
|
|
39
50
|
# If partial==true then readpartial is used instead.
|
|
40
51
|
def read(n, partial=false)
|
|
52
|
+
random_death
|
|
41
53
|
r = pop(n)
|
|
42
54
|
needs = n - r.length
|
|
43
55
|
|
|
@@ -49,7 +61,7 @@ module RFuzz
|
|
|
49
61
|
sec = @secondary.readpartial(needs)
|
|
50
62
|
end
|
|
51
63
|
rescue EOFError
|
|
52
|
-
|
|
64
|
+
close
|
|
53
65
|
end
|
|
54
66
|
else
|
|
55
67
|
protect { sec = @secondary.read(needs)}
|
|
@@ -68,15 +80,17 @@ module RFuzz
|
|
|
68
80
|
end
|
|
69
81
|
|
|
70
82
|
def flush
|
|
83
|
+
random_death
|
|
71
84
|
protect { @secondary.flush }
|
|
72
85
|
end
|
|
73
86
|
|
|
74
87
|
def write(content)
|
|
88
|
+
random_death
|
|
75
89
|
protect { @secondary.write(content) }
|
|
76
90
|
end
|
|
77
91
|
|
|
78
92
|
def close
|
|
79
|
-
|
|
93
|
+
@secondary.close rescue nil
|
|
80
94
|
end
|
|
81
95
|
|
|
82
96
|
def protect
|
data/lib/rfuzz/session.rb
CHANGED
|
@@ -68,7 +68,7 @@ module RFuzz
|
|
|
68
68
|
yield @client, @rand
|
|
69
69
|
|
|
70
70
|
# record the request stats then reset them
|
|
71
|
-
sample.each {|s| cur_run[s] = @client.notifier.stats[s].clone }
|
|
71
|
+
sample.each {|s| cur_run[s] = @client.notifier.stats[s].clone if @client.notifier.stats[s] }
|
|
72
72
|
@client.notifier.reset
|
|
73
73
|
end
|
|
74
74
|
|
metadata
CHANGED
|
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
|
3
3
|
specification_version: 1
|
|
4
4
|
name: rfuzz
|
|
5
5
|
version: !ruby/object:Gem::Version
|
|
6
|
-
version: "0.
|
|
7
|
-
date: 2006-
|
|
6
|
+
version: "0.9"
|
|
7
|
+
date: 2006-09-18 00:00:00 -07:00
|
|
8
8
|
summary: The rfuzz web server destructor
|
|
9
9
|
require_paths:
|
|
10
10
|
- lib
|
|
@@ -75,13 +75,12 @@ files:
|
|
|
75
75
|
- doc/rdoc/classes/RFuzz/Browser.src
|
|
76
76
|
- doc/rdoc/classes/RFuzz/RandomGenerator.html
|
|
77
77
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src
|
|
78
|
-
- doc/rdoc/classes/RFuzz/StatsTracker.src/M000065.html
|
|
79
78
|
- doc/rdoc/classes/RFuzz/StatsTracker.src/M000066.html
|
|
80
79
|
- doc/rdoc/classes/RFuzz/StatsTracker.src/M000067.html
|
|
81
80
|
- doc/rdoc/classes/RFuzz/StatsTracker.src/M000068.html
|
|
82
81
|
- doc/rdoc/classes/RFuzz/StatsTracker.src/M000069.html
|
|
83
82
|
- doc/rdoc/classes/RFuzz/StatsTracker.src/M000070.html
|
|
84
|
-
- doc/rdoc/classes/RFuzz/
|
|
83
|
+
- doc/rdoc/classes/RFuzz/StatsTracker.src/M000071.html
|
|
85
84
|
- doc/rdoc/classes/RFuzz/HttpClient.src/M000020.html
|
|
86
85
|
- doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html
|
|
87
86
|
- doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html
|
|
@@ -93,6 +92,7 @@ files:
|
|
|
93
92
|
- doc/rdoc/classes/RFuzz/HttpClient.src/M000028.html
|
|
94
93
|
- doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html
|
|
95
94
|
- doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html
|
|
95
|
+
- doc/rdoc/classes/RFuzz/HttpClient.src/M000031.html
|
|
96
96
|
- doc/rdoc/classes/RFuzz/HttpEncoding.src/M000008.html
|
|
97
97
|
- doc/rdoc/classes/RFuzz/HttpEncoding.src/M000009.html
|
|
98
98
|
- doc/rdoc/classes/RFuzz/HttpEncoding.src/M000001.html
|
|
@@ -102,7 +102,6 @@ files:
|
|
|
102
102
|
- doc/rdoc/classes/RFuzz/HttpEncoding.src/M000005.html
|
|
103
103
|
- doc/rdoc/classes/RFuzz/HttpEncoding.src/M000006.html
|
|
104
104
|
- doc/rdoc/classes/RFuzz/HttpEncoding.src/M000007.html
|
|
105
|
-
- doc/rdoc/classes/RFuzz/Session.src/M000034.html
|
|
106
105
|
- doc/rdoc/classes/RFuzz/Session.src/M000035.html
|
|
107
106
|
- doc/rdoc/classes/RFuzz/Session.src/M000036.html
|
|
108
107
|
- doc/rdoc/classes/RFuzz/Session.src/M000037.html
|
|
@@ -114,6 +113,7 @@ files:
|
|
|
114
113
|
- doc/rdoc/classes/RFuzz/Session.src/M000043.html
|
|
115
114
|
- doc/rdoc/classes/RFuzz/Session.src/M000044.html
|
|
116
115
|
- doc/rdoc/classes/RFuzz/Session.src/M000045.html
|
|
116
|
+
- doc/rdoc/classes/RFuzz/Session.src/M000046.html
|
|
117
117
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000076.html
|
|
118
118
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000077.html
|
|
119
119
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000078.html
|
|
@@ -121,7 +121,7 @@ files:
|
|
|
121
121
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000080.html
|
|
122
122
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000081.html
|
|
123
123
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000082.html
|
|
124
|
-
- doc/rdoc/classes/RFuzz/Sampler.src/
|
|
124
|
+
- doc/rdoc/classes/RFuzz/Sampler.src/M000083.html
|
|
125
125
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000072.html
|
|
126
126
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000073.html
|
|
127
127
|
- doc/rdoc/classes/RFuzz/Sampler.src/M000074.html
|
|
@@ -135,22 +135,22 @@ files:
|
|
|
135
135
|
- doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html
|
|
136
136
|
- doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html
|
|
137
137
|
- doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html
|
|
138
|
-
- doc/rdoc/classes/RFuzz/
|
|
138
|
+
- doc/rdoc/classes/RFuzz/PushBackIO.src/M000019.html
|
|
139
139
|
- doc/rdoc/classes/RFuzz/Notifier.src/M000059.html
|
|
140
140
|
- doc/rdoc/classes/RFuzz/Notifier.src/M000060.html
|
|
141
141
|
- doc/rdoc/classes/RFuzz/Notifier.src/M000061.html
|
|
142
142
|
- doc/rdoc/classes/RFuzz/Notifier.src/M000062.html
|
|
143
143
|
- doc/rdoc/classes/RFuzz/Notifier.src/M000063.html
|
|
144
144
|
- doc/rdoc/classes/RFuzz/Notifier.src/M000064.html
|
|
145
|
-
- doc/rdoc/classes/RFuzz/
|
|
145
|
+
- doc/rdoc/classes/RFuzz/Notifier.src/M000065.html
|
|
146
146
|
- doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html
|
|
147
147
|
- doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html
|
|
148
|
-
- doc/rdoc/classes/RFuzz/
|
|
148
|
+
- doc/rdoc/classes/RFuzz/HttpResponse.src/M000034.html
|
|
149
149
|
- doc/rdoc/classes/RFuzz/Browser.src/M000084.html
|
|
150
150
|
- doc/rdoc/classes/RFuzz/Browser.src/M000085.html
|
|
151
|
-
- doc/rdoc/classes/RFuzz/
|
|
151
|
+
- doc/rdoc/classes/RFuzz/Browser.src/M000086.html
|
|
152
152
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000047.html
|
|
153
|
-
- doc/rdoc/classes/RFuzz/RandomGenerator.src/
|
|
153
|
+
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000048.html
|
|
154
154
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000051.html
|
|
155
155
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html
|
|
156
156
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000053.html
|
|
@@ -158,6 +158,7 @@ files:
|
|
|
158
158
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000055.html
|
|
159
159
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000056.html
|
|
160
160
|
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html
|
|
161
|
+
- doc/rdoc/classes/RFuzz/RandomGenerator.src/M000058.html
|
|
161
162
|
- ext/http11_client/http11_parser.h
|
|
162
163
|
- ext/http11_client/ext_help.h
|
|
163
164
|
- ext/fuzzrnd/ext_help.h
|
|
@@ -168,7 +169,9 @@ files:
|
|
|
168
169
|
- ext/fuzzrnd/extconf.rb
|
|
169
170
|
- examples/rails_security_test.rb
|
|
170
171
|
- examples/cl_watcher.rb
|
|
172
|
+
- examples/randomizer.rb
|
|
171
173
|
- examples/kill_routes.rb
|
|
174
|
+
- examples/random_sockets.rb
|
|
172
175
|
- examples/perftest.rb
|
|
173
176
|
- examples/hpricot_pudding.rb
|
|
174
177
|
- examples/amazon_headers.rb
|