rfuzz 0.6 → 0.7
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/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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
require 'rfuzz/session'
|
|
2
|
+
|
|
3
|
+
context "3: Protocol Parameters" do
|
|
4
|
+
setup do
|
|
5
|
+
@sess = RFuzz::Session.new :host => "localhost", :port => 3000
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
specify "3.1: HTTP Version" do
|
|
9
|
+
# "HTTP" "/" 1*DIGIT "." 1*DIGIT
|
|
10
|
+
@sess.run {|c,r|
|
|
11
|
+
c.get("/").http_version.should_match /HTTP\/[0-9]+\.[0-9]+/
|
|
12
|
+
}
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
specify "3.2: Uniform Resource Identifiers" do
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
specify "3.2.1: General Syntax" do
|
|
22
|
+
# Valid URIs are from RFC 2396:
|
|
23
|
+
# "URI-reference", "absoluteURI", "relativeURI", "port",
|
|
24
|
+
# "host","abs_path", "rel_path", and "authority"
|
|
25
|
+
|
|
26
|
+
# MUST be able to handle the URI of any resource they serve
|
|
27
|
+
|
|
28
|
+
# SHOULD be able to handle URIs of unbounded length if they
|
|
29
|
+
# provide GET-based forms that could generate such URIs.
|
|
30
|
+
|
|
31
|
+
# A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer
|
|
32
|
+
# than the server can handle (see section 10.4.15).
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
specify "3.2.2: http URL" do
|
|
37
|
+
# http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
|
|
38
|
+
|
|
39
|
+
# The use of IP addresses in URLs SHOULD be avoided whenever possible
|
|
40
|
+
|
|
41
|
+
# If the abs_path is not present in the URL, it MUST be given as "/" when
|
|
42
|
+
# used as a Request-URI for a resource (section 5.1.2).
|
|
43
|
+
|
|
44
|
+
# If a proxy receives a host name which is not a fully qualified domain
|
|
45
|
+
# name, it MAY add its domain to the host name it received.
|
|
46
|
+
|
|
47
|
+
# If a proxy receives a fully qualified domain name, the proxy MUST NOT
|
|
48
|
+
# change the host name.
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
specify "3.2.3: URI Comparison" do
|
|
53
|
+
# When comparing two URIs to decide if they match or not, a client SHOULD
|
|
54
|
+
# use a case-sensitive octet-by-octet comparison of the entire URIs, with
|
|
55
|
+
# these exceptions:
|
|
56
|
+
|
|
57
|
+
# - A port that is empty or not given is equivalent to the default port for
|
|
58
|
+
# that URI-reference;
|
|
59
|
+
|
|
60
|
+
# - Comparisons of host names MUST be case-insensitive;
|
|
61
|
+
|
|
62
|
+
# - Comparisons of scheme names MUST be case-insensitive;
|
|
63
|
+
|
|
64
|
+
# - An empty abs_path is equivalent to an abs_path of "/".
|
|
65
|
+
|
|
66
|
+
# http://abc.com:80/~smith/home.html
|
|
67
|
+
# http://ABC.com/%7Esmith/home.html
|
|
68
|
+
# http://ABC.com:/%7esmith/home.html
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
specify "3.3: Date/Time Formats" do
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
specify "3.3.1: Full Date" do
|
|
77
|
+
# HTTP/1.1 clients and servers that parse the date value MUST accept
|
|
78
|
+
# all three formats:
|
|
79
|
+
|
|
80
|
+
# Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
|
|
81
|
+
# Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
|
|
82
|
+
# Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
|
|
83
|
+
|
|
84
|
+
# MUST only generate the RFC 1123 format for representing HTTP-date values
|
|
85
|
+
# in header fields
|
|
86
|
+
|
|
87
|
+
# MUST be represented in Greenwich Mean Time (GMT), without exception
|
|
88
|
+
|
|
89
|
+
# MUST be assumed when reading the asctime format
|
|
90
|
+
|
|
91
|
+
# HTTP-date is case sensitive and MUST NOT include
|
|
92
|
+
# additional LWS beyond that specifically included as SP in the
|
|
93
|
+
# grammar.
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
specify "3.3.2: Delta Seconds" do
|
|
98
|
+
# delta-seconds = 1*DIGIT (for some http headers)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
specify "3.4: Character Sets" do
|
|
103
|
+
# MIME character set name MUST fully specify the mapping to be performed
|
|
104
|
+
# from octets to characters.
|
|
105
|
+
|
|
106
|
+
# any token that has a predefined value within the IANA Character Set
|
|
107
|
+
# registry [19] MUST represent the character set defined by that registry
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
specify "3.4.1: Missing Charset" do
|
|
111
|
+
# Some HTTP/1.0 software has interpreted a Content-Type header without
|
|
112
|
+
# charset parameter incorrectly to mean "recipient should guess."
|
|
113
|
+
# Senders wishing to defeat this behavior
|
|
114
|
+
|
|
115
|
+
# MAY include a charset parameter even when the charset is ISO-8859-1 and
|
|
116
|
+
# SHOULD do so when it is known that it will not confuse the recipient.
|
|
117
|
+
|
|
118
|
+
# HTTP/1.1 recipients MUST respect the charset label provided by the
|
|
119
|
+
# sender; and
|
|
120
|
+
|
|
121
|
+
# those user agents that have a provision to "guess" a charset MUST use the
|
|
122
|
+
# charset from the content-type field if they support that charset, rather
|
|
123
|
+
# than the recipient's preference, when initially displaying a document.
|
|
124
|
+
|
|
125
|
+
# See section 3.7.1.
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
specify "3.5: Content Codings" do
|
|
130
|
+
# All content-coding values are case-insensitive
|
|
131
|
+
|
|
132
|
+
# gzip
|
|
133
|
+
# compress
|
|
134
|
+
# deflate
|
|
135
|
+
# identity
|
|
136
|
+
|
|
137
|
+
# New content-coding value tokens SHOULD be registered
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
specify "3.6: Transfer Codings" do
|
|
142
|
+
# the transfer-coding is a property of the message, not of the original entity.
|
|
143
|
+
|
|
144
|
+
# transfer-coding = "chunked" | transfer-extension
|
|
145
|
+
# transfer-extension = token *( ";" parameter )
|
|
146
|
+
|
|
147
|
+
# Parameters are in the form of attribute/value pairs.
|
|
148
|
+
|
|
149
|
+
# parameter = attribute "=" value
|
|
150
|
+
# attribute = token
|
|
151
|
+
# value = token | quoted-string
|
|
152
|
+
|
|
153
|
+
# All transfer-coding values are case-insensitive
|
|
154
|
+
|
|
155
|
+
# Whenever a transfer-coding is applied to a message-body, the set of
|
|
156
|
+
# transfer-codings MUST include "chunked", unless the message is terminated
|
|
157
|
+
# by closing the connection
|
|
158
|
+
|
|
159
|
+
# "chunked" MUST be the last transfer-coding applied to the message-body
|
|
160
|
+
|
|
161
|
+
# A server which receives an entity-body with a transfer-coding it does not
|
|
162
|
+
# understand SHOULD return 501 (Unimplemented), and close the connection.
|
|
163
|
+
|
|
164
|
+
# A server MUST NOT send transfer-codings to an HTTP/1.0 client.
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
specify "3.6.1: Chunked Transfer Coding" do
|
|
169
|
+
# AMBIGUITY: It's not clear whether clients can use chunked encoding on requests.
|
|
170
|
+
|
|
171
|
+
# MUST NOT use the trailer for any header fields unless at least one of the
|
|
172
|
+
# following is true:
|
|
173
|
+
|
|
174
|
+
# - The TE header includes "trailers"
|
|
175
|
+
# - server is origin, trailer is all optional, recipient can use if discarded
|
|
176
|
+
|
|
177
|
+
# All HTTP/1.1 applications MUST be able to receive and decode the
|
|
178
|
+
# "chunked" transfer-coding, and MUST ignore chunk-extension extensions
|
|
179
|
+
# they do not understand.
|
|
180
|
+
# AMBIGUITY: "applications"? WTF is that? client? server?
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
specify "3.7: Media Types" do
|
|
185
|
+
# Parameters MAY follow the type/subtype in the form of attribute/value pairs
|
|
186
|
+
|
|
187
|
+
# Linear white space (LWS) MUST NOT be used between the type and subtype,
|
|
188
|
+
# nor between an attribute and its value
|
|
189
|
+
|
|
190
|
+
# When sending data to older HTTP applications, implementations SHOULD only
|
|
191
|
+
# use media type parameters when they are required by that type/subtype
|
|
192
|
+
# definition.
|
|
193
|
+
# AMBIGUITY: How the hell do we determine that an app is old?
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
specify "3.7.1: Canonicalization and Text Defaults" do
|
|
198
|
+
# RANT: The majority of this section is impossible to test.
|
|
199
|
+
|
|
200
|
+
# The entire paragraph about CR,LF,and CRLF is garbage. Basically,
|
|
201
|
+
# if you set a media subtype of "text" then the client has to deal
|
|
202
|
+
# with just about any 'line break' combo humanly possible.
|
|
203
|
+
|
|
204
|
+
# If an entity-body is encoded with a content-coding, the underlying data
|
|
205
|
+
# MUST be in a form defined above prior to being encoded.
|
|
206
|
+
|
|
207
|
+
# Data in character sets other than "ISO-8859-1" or its subsets MUST be
|
|
208
|
+
# labeled with an appropriate charset value. See section 3.4.1 for
|
|
209
|
+
# compatibility problems.
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
specify "3.7.2: Multipart Types" do
|
|
214
|
+
# MUST include a boundary parameter as part of the media type value.
|
|
215
|
+
|
|
216
|
+
# MUST therefore use only CRLF to represent line breaks between body-parts
|
|
217
|
+
|
|
218
|
+
# Unlike in RFC 2046, the epilogue of any multipart message MUST be empty;
|
|
219
|
+
|
|
220
|
+
# HTTP applications MUST NOT transmit the epilogue (even if the original
|
|
221
|
+
# multipart contains an epilogue).
|
|
222
|
+
|
|
223
|
+
# ... "multipart/byteranges" type (appendix 19.2) when it appears in a 206
|
|
224
|
+
# (Partial Content) response, which will be interpreted by some HTTP
|
|
225
|
+
# caching mechanisms as described in sections 13.5.4 and 14.16
|
|
226
|
+
|
|
227
|
+
# an HTTP user agent SHOULD follow the same or similar behavior as a MIME
|
|
228
|
+
# user agent would upon receipt of a multipart type
|
|
229
|
+
|
|
230
|
+
# If an application receives an unrecognized multipart subtype, the
|
|
231
|
+
# application MUST treat it as being equivalent to "multipart/mixed".
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
specify "3.8: Product Tokens" do
|
|
236
|
+
# product = token ["/" product-version]
|
|
237
|
+
# product-version = token
|
|
238
|
+
|
|
239
|
+
# SHOULD be short and to the point
|
|
240
|
+
|
|
241
|
+
# MUST NOT be used for advertising or other non-essential information
|
|
242
|
+
|
|
243
|
+
# Although any token character MAY appear in a product-version, this token
|
|
244
|
+
# SHOULD only be used for a version identifier
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
specify "3.9: Quality Values" do
|
|
249
|
+
# HTTP/1.1 applications MUST NOT generate more than three digits after the
|
|
250
|
+
# decimal point.
|
|
251
|
+
|
|
252
|
+
# User configuration of these values SHOULD also be limited in this
|
|
253
|
+
# fashion.
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
specify "3.10: Language Tags" do
|
|
258
|
+
# language-tag = primary-tag *( "-" subtag )
|
|
259
|
+
# primary-tag = 1*8ALPHA
|
|
260
|
+
# subtag = 1*8ALPHA
|
|
261
|
+
|
|
262
|
+
# White space is not allowed within the tag and all tags are case-
|
|
263
|
+
# insensitive.
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
specify "3.11: Entity Tags" do
|
|
268
|
+
# An entity tag MUST be unique across all versions of all entities
|
|
269
|
+
# associated with a particular resource.
|
|
270
|
+
|
|
271
|
+
# A given entity tag value MAY be used for entities obtained by requests on
|
|
272
|
+
# different URIs.
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
specify "3.12: Range Units" do
|
|
277
|
+
# range-unit = bytes-unit | other-range-unit
|
|
278
|
+
# bytes-unit = "bytes"
|
|
279
|
+
# other-range-unit = token
|
|
280
|
+
|
|
281
|
+
# The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1
|
|
282
|
+
# implementations MAY ignore ranges specified using other units.
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'rfuzz/session'
|
|
2
|
+
|
|
3
|
+
context "5: Request" do
|
|
4
|
+
setup do
|
|
5
|
+
@sess = RFuzz::Session.new :host => "localhost", :port => 3000
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
specify "5.1: Request-Line" do
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
specify "5.1.1: Method" do
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
specify "5.1.2: Request-URI" do
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
specify "5.2: The Resource Identified by a Request" do
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
specify "5.3: Request Header Fields" do
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require 'rfuzz/session'
|
|
2
|
+
|
|
3
|
+
context "6: Response" do
|
|
4
|
+
setup do
|
|
5
|
+
@sess = RFuzz::Session.new :host => "localhost", :port => 3000
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
specify "6.1: Status-Line" do
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
specify "6.1.1: Status Code and Reason Phrase" do
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
specify "6.2: Response Header Fields" do
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require 'rfuzz/session'
|
|
2
|
+
|
|
3
|
+
context "15: Security Considerations" do
|
|
4
|
+
setup do
|
|
5
|
+
@sess = RFuzz::Session.new :host => "localhost", :port => 3000
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
specify "15.1: Personal Information" do
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
specify "15.1.1: Abuse of Server Log Information" do
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
specify "15.1.2: Transfer of Sensitive Information" do
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
specify "15.1.3: Encoding Sensitive Information in URI's" do
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
specify "15.1.4: Privacy Issues Connected to Accept Headers" do
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
specify "15.2: Attacks Based On File and Path Names" do
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
specify "15.3: DNS Spoofing" do
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
specify "15.4: Location Headers and Spoofing" do
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
specify "15.5: Content-Disposition Issues" do
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
specify "15.6: Authentication Credentials and Idle Clients" do
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
specify "15.7: Proxies and Caching" do
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
specify "15.7.1: Denial of Service Attacks on Proxies" do
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
require 'rfuzz/session'
|
|
2
|
+
|
|
3
|
+
context "10: Status Code Definitions" do
|
|
4
|
+
setup do
|
|
5
|
+
@sess = RFuzz::Session.new :host => "localhost", :port => 3000
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
specify "10.1: Informational 1xx" do
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
specify "10.1.1: 100 Continue" do
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
specify "10.1.2: 101 Switching Protocols" do
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
specify "10.2: Successful 2xx" do
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
specify "10.2.1: 200 OK" do
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
specify "10.2.2: 201 Created" do
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
specify "10.2.3: 202 Accepted" do
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
specify "10.2.4: 203 Non-Authoritative Information" do
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
specify "10.2.5: 204 No Content" do
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
specify "10.2.6: 205 Reset Content" do
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
specify "10.2.7: 206 Partial Content" do
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
specify "10.3: Redirection 3xx" do
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
specify "10.3.1: 300 Multiple Choices" do
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
specify "10.3.2: 301 Moved Permanently" do
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
specify "10.3.3: 302 Found" do
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
specify "10.3.4: 303 See Other" do
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
specify "10.3.5: 304 Not Modified" do
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
specify "10.3.6: 305 Use Proxy" do
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
specify "10.3.7: 306 (Unused)" do
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
specify "10.3.8: 307 Temporary Redirect" do
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
specify "10.4: Client Error 4xx" do
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
specify "10.4.1: 400 Bad Request" do
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
specify "10.4.2: 401 Unauthorized" do
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
specify "10.4.3: 402 Payment Required" do
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
specify "10.4.4: 403 Forbidden" do
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
specify "10.4.5: 404 Not Found" do
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
specify "10.4.6: 405 Method Not Allowed" do
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
specify "10.4.7: 406 Not Acceptable" do
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
specify "10.4.8: 407 Proxy Authentication Required" do
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
specify "10.4.9: 408 Request Timeout" do
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
specify "10.4.10: 409 Conflict" do
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
specify "10.4.11: 410 Gone" do
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
specify "10.4.12: 411 Length Required" do
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
specify "10.4.13: 412 Precondition Failed" do
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
specify "10.4.14: 413 Request Entity Too Large" do
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
specify "10.4.15: 414 Request-URI Too Long" do
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
specify "10.4.16: 415 Unsupported Media Type" do
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
specify "10.4.17: 416 Requested Range Not Satisfiable" do
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
specify "10.4.18: 417 Expectation Failed" do
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
specify "10.5: Server Error 5xx" do
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
specify "10.5.1: 500 Internal Server Error" do
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
specify "10.5.2: 501 Not Implemented" do
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
specify "10.5.3: 502 Bad Gateway" do
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
specify "10.5.4: 503 Service Unavailable" do
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
specify "10.5.5: 504 Gateway Timeout" do
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
specify "10.5.6: 505 HTTP Version Not Supported" do
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
end
|
data/ext/fuzzrnd/fuzzrnd.c
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
#include <assert.h>
|
|
9
9
|
#include <string.h>
|
|
10
10
|
#include <ctype.h>
|
|
11
|
-
#include <inttypes.h>
|
|
12
11
|
|
|
13
12
|
static VALUE mRFuzz;
|
|
14
13
|
static VALUE cFuzzRnd;
|
|
@@ -48,7 +47,7 @@ static struct
|
|
|
48
47
|
VALUE FuzzRnd_data(VALUE self, VALUE length)
|
|
49
48
|
{
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
unsigned int n;
|
|
52
51
|
unsigned char a,b;
|
|
53
52
|
size_t len = 0;
|
|
54
53
|
VALUE data;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
require 'rfuzz/session'
|
|
2
|
+
require 'hpricot'
|
|
3
|
+
|
|
4
|
+
module RFuzz
|
|
5
|
+
|
|
6
|
+
# A simple class that emulates a browser using hpricot.
|
|
7
|
+
class Browser
|
|
8
|
+
attr_accessor :client
|
|
9
|
+
attr_accessor :doc
|
|
10
|
+
attr_accessor :response
|
|
11
|
+
attr_accessor :agent
|
|
12
|
+
|
|
13
|
+
DEFAULT_AGENT="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060608 Ubuntu/dapper-security Firefox/1.5.0.4"
|
|
14
|
+
|
|
15
|
+
# The default agent used is Mozilla (from linux Dapper Drake), but you
|
|
16
|
+
# can change it to something else.
|
|
17
|
+
def initialize(host, port=80, ops={}, agent=DEFAULT_AGENT)
|
|
18
|
+
@agent = agent
|
|
19
|
+
@client = HttpClient.new(host, port, ops)
|
|
20
|
+
|
|
21
|
+
ops[:head] ||= {}
|
|
22
|
+
ops[:head]["User-Agent"] ||= @agent
|
|
23
|
+
|
|
24
|
+
@doc = nil
|
|
25
|
+
@response = nil
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Makes the browser do a GET to this location. It takes the same
|
|
29
|
+
# params as HttpClient does for any method.
|
|
30
|
+
def start(uri, ops={})
|
|
31
|
+
@response = @client.get(uri,ops)
|
|
32
|
+
if @response.http_status != "200"
|
|
33
|
+
raise "Invalid status: #{@response.http_status}"
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
@doc = Hpricot(@response.http_body)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns an Array of Hpricot objects that are the links on the
|
|
40
|
+
# current page. If you pass in matching as a regex (or any ===
|
|
41
|
+
# compatible with String) then it'll only return those links.
|
|
42
|
+
def links(matching=nil)
|
|
43
|
+
links = @doc/:a
|
|
44
|
+
if matching
|
|
45
|
+
# return only the ones that match
|
|
46
|
+
return links.select {|l| matching === l.attributes["href"]}
|
|
47
|
+
else
|
|
48
|
+
return links
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
end
|