@@ -48,10 +48,12 @@ def fuzz_strings
48
48
res
49
49
end
50
50
51
- # Modifies each byte of the string from beginning to end, packing each element as an 8 bit character.
52
- #
53
- # @returns [Array] Returns an array of an array of strings
54
- # @see #fuzzer_string_format
51
+ # Modifies each byte of the string from beginning to end, packing each element as an 8 bit character.
52
+ #
53
+ # @param str [String] The string the mutation will be based on.
54
+ # @param max [Fixnum, NilClass] Max string size.
55
+ # @return [Array] Returns an array of an array of strings
56
+ # @see #fuzzer_string_format
55
57
56
58
def fuzz_string_corrupt_byte ( str , max = nil )
57
59
res = [ ]
@@ -68,8 +70,9 @@ def fuzz_string_corrupt_byte(str,max=nil)
68
70
69
71
# Modifies each byte of the string from beginning to end, packing each element as an 8 bit character.
70
72
#
71
- #
72
- # @returns [Array] Returns an array of an array of strings
73
+ # @param str [String] The string the mutation will be based on.
74
+ # @param max [Fixnum, NilClass] Max string size.
75
+ # @return [Array] Returns an array of an array of strings
73
76
# @see fuzzer_string_format
74
77
75
78
def fuzz_string_corrupt_byte_reverse ( str , max = nil )
@@ -87,7 +90,7 @@ def fuzz_string_corrupt_byte_reverse(str,max=nil)
87
90
88
91
# Useful generators (many derived from AxMan)
89
92
#
90
- # @returns [Array] Returns and array of strings.
93
+ # @return [Array] Returns and array of strings.
91
94
92
95
def fuzzer_string_format
93
96
res = %W{ %s %p %n %x %@ %.257d %.65537d %.2147483648d %.257f %.65537f %.2147483648f }
@@ -97,7 +100,7 @@ def fuzzer_string_format
97
100
# Reserved filename array
98
101
# Useful generators (many derived from AxMan)
99
102
#
100
- # @returns [Array] Returns and array of reserved filenames in Windows.
103
+ # @return [Array] Returns and array of reserved filenames in Windows.
101
104
102
105
def fuzzer_string_filepath_dos
103
106
res = %W{ aux con nul com1 com2 com3 com4 lpt1 lpt2 lp3 lpt4 prn }
@@ -106,7 +109,7 @@ def fuzzer_string_filepath_dos
106
109
107
110
# Fuzzer Numbers by Powers of Two
108
111
#
109
- # @returns [Array] Returns an array with pre-set values
112
+ # @return [Array] Returns an array with pre-set values
110
113
111
114
def fuzzer_number_power2
112
115
res = [
@@ -128,7 +131,7 @@ def fuzzer_number_power2
128
131
129
132
# Powers of two by some fuzzing factor.
130
133
#
131
- # @returns [Array] Returns and array of integers.
134
+ # @return [Array] Returns and array of integers.
132
135
133
136
def fuzzer_number_power2_plus
134
137
res = [ ]
@@ -144,9 +147,10 @@ def fuzzer_number_power2_plus
144
147
block_given? ? res . each { |n | yield ( n ) } : res
145
148
end
146
149
147
- # Generates a fuzz string
148
- # If no block set, will retrive characters from the FuzzChar datastore option
150
+ # Generates a fuzz string If no block is set, it will retrive characters from the
151
+ # FuzzChar datastore option.
149
152
#
153
+ # @param len [Fixnum] String size.
150
154
# @return [String] Returns a string of size 1024 * 512 specified by the user
151
155
152
156
def fuzzer_gen_string ( len )
@@ -198,7 +202,7 @@ def fuzzer_string_giant
198
202
199
203
# Various URI types
200
204
#
201
- # @returns [Array] Returns an array of strings
205
+ # @return [Array] Returns an array of strings
202
206
def fuzzer_string_uri_types
203
207
res = %W{
204
208
aaa aaas about acap adiumxtra afp aim apt aw bolo callto cap chrome cid
@@ -216,27 +220,27 @@ def fuzzer_string_uri_types
216
220
block_given? ? res . each { |n | yield ( n ) } : res
217
221
end
218
222
219
- # Generator for common URI dividers
220
- #
221
- # @return [Array] Returns an array of strings
223
+ # Generator for common URI dividers
224
+ #
225
+ # @return [Array] Returns an array of strings
222
226
223
227
def fuzzer_string_uri_dividers
224
228
res = %W{ : :// }
225
229
block_given? ? res . each { |n | yield ( n ) } : res
226
230
end
227
231
228
- # Generator for common path prefixes
229
- #
230
- # @return [Array] Returns an array of strings
232
+ # Generator for common path prefixes
233
+ #
234
+ # @return [Array] Returns an array of strings
231
235
232
236
def fuzzer_string_path_prefixes
233
237
res = %W{ C:\\ \\ \\ localhost\\ / }
234
238
block_given? ? res . each { |n | yield ( n ) } : res
235
239
end
236
240
237
- # Generates various small URI string types
238
- #
239
- # @return [Array] Returns an array of stings
241
+ # Generates various small URI string types
242
+ #
243
+ # @return [Array] Returns an array of stings
240
244
241
245
def fuzzer_string_uris_small
242
246
res = [ ]
@@ -268,9 +272,9 @@ def fuzzer_string_uris_long
268
272
res
269
273
end
270
274
271
- # Generates various giant URI string types
272
- #
273
- # @return [Array] Returns an array of stings
275
+ # Generates various giant URI string types
276
+ #
277
+ # @return [Array] Returns an array of stings
274
278
275
279
def fuzzer_string_uris_giant
276
280
res = [ ]
@@ -285,9 +289,9 @@ def fuzzer_string_uris_giant
285
289
res
286
290
end
287
291
288
- # Format for the URI string generator
289
- #
290
- # @return [Array] Returns an array of stings
292
+ # Format for the URI string generator
293
+ #
294
+ # @return [Array] Returns an array of stings
291
295
292
296
def fuzzer_string_uris_format
293
297
res = [ ]
@@ -303,9 +307,9 @@ def fuzzer_string_uris_format
303
307
end
304
308
305
309
306
- # Generates various small strings
307
- #
308
- # @return [Array] Returns an array of stings
310
+ # Generates various small strings
311
+ #
312
+ # @return [Array] Returns an array of stings
309
313
310
314
def fuzzer_string_uris_dos
311
315
res = [ ]
@@ -321,9 +325,9 @@ def fuzzer_string_uris_dos
321
325
end
322
326
323
327
324
- # Generates various small strings
325
- #
326
- # @return [Array] Returns an array of stings
328
+ # Generates various small strings
329
+ #
330
+ # @return [Array] Returns an array of stings
327
331
328
332
def fuzzer_string_paths_small
329
333
res = [ ]
@@ -337,9 +341,9 @@ def fuzzer_string_paths_small
337
341
end
338
342
339
343
340
- # Generates various small strings
341
- #
342
- # @return [Array] Returns an array of stings
344
+ # Generates various small strings
345
+ #
346
+ # @return [Array] Returns an array of stings
343
347
344
348
def fuzzer_string_paths_long
345
349
res = [ ]
@@ -353,9 +357,9 @@ def fuzzer_string_paths_long
353
357
end
354
358
355
359
356
- # Generates various giant strings
357
- #
358
- # @return [Array] Returns an array of stings
360
+ # Generates various giant strings
361
+ #
362
+ # @return [Array] Returns an array of stings
359
363
360
364
def fuzzer_string_paths_giant
361
365
res = [ ]
@@ -369,9 +373,9 @@ def fuzzer_string_paths_giant
369
373
end
370
374
371
375
372
- # Format for the path generator
373
- #
374
- # @return [Array] Returns an array of stings
376
+ # Format for the path generator
377
+ #
378
+ # @return [Array] Returns an array of stings
375
379
376
380
def fuzzer_string_paths_format
377
381
res = [ ]
@@ -385,9 +389,9 @@ def fuzzer_string_paths_format
385
389
end
386
390
387
391
388
- # Generates fuzzer strings using path prefixes
389
- #
390
- # @return [Array] Returns an array of stings
392
+ # Generates fuzzer strings using path prefixes
393
+ #
394
+ # @return [Array] Returns an array of stings
391
395
392
396
def fuzzer_string_paths_dos
393
397
res = [ ]
0 commit comments