ronin-support 1.0.1 → 1.0.2

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +21 -0
  3. data/lib/ronin/support/archive/core_ext/file.rb +43 -0
  4. data/lib/ronin/support/archive/core_ext.rb +1 -1
  5. data/lib/ronin/support/binary/array.rb +1 -1
  6. data/lib/ronin/support/binary/buffer.rb +3 -3
  7. data/lib/ronin/support/binary/core_ext.rb +2 -0
  8. data/lib/ronin/support/binary/cstring.rb +43 -0
  9. data/lib/ronin/support/binary/ctypes/array_type.rb +1 -1
  10. data/lib/ronin/support/binary/ctypes/os/bsd.rb +1 -1
  11. data/lib/ronin/support/binary/ctypes/unbounded_array_type.rb +1 -1
  12. data/lib/ronin/support/binary/packet.rb +77 -0
  13. data/lib/ronin/support/binary/stack.rb +3 -3
  14. data/lib/ronin/support/binary/template.rb +1 -5
  15. data/lib/ronin/support/binary.rb +1 -0
  16. data/lib/ronin/support/compression/core_ext/file.rb +16 -0
  17. data/lib/ronin/support/core_ext/kernel.rb +0 -4
  18. data/lib/ronin/support/crypto/core_ext/file.rb +32 -0
  19. data/lib/ronin/support/crypto/core_ext/string.rb +34 -2
  20. data/lib/ronin/support/encoding/base16.rb +1 -1
  21. data/lib/ronin/support/encoding/base32.rb +1 -1
  22. data/lib/ronin/support/encoding/c/core_ext/string.rb +1 -1
  23. data/lib/ronin/support/encoding/c.rb +2 -2
  24. data/lib/ronin/support/encoding/core_ext/string.rb +2 -2
  25. data/lib/ronin/support/encoding/hex/core_ext/string.rb +1 -1
  26. data/lib/ronin/support/encoding/hex.rb +2 -2
  27. data/lib/ronin/support/encoding/js.rb +1 -1
  28. data/lib/ronin/support/encoding/powershell.rb +1 -1
  29. data/lib/ronin/support/encoding/quoted_printable.rb +3 -1
  30. data/lib/ronin/support/encoding/ruby.rb +1 -1
  31. data/lib/ronin/support/encoding/uuencoding.rb +3 -1
  32. data/lib/ronin/support/encoding/xml.rb +1 -1
  33. data/lib/ronin/support/network/dns/mixin.rb +2 -10
  34. data/lib/ronin/support/network/http/core_ext/uri/http.rb +8 -0
  35. data/lib/ronin/support/network/ip.rb +41 -13
  36. data/lib/ronin/support/network/ip_range.rb +4 -4
  37. data/lib/ronin/support/path.rb +1 -1
  38. data/lib/ronin/support/text/homoglyph/core_ext/string.rb +33 -0
  39. data/lib/ronin/support/text/patterns/network.rb +20 -20
  40. data/lib/ronin/support/text/random/mixin.rb +17 -17
  41. data/lib/ronin/support/text/random.rb +23 -23
  42. data/lib/ronin/support/text/typo/core_ext/string.rb +24 -0
  43. data/lib/ronin/support/version.rb +1 -1
  44. metadata +2 -2
@@ -79,7 +79,7 @@ class String
79
79
  # The hex unescaped version of the String.
80
80
  #
81
81
  # @example
82
- # "hello\\nworld".hex_escape
82
+ # "hello\\nworld".hex_unescape
83
83
  # # => "hello\nworld"
84
84
  #
85
85
  # @see Ronin::Support::Encoding::Hex.unescape
@@ -188,11 +188,11 @@ module Ronin
188
188
  # the same String if it is not quoted.
189
189
  #
190
190
  # @example
191
- # Encoding::Hex.unescape("\"hello\\nworld\"")
191
+ # Encoding::Hex.unescape("hello\\nworld")
192
192
  # # => "hello\nworld"
193
193
  #
194
194
  def self.unescape(data)
195
- buffer = String.new
195
+ buffer = String.new(encoding: Encoding::UTF_8)
196
196
  scanner = StringScanner.new(data)
197
197
 
198
198
  until scanner.eos?
@@ -182,7 +182,7 @@ module Ronin
182
182
  # # => "hello world"
183
183
  #
184
184
  def self.unescape(data)
185
- unescaped = String.new
185
+ unescaped = String.new(encoding: Encoding::UTF_8)
186
186
 
187
187
  data.scan(/[\\%]u[0-9a-fA-F]{1,4}|[\\%][0-9a-fA-F]{1,2}|\\[btnfr\'\"\\]|./) do |c|
188
188
  unescaped << BACKSLASHED_CHARS.fetch(c) do
@@ -191,7 +191,7 @@ module Ronin
191
191
  # # => "hello\nworld"
192
192
  #
193
193
  def self.unescape(data)
194
- unescaped = String.new
194
+ unescaped = String.new(encoding: Encoding::UTF_8)
195
195
  scanner = StringScanner.new(data)
196
196
 
197
197
  until scanner.eos?
@@ -22,7 +22,9 @@ module Ronin
22
22
  module Support
23
23
  class Encoding < ::Encoding
24
24
  #
25
- # Contains methods for encoding/decoding Quoted Printable data.
25
+ # Contains methods for encoding/decoding [Quoted Printable] data.
26
+ #
27
+ # [Quoted-Printable]: https://en.wikipedia.org/wiki/Quoted-printable
26
28
  #
27
29
  # ## Core-Ext Methods
28
30
  #
@@ -174,7 +174,7 @@ module Ronin
174
174
  # # => "hello"
175
175
  #
176
176
  def self.unescape(data)
177
- unescaped = String.new
177
+ unescaped = String.new(encoding: Encoding::UTF_8)
178
178
  scanner = StringScanner.new(data)
179
179
 
180
180
  until scanner.eos?
@@ -20,7 +20,9 @@ module Ronin
20
20
  module Support
21
21
  class Encoding < ::Encoding
22
22
  #
23
- # Contains methods for encoding/decoding UUEncoded data.
23
+ # Contains methods for encoding/decoding [UUEncoded][uuencoding] data.
24
+ #
25
+ # [uuencoding]: https://en.wikipedia.org/wiki/Uuencoding
24
26
  #
25
27
  # ## Core-Ext Methods
26
28
  #
@@ -312,7 +312,7 @@ module Ronin
312
312
  # @see http://rubydoc.info/stdlib/cgi/CGI.unescapeHash
313
313
  #
314
314
  def self.unescape(data)
315
- unescaped = String.new
315
+ unescaped = String.new(encoding: Encoding::UTF_8)
316
316
  scanner = StringScanner.new(data)
317
317
 
318
318
  until scanner.eos?
@@ -25,6 +25,8 @@ module Ronin
25
25
  #
26
26
  # Provides helper methods for performing DNS queries.
27
27
  #
28
+ # @api public
29
+ #
28
30
  module Mixin
29
31
  #
30
32
  # Sets the DNS nameservers to query.
@@ -79,8 +81,6 @@ module Ronin
79
81
  # @return [Resolv, Resolv::DNS]
80
82
  # The DNS Resolver.
81
83
  #
82
- # @api public
83
- #
84
84
  def dns_resolver(nameservers: nil, nameserver: nil)
85
85
  if nameserver
86
86
  Network::DNS.resolver(nameserver: nameserver)
@@ -111,8 +111,6 @@ module Ronin
111
111
  # @return [String, nil]
112
112
  # The address of the hostname.
113
113
  #
114
- # @api public
115
- #
116
114
  def dns_get_address(host,**kwargs)
117
115
  dns_resolver(**kwargs).get_address(host.to_s)
118
116
  end
@@ -137,8 +135,6 @@ module Ronin
137
135
  # @return [Array<String>]
138
136
  # The addresses of the hostname.
139
137
  #
140
- # @api public
141
- #
142
138
  def dns_get_addresses(host,**kwargs)
143
139
  dns_resolver(**kwargs).get_addresses(host.to_s)
144
140
  end
@@ -161,8 +157,6 @@ module Ronin
161
157
  # @return [String, nil]
162
158
  # The hostname of the address.
163
159
  #
164
- # @api public
165
- #
166
160
  def dns_get_name(ip,**kwargs)
167
161
  dns_resolver(**kwargs).get_name(ip.to_s)
168
162
  end
@@ -187,8 +181,6 @@ module Ronin
187
181
  # @return [Array<String>]
188
182
  # The hostnames of the address.
189
183
  #
190
- # @api public
191
- #
192
184
  def dns_get_names(ip,**kwargs)
193
185
  dns_resolver(**kwargs).get_names(ip.to_s)
194
186
  end
@@ -33,6 +33,10 @@ module URI
33
33
  # @return [Integer]
34
34
  # The HTTP Response Status.
35
35
  #
36
+ # @example
37
+ # URI('http://github.com/').status
38
+ # # => 301
39
+ #
36
40
  # @see Ronin::Support::Network::HTTP.response_status
37
41
  #
38
42
  # @since 0.3.0
@@ -53,6 +57,10 @@ module URI
53
57
  #
54
58
  # @see Ronin::Support::Network::HTTP.ok?
55
59
  #
60
+ # @example
61
+ # URI('https://example.com/').ok?
62
+ # # => true
63
+ #
56
64
  # @since 0.3.0
57
65
  #
58
66
  def ok?(**kwargs)
@@ -66,11 +66,6 @@ module Ronin
66
66
  #
67
67
  class IP < IPAddr
68
68
 
69
- # The address of the IP.
70
- #
71
- # @return [String]
72
- attr_reader :address
73
-
74
69
  #
75
70
  # Initializes the IP address.
76
71
  #
@@ -92,9 +87,15 @@ module Ronin
92
87
  # the IP address.
93
88
  #
94
89
  def initialize(address,family=Socket::AF_UNSPEC)
95
- # XXX: remove the %iface suffix for ruby < 3.1.0
96
- if address.kind_of?(String) && address =~ /%.+$/
97
- address = address.sub(/%.+$/,'')
90
+ case address
91
+ when String
92
+ # XXX: remove the %iface suffix for ruby < 3.1.0
93
+ if address =~ /%.+$/
94
+ address = address.sub(/%.+$/,'')
95
+ end
96
+
97
+ # pre-cache the given IP address String
98
+ @address = address
98
99
  end
99
100
 
100
101
  begin
@@ -102,13 +103,30 @@ module Ronin
102
103
  rescue IPAddr::InvalidAddressError
103
104
  raise(InvalidIP,"invalid IP address: #{address.inspect}")
104
105
  end
106
+ end
105
107
 
106
- @address = case address
107
- when String then address.to_s
108
- else to_s
109
- end
108
+ protected
109
+
110
+ #
111
+ # Sets the IP address using the numeric IP address value.
112
+ #
113
+ # @param [Integer] addr
114
+ # The new numeric IP address value.
115
+ #
116
+ # @param [Integer] family
117
+ # Optional IP address family.
118
+ #
119
+ # @api private
120
+ #
121
+ def set(addr,*family)
122
+ super(addr,*family)
123
+
124
+ # unset the cached IP address since the numeric address has changed
125
+ @address = nil
110
126
  end
111
127
 
128
+ public
129
+
112
130
  # The URI for https://ipinfo.io/ip
113
131
  IPINFO_URI = URI::HTTPS.build(host: 'ipinfo.io', path: '/ip')
114
132
 
@@ -286,6 +304,16 @@ module Ronin
286
304
  ipv4? && (@addr & 0xff) == 0x00
287
305
  end
288
306
 
307
+ #
308
+ # The IP address.
309
+ #
310
+ # @return [String]
311
+ # The String version of the IP address.
312
+ #
313
+ def address
314
+ @address ||= to_s
315
+ end
316
+
289
317
  #
290
318
  # The Autonomous System Number (ASN) information for the IP address.
291
319
  #
@@ -519,8 +547,8 @@ module Ronin
519
547
  end
520
548
 
521
549
  alias canonical to_string
522
- alias to_uint to_i
523
550
  alias to_str to_s
551
+ alias to_uint to_i
524
552
 
525
553
  #
526
554
  # Inspects the IP.
@@ -40,7 +40,7 @@ module Ronin
40
40
  #
41
41
  # Enumerating over a IP-glob range:
42
42
  #
43
- # IPRange.each('10.0.1-3.*/24') { |ip| puts ip }
43
+ # IPRange.each('10.0.1-3.*') { |ip| puts ip }
44
44
  # # 10.0.1.1
45
45
  # # 10.0.1.2
46
46
  # # ...
@@ -75,7 +75,7 @@ module Ronin
75
75
  # ip_range = IPRange.new('10.0.0.1/24')
76
76
  #
77
77
  # @example Initializing an IP-glob range:
78
- # ip_range = IPRange.new('10.0.1-3.*/24')
78
+ # ip_range = IPRange.new('10.0.1-3.*')
79
79
  #
80
80
  def initialize(string)
81
81
  @range = if self.class.glob?(string) then Glob.new(string)
@@ -125,7 +125,7 @@ module Ronin
125
125
  # # 10.0.0.255
126
126
  #
127
127
  # @example Enumerating over a IP-glob range:
128
- # IPRange.each('10.0.1-3.*/24') { |ip| puts ip }
128
+ # IPRange.each('10.0.1-3.*') { |ip| puts ip }
129
129
  # # 10.0.1.1
130
130
  # # 10.0.1.2
131
131
  # # ...
@@ -228,7 +228,7 @@ module Ronin
228
228
  # # 10.0.0.255
229
229
  #
230
230
  # @example Enumerating over a IP-glob range:
231
- # ip_range = IPRange.new('10.0.1-3.*/24')
231
+ # ip_range = IPRange.new('10.0.1-3.*')
232
232
  # ip_range.each { |ip| puts ip }
233
233
  # # 10.0.1.1
234
234
  # # 10.0.1.2
@@ -115,7 +115,7 @@ module Ronin
115
115
  # # => #<Ronin::Support::Path:../../../../../../../etc/passwd>
116
116
  #
117
117
  def join(*names)
118
- joined_path = if root? then String.new
118
+ joined_path = if root? then String.new(encoding: Encoding::UTF_8)
119
119
  else self.to_s
120
120
  end
121
121
 
@@ -39,6 +39,10 @@ class String
39
39
  # @raise [Ronin::Support::Text::Homoglyph::NotViable]
40
40
  # No homoglyph replaceable characters were found in the String.
41
41
  #
42
+ # @example
43
+ # "microsoft".homoglyph
44
+ # # => "microsoft"
45
+ #
42
46
  # @see Ronin::Support::Text::Homoglyph.substitute
43
47
  #
44
48
  # @api public
@@ -68,6 +72,11 @@ class String
68
72
  # @return [Enumerator]
69
73
  # If no block is given, an Enumerator object will be returned.
70
74
  #
75
+ # @example
76
+ # "microsoft".each_homoglyph do |homoglyph|
77
+ # # ...
78
+ # end
79
+ #
71
80
  # @see Ronin::Support::Text::Homoglyph.each_substitution
72
81
  #
73
82
  # @api public
@@ -95,6 +104,30 @@ class String
95
104
  # @return [Array<String>]
96
105
  # All variation of the given String.
97
106
  #
107
+ # @example
108
+ # "microsoft".homoglyphs
109
+ # # =>
110
+ # # ["ⅿicrosoft",
111
+ # # "microsoft",
112
+ # # "mіcrosoft",
113
+ # # "mⅰcrosoft",
114
+ # # "microsoft",
115
+ # # "miϲrosoft",
116
+ # # "miсrosoft",
117
+ # # "miⅽrosoft",
118
+ # # "microsoft",
119
+ # # "microsoft",
120
+ # # "micrοsoft",
121
+ # # "microsοft",
122
+ # # "micrоsoft",
123
+ # # "microsоft",
124
+ # # "microsoft",
125
+ # # "microsoft",
126
+ # # "microѕoft",
127
+ # # "microsoft",
128
+ # # "microsoft",
129
+ # # "microsoft"]
130
+ #
98
131
  # @see Ronin::Support::Text::Homoglyph.each_substitution
99
132
  #
100
133
  # @api public
@@ -45,26 +45,26 @@ module Ronin
45
45
  # A regular expression for matching IPv6 Addresses.
46
46
  #
47
47
  # @since 1.0.0
48
- IPV6_ADDR = Regexp.union(
49
- /(?:[0-9a-f]{1,4}:){6}#{IPV4_ADDR}/,
50
- /(?:[0-9a-f]{1,4}:){5}[0-9a-f]{1,4}:#{IPV4_ADDR}/,
51
- /(?:[0-9a-f]{1,4}:){5}:[0-9a-f]{1,4}:#{IPV4_ADDR}/,
52
- /(?:[0-9a-f]{1,4}:){1,1}(?::[0-9a-f]{1,4}){1,4}:#{IPV4_ADDR}/,
53
- /(?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,3}:#{IPV4_ADDR}/,
54
- /(?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,2}:#{IPV4_ADDR}/,
55
- /(?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}){1,1}:#{IPV4_ADDR}/,
56
- /:(?::[0-9a-f]{1,4}){1,5}:#{IPV4_ADDR}/,
57
- /(?:(?:[0-9a-f]{1,4}:){1,5}|:):#{IPV4_ADDR}/,
58
- %r{(?:[0-9a-f]{1,4}:){1,1}(?::[0-9a-f]{1,4}){1,6}(?:/\d{1,3})?},
59
- %r{(?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,5}(?:/\d{1,3})?},
60
- %r{(?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,4}(?:/\d{1,3})?},
61
- %r{(?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}){1,3}(?:/\d{1,3})?},
62
- %r{(?:[0-9a-f]{1,4}:){1,5}(?::[0-9a-f]{1,4}){1,2}(?:/\d{1,3})?},
63
- %r{(?:[0-9a-f]{1,4}:){1,6}(?::[0-9a-f]{1,4}){1,1}(?:/\d{1,3})?},
64
- %r{[0-9a-f]{1,4}(?::[0-9a-f]{1,4}){7}(?:/\d{1,3})?},
65
- %r{:(?::[0-9a-f]{1,4}){1,7}(?:/\d{1,3})?},
66
- %r{(?:(?:[0-9a-f]{1,4}:){1,7}|:):(?:/\d{1,3})?}
67
- )
48
+ IPV6_ADDR = %r{
49
+ (?:[0-9a-f]{1,4}:){6}#{IPV4_ADDR}|
50
+ (?:[0-9a-f]{1,4}:){5}[0-9a-f]{1,4}:#{IPV4_ADDR}|
51
+ (?:[0-9a-f]{1,4}:){5}:[0-9a-f]{1,4}:#{IPV4_ADDR}|
52
+ (?:[0-9a-f]{1,4}:){1,1}(?::[0-9a-f]{1,4}){1,4}:#{IPV4_ADDR}|
53
+ (?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,3}:#{IPV4_ADDR}|
54
+ (?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,2}:#{IPV4_ADDR}|
55
+ (?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}){1,1}:#{IPV4_ADDR}|
56
+ :(?::[0-9a-f]{1,4}){1,5}:#{IPV4_ADDR}|
57
+ (?:(?:[0-9a-f]{1,4}:){1,5}|:):#{IPV4_ADDR}|
58
+ (?:[0-9a-f]{1,4}:){1,1}(?::[0-9a-f]{1,4}){1,6}(?:/\d{1,3})?|
59
+ (?:[0-9a-f]{1,4}:){1,2}(?::[0-9a-f]{1,4}){1,5}(?:/\d{1,3})?|
60
+ (?:[0-9a-f]{1,4}:){1,3}(?::[0-9a-f]{1,4}){1,4}(?:/\d{1,3})?|
61
+ (?:[0-9a-f]{1,4}:){1,4}(?::[0-9a-f]{1,4}){1,3}(?:/\d{1,3})?|
62
+ (?:[0-9a-f]{1,4}:){1,5}(?::[0-9a-f]{1,4}){1,2}(?:/\d{1,3})?|
63
+ (?:[0-9a-f]{1,4}:){1,6}(?::[0-9a-f]{1,4}){1,1}(?:/\d{1,3})?|
64
+ [0-9a-f]{1,4}(?::[0-9a-f]{1,4}){7}(?:/\d{1,3})?|
65
+ :(?::[0-9a-f]{1,4}){1,7}(?:/\d{1,3})?|
66
+ (?:(?:[0-9a-f]{1,4}:){1,7}|:):(?:/\d{1,3})?
67
+ }x
68
68
 
69
69
  # A regular expression for matching IP Addresses.
70
70
  #
@@ -31,7 +31,7 @@ module Ronin
31
31
  #
32
32
  # Generates a random String of numeric characters.
33
33
  #
34
- # @param [Integer] n
34
+ # @param [Integer, Range<Integer>] n
35
35
  # The desired length of the String.
36
36
  #
37
37
  # @return [String]
@@ -56,7 +56,7 @@ module Ronin
56
56
  #
57
57
  # A random octal-digit string.
58
58
  #
59
- # @param [Integer] n
59
+ # @param [Integer, Range<Integer>] n
60
60
  # The desired length of the String.
61
61
  #
62
62
  # @return [String]
@@ -79,7 +79,7 @@ module Ronin
79
79
  #
80
80
  # The upper-case hexadecimal character set.
81
81
  #
82
- # @param [Integer] n
82
+ # @param [Integer, Range<Integer>] n
83
83
  # The desired length of the String.
84
84
  #
85
85
  # @return [String]
@@ -104,7 +104,7 @@ module Ronin
104
104
  #
105
105
  # The lower-case hexadecimal character set.
106
106
  #
107
- # @param [Integer] n
107
+ # @param [Integer, Range<Integer>] n
108
108
  # The desired length of the String.
109
109
  #
110
110
  # @return [String]
@@ -129,7 +129,7 @@ module Ronin
129
129
  #
130
130
  # A random hexadecimal string.
131
131
  #
132
- # @param [Integer] n
132
+ # @param [Integer, Range<Integer>] n
133
133
  # The desired length of the String.
134
134
  #
135
135
  # @return [String]
@@ -152,7 +152,7 @@ module Ronin
152
152
  #
153
153
  # The upper-case alphabetic character set.
154
154
  #
155
- # @param [Integer] n
155
+ # @param [Integer, Range<Integer>] n
156
156
  # The desired length of the String.
157
157
  #
158
158
  # @return [String]
@@ -177,7 +177,7 @@ module Ronin
177
177
  #
178
178
  # The lower-case alphabetic character set.
179
179
  #
180
- # @param [Integer] n
180
+ # @param [Integer, Range<Integer>] n
181
181
  # The desired length of the String.
182
182
  #
183
183
  # @return [String]
@@ -202,7 +202,7 @@ module Ronin
202
202
  #
203
203
  # A random alphabetic string.
204
204
  #
205
- # @param [Integer] n
205
+ # @param [Integer, Range<Integer>] n
206
206
  # The desired length of the String.
207
207
  #
208
208
  # @return [String]
@@ -225,7 +225,7 @@ module Ronin
225
225
  #
226
226
  # A random alpha-numeric string.
227
227
  #
228
- # @param [Integer] n
228
+ # @param [Integer, Range<Integer>] n
229
229
  # The desired length of the String.
230
230
  #
231
231
  # @return [String]
@@ -248,7 +248,7 @@ module Ronin
248
248
  #
249
249
  # A random punctuation string.
250
250
  #
251
- # @param [Integer] n
251
+ # @param [Integer, Range<Integer>] n
252
252
  # The desired length of the String.
253
253
  #
254
254
  # @return [String]
@@ -271,7 +271,7 @@ module Ronin
271
271
  #
272
272
  # A random symbolic string.
273
273
  #
274
- # @param [Integer] n
274
+ # @param [Integer, Range<Integer>] n
275
275
  # The desired length of the String.
276
276
  #
277
277
  # @return [String]
@@ -294,7 +294,7 @@ module Ronin
294
294
  #
295
295
  # A random whitespace string.
296
296
  #
297
- # @param [Integer] n
297
+ # @param [Integer, Range<Integer>] n
298
298
  # The desired length of the String.
299
299
  #
300
300
  # @return [String]
@@ -319,7 +319,7 @@ module Ronin
319
319
  #
320
320
  # The set of printable characters, not including spaces.
321
321
  #
322
- # @param [Integer] n
322
+ # @param [Integer, Range<Integer>] n
323
323
  # The desired length of the String.
324
324
  #
325
325
  # @return [String]
@@ -342,7 +342,7 @@ module Ronin
342
342
  #
343
343
  # The set of printable characters, including spaces.
344
344
  #
345
- # @param [Integer] n
345
+ # @param [Integer, Range<Integer>] n
346
346
  # The desired length of the String.
347
347
  #
348
348
  # @return [String]
@@ -365,7 +365,7 @@ module Ronin
365
365
  #
366
366
  # A random control-character string.
367
367
  #
368
- # @param [Integer] n
368
+ # @param [Integer, Range<Integer>] n
369
369
  # The desired length of the String.
370
370
  #
371
371
  # @return [String]
@@ -388,7 +388,7 @@ module Ronin
388
388
  #
389
389
  # The signed ASCII character set.
390
390
  #
391
- # @param [Integer] n
391
+ # @param [Integer, Range<Integer>] n
392
392
  # The desired length of the String.
393
393
  #
394
394
  # @return [String]
@@ -411,7 +411,7 @@ module Ronin
411
411
  #
412
412
  # A random ASCII string.
413
413
  #
414
- # @param [Integer] n
414
+ # @param [Integer, Range<Integer>] n
415
415
  # The desired length of the String.
416
416
  #
417
417
  # @return [String]