Skip to content

Commit 0a4c6fb

Browse files
author
HD Moore
committed
Merge branch 'master' of github.com:rapid7/metasploit-framework
2 parents c68064b + 366d42a commit 0a4c6fb

File tree

2 files changed

+54
-50
lines changed

2 files changed

+54
-50
lines changed

lib/msf/core/auxiliary/fuzzer.rb

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ def fuzz_strings
4848
res
4949
end
5050

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
5557

5658
def fuzz_string_corrupt_byte(str,max=nil)
5759
res = []
@@ -68,8 +70,9 @@ def fuzz_string_corrupt_byte(str,max=nil)
6870

6971
# Modifies each byte of the string from beginning to end, packing each element as an 8 bit character.
7072
#
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
7376
# @see fuzzer_string_format
7477

7578
def fuzz_string_corrupt_byte_reverse(str,max=nil)
@@ -87,7 +90,7 @@ def fuzz_string_corrupt_byte_reverse(str,max=nil)
8790

8891
# Useful generators (many derived from AxMan)
8992
#
90-
# @returns [Array] Returns and array of strings.
93+
# @return [Array] Returns and array of strings.
9194

9295
def fuzzer_string_format
9396
res = %W{ %s %p %n %x %@ %.257d %.65537d %.2147483648d %.257f %.65537f %.2147483648f}
@@ -97,7 +100,7 @@ def fuzzer_string_format
97100
# Reserved filename array
98101
# Useful generators (many derived from AxMan)
99102
#
100-
# @returns [Array] Returns and array of reserved filenames in Windows.
103+
# @return [Array] Returns and array of reserved filenames in Windows.
101104

102105
def fuzzer_string_filepath_dos
103106
res = %W{ aux con nul com1 com2 com3 com4 lpt1 lpt2 lp3 lpt4 prn }
@@ -106,7 +109,7 @@ def fuzzer_string_filepath_dos
106109

107110
# Fuzzer Numbers by Powers of Two
108111
#
109-
# @returns [Array] Returns an array with pre-set values
112+
# @return [Array] Returns an array with pre-set values
110113

111114
def fuzzer_number_power2
112115
res = [
@@ -128,7 +131,7 @@ def fuzzer_number_power2
128131

129132
# Powers of two by some fuzzing factor.
130133
#
131-
# @returns [Array] Returns and array of integers.
134+
# @return [Array] Returns and array of integers.
132135

133136
def fuzzer_number_power2_plus
134137
res = []
@@ -144,9 +147,10 @@ def fuzzer_number_power2_plus
144147
block_given? ? res.each { |n| yield(n) } : res
145148
end
146149

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.
149152
#
153+
# @param len [Fixnum] String size.
150154
# @return [String] Returns a string of size 1024 * 512 specified by the user
151155

152156
def fuzzer_gen_string(len)
@@ -198,7 +202,7 @@ def fuzzer_string_giant
198202

199203
# Various URI types
200204
#
201-
# @returns [Array] Returns an array of strings
205+
# @return [Array] Returns an array of strings
202206
def fuzzer_string_uri_types
203207
res = %W{
204208
aaa aaas about acap adiumxtra afp aim apt aw bolo callto cap chrome cid
@@ -216,27 +220,27 @@ def fuzzer_string_uri_types
216220
block_given? ? res.each { |n| yield(n) } : res
217221
end
218222

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
222226

223227
def fuzzer_string_uri_dividers
224228
res = %W{ : :// }
225229
block_given? ? res.each { |n| yield(n) } : res
226230
end
227231

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
231235

232236
def fuzzer_string_path_prefixes
233237
res = %W{ C:\\ \\\\localhost\\ / }
234238
block_given? ? res.each { |n| yield(n) } : res
235239
end
236240

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
240244

241245
def fuzzer_string_uris_small
242246
res = []
@@ -268,9 +272,9 @@ def fuzzer_string_uris_long
268272
res
269273
end
270274

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
274278

275279
def fuzzer_string_uris_giant
276280
res = []
@@ -285,9 +289,9 @@ def fuzzer_string_uris_giant
285289
res
286290
end
287291

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
291295

292296
def fuzzer_string_uris_format
293297
res = []
@@ -303,9 +307,9 @@ def fuzzer_string_uris_format
303307
end
304308

305309

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
309313

310314
def fuzzer_string_uris_dos
311315
res = []
@@ -321,9 +325,9 @@ def fuzzer_string_uris_dos
321325
end
322326

323327

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
327331

328332
def fuzzer_string_paths_small
329333
res = []
@@ -337,9 +341,9 @@ def fuzzer_string_paths_small
337341
end
338342

339343

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
343347

344348
def fuzzer_string_paths_long
345349
res = []
@@ -353,9 +357,9 @@ def fuzzer_string_paths_long
353357
end
354358

355359

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
359363

360364
def fuzzer_string_paths_giant
361365
res = []
@@ -369,9 +373,9 @@ def fuzzer_string_paths_giant
369373
end
370374

371375

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
375379

376380
def fuzzer_string_paths_format
377381
res = []
@@ -385,9 +389,9 @@ def fuzzer_string_paths_format
385389
end
386390

387391

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
391395

392396
def fuzzer_string_paths_dos
393397
res = []

lib/msf/core/post/windows/file_info.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ def loword(num)
1313
num & 0xffff
1414
end
1515

16-
# File Version
17-
# @param [String] filepath The path of the file you are targeting
18-
#
19-
# @return [String] Returns the file version of target
16+
# Returns the file version information such as: major, minor, build, revision, branch.
17+
#
18+
# @param filepath [String] The path of the file you are targeting.
19+
# @return [String] Returns the file version information of the file.
2020

2121
def file_version(filepath)
2222
file_version_info_size = client.railgun.version.GetFileVersionInfoSizeA(

0 commit comments

Comments
 (0)