rfuzz 0.6 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +18 -17
- data/Rakefile +8 -3
- data/doc/rdoc/classes/RFuzz/Browser.html +229 -0
- data/doc/rdoc/classes/RFuzz/Browser.src/M000068.html +25 -0
- data/doc/rdoc/classes/RFuzz/Browser.src/M000069.html +23 -0
- data/doc/rdoc/classes/RFuzz/Browser.src/M000070.html +24 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.html +10 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000010.html +10 -10
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000011.html +18 -18
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000012.html +36 -35
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000013.html +35 -35
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000014.html +43 -43
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000015.html +22 -22
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000016.html +12 -12
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000017.html +18 -18
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000018.html +4 -4
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +12 -12
- data/doc/rdoc/classes/RFuzz/HttpEncoding.html +13 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000001.html +12 -12
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000002.html +4 -4
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000003.html +12 -12
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000004.html +4 -4
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000005.html +18 -18
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000006.html +4 -4
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000007.html +6 -6
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000008.html +6 -6
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000009.html +18 -18
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000044.html +3 -3
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000045.html +3 -3
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000046.html +3 -3
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000047.html +3 -3
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000048.html +3 -3
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000049.html +3 -3
- data/doc/rdoc/classes/RFuzz/Session.html +11 -1
- data/doc/rdoc/classes/RFuzz/Session.src/M000020.html +16 -16
- data/doc/rdoc/classes/RFuzz/Session.src/M000021.html +4 -4
- data/doc/rdoc/classes/RFuzz/Session.src/M000022.html +4 -4
- data/doc/rdoc/classes/RFuzz/Session.src/M000023.html +20 -20
- data/doc/rdoc/classes/RFuzz/Session.src/M000024.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000025.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000026.html +12 -12
- data/doc/rdoc/classes/RFuzz/Session.src/M000027.html +15 -15
- data/doc/rdoc/classes/RFuzz/Session.src/M000028.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000029.html +4 -4
- data/doc/rdoc/classes/RFuzz/Session.src/M000030.html +4 -4
- data/doc/rdoc/classes/RFuzz/Session.src/M000031.html +9 -9
- data/doc/rdoc/classes/RFuzz.html +5 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/COPYING.html +1 -1
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +23 -24
- data/doc/rdoc/files/lib/rfuzz/browser_rb.html +109 -0
- data/doc/rdoc/files/lib/rfuzz/client_rb.html +2 -1
- data/doc/rdoc/files/lib/rfuzz/random_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/rfuzz_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/stats_rb.html +1 -1
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_file_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +9 -6
- data/examples/cl_watcher.rb +36 -0
- data/examples/mongrel_test_suite/test/http/access_authentication.rb +8 -0
- data/examples/mongrel_test_suite/test/http/appendix.rb +76 -0
- data/examples/mongrel_test_suite/test/http/base_protocol.rb +4 -7
- data/examples/mongrel_test_suite/test/http/caching_in_http.rb +140 -0
- data/examples/mongrel_test_suite/test/http/connections.rb +48 -0
- data/examples/mongrel_test_suite/test/http/content_negotiation.rb +20 -0
- data/examples/mongrel_test_suite/test/http/entity.rb +24 -0
- data/examples/mongrel_test_suite/test/http/header_field_definitions.rb +231 -0
- data/examples/mongrel_test_suite/test/http/http_message.rb +122 -0
- data/examples/mongrel_test_suite/test/http/method_definitions.rb +52 -0
- data/examples/mongrel_test_suite/test/http/protocol_parameters.rb +286 -0
- data/examples/mongrel_test_suite/test/http/request.rb +28 -0
- data/examples/mongrel_test_suite/test/http/response.rb +20 -0
- data/examples/mongrel_test_suite/test/http/security_considerations.rb +54 -0
- data/examples/mongrel_test_suite/test/http/status_code_definitions.rb +192 -0
- data/ext/fuzzrnd/fuzzrnd.c +1 -2
- data/lib/rfuzz/browser.rb +53 -0
- data/lib/rfuzz/client.rb +11 -6
- data/lib/rfuzz/session.rb +3 -1
- data/tools/rakehelp.rb +4 -2
- metadata +24 -15
- data/test/coverage/index.html +0 -388
- data/test/coverage/lib-rfuzz-client_rb.html +0 -1127
- data/test/coverage/lib-rfuzz-random_rb.html +0 -739
- data/test/coverage/lib-rfuzz-session_rb.html +0 -783
- data/test/coverage/lib-rfuzz-stats_rb.html +0 -788
- data/test/server.rb +0 -101
- data/test/test_client.rb +0 -164
- data/test/test_fuzzrnd.rb +0 -31
- data/test/test_httpparser.rb +0 -48
- data/test/test_random.rb +0 -75
- data/test/test_session.rb +0 -33
- data/test/test_stats.rb +0 -45
@@ -10,9 +10,9 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 136</span>
|
14
|
+
136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_runs</span>(<span class="ruby-identifier">file</span>)
|
15
|
+
137: <span class="ruby-constant">CSV</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>,<span class="ruby-value str">"w"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">out</span><span class="ruby-operator">|</span> <span class="ruby-identifier">runs_to_a</span>(<span class="ruby-identifier">headers</span>=<span class="ruby-keyword kw">true</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span> } }
|
16
|
+
138: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -10,9 +10,9 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 141</span>
|
14
|
+
141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_counts</span>(<span class="ruby-identifier">file</span>)
|
15
|
+
142: <span class="ruby-constant">CSV</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>,<span class="ruby-value str">"w"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">out</span><span class="ruby-operator">|</span> <span class="ruby-identifier">counts_to_a</span>(<span class="ruby-identifier">headers</span>=<span class="ruby-keyword kw">true</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span> } }
|
16
|
+
143: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -10,14 +10,14 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 147</span>
|
14
|
+
147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count_errors</span>(<span class="ruby-identifier">as</span>)
|
15
|
+
148: <span class="ruby-keyword kw">begin</span>
|
16
|
+
149: <span class="ruby-keyword kw">yield</span>
|
17
|
+
150: <span class="ruby-keyword kw">rescue</span>
|
18
|
+
151: <span class="ruby-identifier">count</span> <span class="ruby-identifier">as</span>
|
19
|
+
152: <span class="ruby-identifier">count</span> <span class="ruby-identifier">$!</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">":"</span>,<span class="ruby-value str">""</span>)
|
20
|
+
153: <span class="ruby-keyword kw">end</span>
|
21
|
+
154: <span class="ruby-keyword kw">end</span></pre>
|
22
22
|
</body>
|
23
23
|
</html>
|
data/doc/rdoc/classes/RFuzz.html
CHANGED
@@ -55,6 +55,10 @@
|
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
57
57
|
<td>
|
58
|
+
<a href="../files/lib/rfuzz/browser_rb.html">
|
59
|
+
lib/rfuzz/browser.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
58
62
|
<a href="../files/lib/rfuzz/random_rb.html">
|
59
63
|
lib/rfuzz/random.rb
|
60
64
|
</a>
|
@@ -116,6 +120,7 @@ fly.
|
|
116
120
|
<h3 class="section-bar">Classes and Modules</h3>
|
117
121
|
|
118
122
|
Module <a href="RFuzz/HttpEncoding.html" class="link">RFuzz::HttpEncoding</a><br />
|
123
|
+
Class <a href="RFuzz/Browser.html" class="link">RFuzz::Browser</a><br />
|
119
124
|
Class <a href="RFuzz/HttpClient.html" class="link">RFuzz::HttpClient</a><br />
|
120
125
|
Class <a href="RFuzz/HttpResponse.html" class="link">RFuzz::HttpResponse</a><br />
|
121
126
|
Class <a href="RFuzz/Notifier.html" class="link">RFuzz::Notifier</a><br />
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Fri Aug 04 13:20:51 PDT 2006
|
data/doc/rdoc/files/COPYING.html
CHANGED
data/doc/rdoc/files/LICENSE.html
CHANGED
data/doc/rdoc/files/README.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Wed Jul 19
|
59
|
+
<td>Wed Jul 19 15:02:32 PDT 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -80,10 +80,16 @@ to a web server.
|
|
80
80
|
At the moment is has a working and fairly extensive HTTP 1.1 client and
|
81
81
|
some basic statistics math borrowed from the Mongrel project.
|
82
82
|
</p>
|
83
|
+
<h2>RubyForge Project</h2>
|
83
84
|
<p>
|
84
|
-
|
85
|
-
|
86
|
-
|
85
|
+
The project is hosted at:
|
86
|
+
</p>
|
87
|
+
<pre>
|
88
|
+
http://rubyforge.org/projects/rfuzz/
|
89
|
+
</pre>
|
90
|
+
<p>
|
91
|
+
Where you can file bugs and other things, as well as download gems
|
92
|
+
manually.
|
87
93
|
</p>
|
88
94
|
<h2>Motivation</h2>
|
89
95
|
<p>
|
@@ -102,18 +108,18 @@ It may also perform analysis of performance data and work as a simply load
|
|
102
108
|
or pen testing tool. This is only a secondary goal though since
|
103
109
|
there’s plenty of good tools for that.
|
104
110
|
</p>
|
105
|
-
<h2>
|
111
|
+
<h2>Installing</h2>
|
106
112
|
<p>
|
107
|
-
|
108
|
-
|
109
|
-
href="http://www.zedshaw.com/projects/rfuzz/rfuzz-0.4.gem">www.zedshaw.com/projects/rfuzz/rfuzz-0.4.gem</a>
|
110
|
-
or <a
|
111
|
-
href="http://www.zedshaw.com/projects/rfuzz/rfuzz-0.4.tgz">www.zedshaw.com/projects/rfuzz/rfuzz-0.4.tgz</a>
|
112
|
-
for the 0.4 version.
|
113
|
+
You can install <a href="../classes/RFuzz.html">RFuzz</a> by simply using
|
114
|
+
RubyGems:
|
113
115
|
</p>
|
116
|
+
<pre>
|
117
|
+
sudo gem install rfuzz
|
118
|
+
</pre>
|
114
119
|
<p>
|
115
|
-
|
116
|
-
|
120
|
+
It doesn’t support windows unless you have build tools that can
|
121
|
+
compile modules against Ruby. No, you don’t get this with Ruby One
|
122
|
+
Click.
|
117
123
|
</p>
|
118
124
|
<h2><a href="../classes/RFuzz.html">RFuzz</a> HTTP Client</h2>
|
119
125
|
<p>
|
@@ -188,11 +194,10 @@ cookies, and headers in blocks of requests to reduce repetition.
|
|
188
194
|
</p>
|
189
195
|
<h3>Client Limitations</h3>
|
190
196
|
<p>
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
handle large HTTP bodies yet.
|
197
|
+
The client handles chunked encoding inside the parser but the code for it
|
198
|
+
is still quite nasty. I’ll be attacking that and cleaning it up very
|
199
|
+
soon. Even with this it’s able to efficiently parse chunked encodings
|
200
|
+
without many problems (but could be better).
|
196
201
|
</p>
|
197
202
|
<p>
|
198
203
|
It can’t also parse cookies properly yet, so the above example kind
|
@@ -427,12 +432,6 @@ later that there was some confounding element which made the test invalid.
|
|
427
432
|
</p>
|
428
433
|
<h2>Source Code</h2>
|
429
434
|
<p>
|
430
|
-
The .tgz file (mentioned Downloading) has the source if you’re
|
431
|
-
interested. Remember that *you must have a rails app on 3000* for the tests
|
432
|
-
to run. Just a limitation right now until I hook Mongrel into the test
|
433
|
-
framework as the feedback loop.
|
434
|
-
</p>
|
435
|
-
<p>
|
436
435
|
You can also view <a
|
437
436
|
href="http://www.zedshaw.com/projects/rfuzz/coverage">www.zedshaw.com/projects/rfuzz/coverage</a>/
|
438
437
|
for the rcov generated coverage report which is also a decent source
|
@@ -0,0 +1,109 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: browser.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>browser.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/rfuzz/browser.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Fri Aug 04 12:52:27 PDT 2006</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
rfuzz/session
|
77
|
+
hpricot
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
<!-- if includes -->
|
88
|
+
|
89
|
+
<div id="section">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if method_list -->
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<div id="validator-badges">
|
105
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</body>
|
109
|
+
</html>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Fri Aug 04 13:20:40 PDT 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -77,6 +77,7 @@
|
|
77
77
|
socket
|
78
78
|
stringio
|
79
79
|
rfuzz/stats
|
80
|
+
timeout
|
80
81
|
</div>
|
81
82
|
</div>
|
82
83
|
|
@@ -21,6 +21,7 @@
|
|
21
21
|
<h1 class="section-bar">Classes</h1>
|
22
22
|
<div id="index-entries">
|
23
23
|
<a href="classes/RFuzz.html">RFuzz</a><br />
|
24
|
+
<a href="classes/RFuzz/Browser.html">RFuzz::Browser</a><br />
|
24
25
|
<a href="classes/RFuzz/HttpClient.html">RFuzz::HttpClient</a><br />
|
25
26
|
<a href="classes/RFuzz/HttpEncoding.html">RFuzz::HttpEncoding</a><br />
|
26
27
|
<a href="classes/RFuzz/HttpResponse.html">RFuzz::HttpResponse</a><br />
|
data/doc/rdoc/fr_file_index.html
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
<a href="files/COPYING.html">COPYING</a><br />
|
24
24
|
<a href="files/LICENSE.html">LICENSE</a><br />
|
25
25
|
<a href="files/README.html">README</a><br />
|
26
|
+
<a href="files/lib/rfuzz/browser_rb.html">lib/rfuzz/browser.rb</a><br />
|
26
27
|
<a href="files/lib/rfuzz/client_rb.html">lib/rfuzz/client.rb</a><br />
|
27
28
|
<a href="files/lib/rfuzz/random_rb.html">lib/rfuzz/random.rb</a><br />
|
28
29
|
<a href="files/lib/rfuzz/rfuzz_rb.html">lib/rfuzz/rfuzz.rb</a><br />
|
@@ -44,16 +44,18 @@
|
|
44
44
|
<a href="classes/RFuzz/RandomGenerator.html#M000035">headers (RFuzz::RandomGenerator)</a><br />
|
45
45
|
<a href="classes/RFuzz/RandomGenerator.html#M000042">ints (RFuzz::RandomGenerator)</a><br />
|
46
46
|
<a href="classes/RFuzz/Sampler.html#M000062">keys (RFuzz::Sampler)</a><br />
|
47
|
-
<a href="classes/RFuzz/
|
47
|
+
<a href="classes/RFuzz/Browser.html#M000070">links (RFuzz::Browser)</a><br />
|
48
48
|
<a href="classes/RFuzz/StatsTracker.html#M000051">mark (RFuzz::StatsTracker)</a><br />
|
49
|
+
<a href="classes/RFuzz/Sampler.html#M000066">mark (RFuzz::Sampler)</a><br />
|
49
50
|
<a href="classes/RFuzz/Sampler.html#M000064">mean (RFuzz::Sampler)</a><br />
|
50
51
|
<a href="classes/RFuzz/HttpClient.html#M000016">method_missing (RFuzz::HttpClient)</a><br />
|
51
52
|
<a href="classes/RFuzz/StatsTracker.html#M000054">method_missing (RFuzz::StatsTracker)</a><br />
|
52
|
-
<a href="classes/RFuzz/Sampler.html#M000056">new (RFuzz::Sampler)</a><br />
|
53
53
|
<a href="classes/RFuzz/Session.html#M000020">new (RFuzz::Session)</a><br />
|
54
54
|
<a href="classes/RFuzz/RandomGenerator.html#M000032">new (RFuzz::RandomGenerator)</a><br />
|
55
|
-
<a href="classes/RFuzz/HttpClient.html#M000010">new (RFuzz::HttpClient)</a><br />
|
56
55
|
<a href="classes/RFuzz/StatsTracker.html#M000050">new (RFuzz::StatsTracker)</a><br />
|
56
|
+
<a href="classes/RFuzz/HttpClient.html#M000010">new (RFuzz::HttpClient)</a><br />
|
57
|
+
<a href="classes/RFuzz/Browser.html#M000068">new (RFuzz::Browser)</a><br />
|
58
|
+
<a href="classes/RFuzz/Sampler.html#M000056">new (RFuzz::Sampler)</a><br />
|
57
59
|
<a href="classes/RFuzz/HttpClient.html#M000019">notify (RFuzz::HttpClient)</a><br />
|
58
60
|
<a href="classes/RFuzz/RandomGenerator.html#M000041">num (RFuzz::RandomGenerator)</a><br />
|
59
61
|
<a href="classes/RFuzz/RandomGenerator.html#M000034">queries (RFuzz::RandomGenerator)</a><br />
|
@@ -63,19 +65,20 @@
|
|
63
65
|
<a href="classes/RFuzz/HttpClient.html#M000012">read_chunks (RFuzz::HttpClient)</a><br />
|
64
66
|
<a href="classes/RFuzz/Notifier.html#M000047">read_header (RFuzz::Notifier)</a><br />
|
65
67
|
<a href="classes/RFuzz/HttpClient.html#M000014">read_response (RFuzz::HttpClient)</a><br />
|
66
|
-
<a href="classes/RFuzz/HttpClient.html#M000017">redirect (RFuzz::HttpClient)</a><br />
|
67
68
|
<a href="classes/RFuzz/Notifier.html#M000046">redirect (RFuzz::Notifier)</a><br />
|
69
|
+
<a href="classes/RFuzz/HttpClient.html#M000017">redirect (RFuzz::HttpClient)</a><br />
|
68
70
|
<a href="classes/RFuzz/Sampler.html#M000057">reset (RFuzz::Sampler)</a><br />
|
69
71
|
<a href="classes/RFuzz/StatsTracker.html#M000053">reset (RFuzz::StatsTracker)</a><br />
|
70
72
|
<a href="classes/RFuzz/HttpClient.html#M000018">reset (RFuzz::HttpClient)</a><br />
|
71
73
|
<a href="classes/RFuzz/Session.html#M000023">run (RFuzz::Session)</a><br />
|
72
74
|
<a href="classes/RFuzz/Session.html#M000026">runs_to_a (RFuzz::Session)</a><br />
|
73
|
-
<a href="classes/RFuzz/Sampler.html#M000058">sample (RFuzz::Sampler)</a><br />
|
74
|
-
<a href="classes/RFuzz/StatsTracker.html#M000052">sample (RFuzz::StatsTracker)</a><br />
|
75
75
|
<a href="classes/RFuzz/Session.html#M000024">sample (RFuzz::Session)</a><br />
|
76
|
+
<a href="classes/RFuzz/StatsTracker.html#M000052">sample (RFuzz::StatsTracker)</a><br />
|
77
|
+
<a href="classes/RFuzz/Sampler.html#M000058">sample (RFuzz::Sampler)</a><br />
|
76
78
|
<a href="classes/RFuzz/Sampler.html#M000065">sd (RFuzz::Sampler)</a><br />
|
77
79
|
<a href="classes/RFuzz/HttpClient.html#M000015">send_request (RFuzz::HttpClient)</a><br />
|
78
80
|
<a href="classes/RFuzz/Notifier.html#M000045">send_request (RFuzz::Notifier)</a><br />
|
81
|
+
<a href="classes/RFuzz/Browser.html#M000069">start (RFuzz::Browser)</a><br />
|
79
82
|
<a href="classes/RFuzz/Sampler.html#M000067">tick (RFuzz::Sampler)</a><br />
|
80
83
|
<a href="classes/RFuzz/Sampler.html#M000063">to_hash (RFuzz::Sampler)</a><br />
|
81
84
|
<a href="classes/RFuzz/StatsTracker.html#M000055">to_s (RFuzz::StatsTracker)</a><br />
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rfuzz/browser'
|
3
|
+
include RFuzz
|
4
|
+
require 'pstore'
|
5
|
+
|
6
|
+
if ARGV.length != 4
|
7
|
+
puts "usage: ruby cl_watcher.rb city cat areaID \"search\""
|
8
|
+
exit 1
|
9
|
+
end
|
10
|
+
|
11
|
+
city, cat, areaID, search = ARGV[0], ARGV[1], ARGV[2], ARGV[3]
|
12
|
+
href_seen = PStore.new("watcher_seen_links.pstore")
|
13
|
+
web = Browser.new("#{city}.craigslist.org")
|
14
|
+
|
15
|
+
loop do
|
16
|
+
|
17
|
+
puts "Checking..."
|
18
|
+
|
19
|
+
web.start("/cgi-bin/search", :query => {"areaID" => areaID, "subAreaID" => "0","query" => search, "catAbbreviation" => cat, "minAsk" => "min", "maxAsk" => "max"})
|
20
|
+
|
21
|
+
href_seen.transaction do
|
22
|
+
web.links(/#{city}.craigslist.org\/#{cat}/).each do |link|
|
23
|
+
href = link.attributes["href"]
|
24
|
+
if !href_seen[href]
|
25
|
+
puts href
|
26
|
+
puts " -- " + link.children.join
|
27
|
+
`firefox '#{href}'`
|
28
|
+
href_seen[href] = link
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
puts "----\nSleeping..."
|
34
|
+
sleep 60 * (rand(10)+3)
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'rfuzz/session'
|
2
|
+
|
3
|
+
context "19: Appendix" do
|
4
|
+
|
5
|
+
setup do
|
6
|
+
@sess = RFuzz::Session.new :host => "localhost", :port => 3000
|
7
|
+
end
|
8
|
+
|
9
|
+
specify "19.1: Internet Media Type message/http and application/http" do
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
specify "19.2: Internet Media Type multipart/byteranges" do
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
specify "19.3: Tolerant Applications" do
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
specify "19.4: Differences Between HTTP Entities and RFC 2045 Entities" do
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
specify "19.4.1: MIME-Version" do
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
specify "19.4.2: Conversion to Canonical Form" do
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
specify "19.4.3: Conversion of Date Formats" do
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
specify "19.4.4: Introduction of Content-Encoding" do
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
specify "19.4.5: No Content-Transfer-Encoding" do
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
specify "19.4.6: Introduction of Transfer-Encoding" do
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
specify "19.4.7: MHTML and Line Length Limitations" do
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
specify "19.5: Additional Features" do
|
54
|
+
end
|
55
|
+
|
56
|
+
|
57
|
+
specify "19.5.1: Content-Disposition" do
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
specify "19.6: Compatibility with Previous Versions" do
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
specify "19.6.1: Changes from HTTP/1" do
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
specify "19.6.2: Compatibility with HTTP/1" do
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
specify "19.6.3: Changes from RFC 2068" do
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
@@ -7,15 +7,12 @@ context "Base HTTP Protocol" do
|
|
7
7
|
|
8
8
|
specify "Blocks Long URIs" do
|
9
9
|
@sess.run(10) do |c,r|
|
10
|
-
|
11
|
-
uris = r.uris(50,len)
|
10
|
+
uris = r.uris(50,r.num(90) + 1)
|
12
11
|
|
13
12
|
uris.each do |u|
|
14
|
-
|
15
|
-
@sess.count_errors(:illegal)
|
16
|
-
|
17
|
-
@sess.count resp.http_status
|
18
|
-
end
|
13
|
+
resp = nil
|
14
|
+
@sess.count_errors(:illegal) { resp = c.get(u * 512) }
|
15
|
+
resp.http_status.should_match /^2[0-9][0-9]$/ if resp
|
19
16
|
end
|
20
17
|
end
|
21
18
|
end
|