ronin-support 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +38 -0
- data/README.md +0 -1
- data/lib/ronin/support/archive/core_ext/file.rb +43 -0
- data/lib/ronin/support/archive/core_ext.rb +1 -1
- data/lib/ronin/support/binary/array.rb +1 -1
- data/lib/ronin/support/binary/buffer.rb +3 -3
- data/lib/ronin/support/binary/core_ext.rb +2 -0
- data/lib/ronin/support/binary/cstring.rb +43 -0
- data/lib/ronin/support/binary/ctypes/array_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/bsd.rb +1 -1
- data/lib/ronin/support/binary/ctypes/unbounded_array_type.rb +1 -1
- data/lib/ronin/support/binary/packet.rb +77 -0
- data/lib/ronin/support/binary/stack.rb +3 -3
- data/lib/ronin/support/binary/template.rb +1 -5
- data/lib/ronin/support/binary.rb +1 -0
- data/lib/ronin/support/cli/io_shell.rb +2 -0
- data/lib/ronin/support/compression/core_ext/file.rb +16 -0
- data/lib/ronin/support/core_ext/kernel.rb +0 -4
- data/lib/ronin/support/crypto/cert.rb +17 -9
- data/lib/ronin/support/crypto/core_ext/file.rb +32 -0
- data/lib/ronin/support/crypto/core_ext/string.rb +34 -2
- data/lib/ronin/support/encoding/base16.rb +1 -1
- data/lib/ronin/support/encoding/base32.rb +1 -1
- data/lib/ronin/support/encoding/c/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/c.rb +2 -2
- data/lib/ronin/support/encoding/core_ext/string.rb +2 -2
- data/lib/ronin/support/encoding/hex/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/hex.rb +2 -2
- data/lib/ronin/support/encoding/js.rb +1 -1
- data/lib/ronin/support/encoding/powershell.rb +1 -1
- data/lib/ronin/support/encoding/quoted_printable.rb +3 -1
- data/lib/ronin/support/encoding/ruby.rb +1 -1
- data/lib/ronin/support/encoding/uuencoding.rb +3 -1
- data/lib/ronin/support/encoding/xml.rb +1 -1
- data/lib/ronin/support/network/dns/mixin.rb +2 -10
- data/lib/ronin/support/network/http/core_ext/uri/http.rb +8 -0
- data/lib/ronin/support/network/ip.rb +45 -14
- data/lib/ronin/support/network/ip_range.rb +4 -4
- data/lib/ronin/support/network/ssl/mixin.rb +2 -0
- data/lib/ronin/support/path.rb +1 -1
- data/lib/ronin/support/text/homoglyph/core_ext/string.rb +33 -0
- data/lib/ronin/support/text/patterns/network.rb +20 -20
- data/lib/ronin/support/text/random/mixin.rb +17 -17
- data/lib/ronin/support/text/random.rb +23 -23
- data/lib/ronin/support/text/typo/core_ext/string.rb +24 -0
- data/lib/ronin/support/version.rb +1 -1
- metadata +2 -2
@@ -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]
|
@@ -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
|
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.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chars
|