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
@@ -73,7 +73,7 @@ module Ronin
73
73
  #
74
74
  # Generates a random String of numeric characters.
75
75
  #
76
- # @param [Integer] n
76
+ # @param [Integer, Range<Integer>] n
77
77
  # The desired length of the String.
78
78
  #
79
79
  # @return [String]
@@ -88,7 +88,7 @@ module Ronin
88
88
  #
89
89
  # Alias for {numeric}.
90
90
  #
91
- # @param [Integer] n
91
+ # @param [Integer, Range<Integer>] n
92
92
  # The desired length of the String.
93
93
  #
94
94
  # @return [String]
@@ -103,7 +103,7 @@ module Ronin
103
103
  #
104
104
  # A random octal-digit string.
105
105
  #
106
- # @param [Integer] n
106
+ # @param [Integer, Range<Integer>] n
107
107
  # The desired length of the String.
108
108
  #
109
109
  # @return [String]
@@ -118,7 +118,7 @@ module Ronin
118
118
  #
119
119
  # The upper-case hexadecimal character set.
120
120
  #
121
- # @param [Integer] n
121
+ # @param [Integer, Range<Integer>] n
122
122
  # The desired length of the String.
123
123
  #
124
124
  # @return [String]
@@ -133,7 +133,7 @@ module Ronin
133
133
  #
134
134
  # Alias for {uppercase_hex}.
135
135
  #
136
- # @param [Integer] n
136
+ # @param [Integer, Range<Integer>] n
137
137
  # The desired length of the String.
138
138
  #
139
139
  # @return [String]
@@ -148,7 +148,7 @@ module Ronin
148
148
  #
149
149
  # The lower-case hexadecimal character set.
150
150
  #
151
- # @param [Integer] n
151
+ # @param [Integer, Range<Integer>] n
152
152
  # The desired length of the String.
153
153
  #
154
154
  # @return [String]
@@ -163,7 +163,7 @@ module Ronin
163
163
  #
164
164
  # Alias for {lowercase_hex}.
165
165
  #
166
- # @param [Integer] n
166
+ # @param [Integer, Range<Integer>] n
167
167
  # The desired length of the String.
168
168
  #
169
169
  # @return [String]
@@ -178,7 +178,7 @@ module Ronin
178
178
  #
179
179
  # A random hexadecimal string.
180
180
  #
181
- # @param [Integer] n
181
+ # @param [Integer, Range<Integer>] n
182
182
  # The desired length of the String.
183
183
  #
184
184
  # @return [String]
@@ -193,7 +193,7 @@ module Ronin
193
193
  #
194
194
  # The upper-case alphabetic character set.
195
195
  #
196
- # @param [Integer] n
196
+ # @param [Integer, Range<Integer>] n
197
197
  # The desired length of the String.
198
198
  #
199
199
  # @return [String]
@@ -208,7 +208,7 @@ module Ronin
208
208
  #
209
209
  # Alias for {uppercase_alpha}.
210
210
  #
211
- # @param [Integer] n
211
+ # @param [Integer, Range<Integer>] n
212
212
  # The desired length of the String.
213
213
  #
214
214
  # @return [String]
@@ -223,7 +223,7 @@ module Ronin
223
223
  #
224
224
  # The lower-case alphabetic character set.
225
225
  #
226
- # @param [Integer] n
226
+ # @param [Integer, Range<Integer>] n
227
227
  # The desired length of the String.
228
228
  #
229
229
  # @return [String]
@@ -238,7 +238,7 @@ module Ronin
238
238
  #
239
239
  # Alias for {lowercase_alpha}.
240
240
  #
241
- # @param [Integer] n
241
+ # @param [Integer, Range<Integer>] n
242
242
  # The desired length of the String.
243
243
  #
244
244
  # @return [String]
@@ -253,7 +253,7 @@ module Ronin
253
253
  #
254
254
  # A random alphabetic string.
255
255
  #
256
- # @param [Integer] n
256
+ # @param [Integer, Range<Integer>] n
257
257
  # The desired length of the String.
258
258
  #
259
259
  # @return [String]
@@ -268,7 +268,7 @@ module Ronin
268
268
  #
269
269
  # A random alpha-numeric string.
270
270
  #
271
- # @param [Integer] n
271
+ # @param [Integer, Range<Integer>] n
272
272
  # The desired length of the String.
273
273
  #
274
274
  # @return [String]
@@ -283,7 +283,7 @@ module Ronin
283
283
  #
284
284
  # A random punctuation string.
285
285
  #
286
- # @param [Integer] n
286
+ # @param [Integer, Range<Integer>] n
287
287
  # The desired length of the String.
288
288
  #
289
289
  # @return [String]
@@ -298,7 +298,7 @@ module Ronin
298
298
  #
299
299
  # A random symbolic string.
300
300
  #
301
- # @param [Integer] n
301
+ # @param [Integer, Range<Integer>] n
302
302
  # The desired length of the String.
303
303
  #
304
304
  # @return [String]
@@ -313,7 +313,7 @@ module Ronin
313
313
  #
314
314
  # A random whitespace string.
315
315
  #
316
- # @param [Integer] n
316
+ # @param [Integer, Range<Integer>] n
317
317
  # The desired length of the String.
318
318
  #
319
319
  # @return [String]
@@ -328,7 +328,7 @@ module Ronin
328
328
  #
329
329
  # A random whitespace string.
330
330
  #
331
- # @param [Integer] n
331
+ # @param [Integer, Range<Integer>] n
332
332
  # The desired length of the String.
333
333
  #
334
334
  # @return [String]
@@ -342,7 +342,7 @@ module Ronin
342
342
  #
343
343
  # The set of printable characters, not 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]
@@ -357,7 +357,7 @@ module Ronin
357
357
  #
358
358
  # The set of printable characters, including spaces.
359
359
  #
360
- # @param [Integer] n
360
+ # @param [Integer, Range<Integer>] n
361
361
  # The desired length of the String.
362
362
  #
363
363
  # @return [String]
@@ -372,7 +372,7 @@ module Ronin
372
372
  #
373
373
  # A random control-character string.
374
374
  #
375
- # @param [Integer] n
375
+ # @param [Integer, Range<Integer>] n
376
376
  # The desired length of the String.
377
377
  #
378
378
  # @return [String]
@@ -387,7 +387,7 @@ module Ronin
387
387
  #
388
388
  # The signed ASCII character set.
389
389
  #
390
- # @param [Integer] n
390
+ # @param [Integer, Range<Integer>] n
391
391
  # The desired length of the String.
392
392
  #
393
393
  # @return [String]
@@ -402,7 +402,7 @@ module Ronin
402
402
  #
403
403
  # A random ASCII string.
404
404
  #
405
- # @param [Integer] n
405
+ # @param [Integer, Range<Integer>] n
406
406
  # The desired length of the String.
407
407
  #
408
408
  # @return [String]
@@ -41,6 +41,10 @@ class String
41
41
  # @return [String]
42
42
  # A random typo of the String.
43
43
  #
44
+ # @example
45
+ # "microsoft".typo
46
+ # # => "microssoft"
47
+ #
44
48
  # @see Ronin::Support::Text::Typo.substitute
45
49
  #
46
50
  # @api public
@@ -79,6 +83,11 @@ class String
79
83
  # @return [Enumerator]
80
84
  # If no block is given, an Enumerator will be returned.
81
85
  #
86
+ # @example
87
+ # "consciousness".each_typo do |typo|
88
+ # # ...
89
+ # end
90
+ #
82
91
  # @see Ronin::Support::Text::Typo.each_substitution
83
92
  #
84
93
  # @api public
@@ -110,6 +119,21 @@ class String
110
119
  # @return [Array<String>]
111
120
  # Every typo variation of the String.
112
121
  #
122
+ # @example
123
+ # "consciousness".typos
124
+ # # =>
125
+ # # ["consciusness",
126
+ # # "consciosness",
127
+ # # "conscuosness",
128
+ # # "consciosness",
129
+ # # "coonsciousness",
130
+ # # "conscioousness",
131
+ # # "conssciousness",
132
+ # # "conscioussness",
133
+ # # "consciousnesss",
134
+ # # "consciuosness",
135
+ # # "consciousnes"]
136
+ #
113
137
  # @see Ronin::Support::Text::Typo.each_substitution
114
138
  #
115
139
  # @api public
@@ -19,6 +19,6 @@
19
19
  module Ronin
20
20
  module Support
21
21
  # ronin-support version
22
- VERSION = '1.0.1'
22
+ VERSION = '1.0.2'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-02 00:00:00.000000000 Z
11
+ date: 2023-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chars