rex-text 0.2.33 → 0.2.34
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rex/text/rand.rb +20 -0
- data/lib/rex/text/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d93de07f7f5bff1baccd1833925a45980893d545c713fed38e34a60e311dbd0
|
|
4
|
+
data.tar.gz: 132765a3f8f790636e5d98e225bacbf3410ee3c51955356ee11585d2e2f4c0a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afdc3a6ea21a97626b8eb0332bd36ab85a283a42a75b02804642cc817e6fb8e7e4bfa66d9aed6de05c98e9ef21b59eea125a2513c9eb019e284acbcdd20515b3
|
|
7
|
+
data.tar.gz: '017778b2f81f7ff1bbfe833f9d297e745328429f4275ab4ac4698f4d25eb0cdb3fca843d020eb817520b0bfbd1f6da4b1a5892e012d2e92005d23988fe7a61a0'
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/rex/text/rand.rb
CHANGED
|
@@ -258,5 +258,25 @@ module Rex
|
|
|
258
258
|
mail_address << '@'
|
|
259
259
|
mail_address << Rex::Text.rand_hostname
|
|
260
260
|
end
|
|
261
|
+
|
|
262
|
+
# Generate a strong password of specified length and attributes
|
|
263
|
+
def self.rand_password(len=10, mix_case:true, numbers:true, special_characters: false)
|
|
264
|
+
allowed_characters=[]
|
|
265
|
+
upper=('A'..'Z').to_a
|
|
266
|
+
lower=('a'..'z').to_a
|
|
267
|
+
number=('0'..'10').to_a
|
|
268
|
+
specials = ((32..47).to_a + (58..64).to_a + (91..96).to_a + (123..126).to_a).pack('U*').chars
|
|
269
|
+
allowed_characters+=upper
|
|
270
|
+
if mix_case
|
|
271
|
+
allowed_characters+=lower
|
|
272
|
+
end
|
|
273
|
+
if numbers
|
|
274
|
+
allowed_characters+=number
|
|
275
|
+
end
|
|
276
|
+
if special_characters
|
|
277
|
+
allowed_characters+=specials
|
|
278
|
+
end
|
|
279
|
+
rand_base(len,'',*allowed_characters)
|
|
280
|
+
end
|
|
261
281
|
end
|
|
262
282
|
end
|
data/lib/rex/text/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rex-text
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.34
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Metasploit Hackers
|
|
@@ -93,7 +93,7 @@ cert_chain:
|
|
|
93
93
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
|
94
94
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
|
95
95
|
-----END CERTIFICATE-----
|
|
96
|
-
date: 2021-
|
|
96
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
|
97
97
|
dependencies:
|
|
98
98
|
- !ruby/object:Gem::Dependency
|
|
99
99
|
name: rake
|
metadata.gz.sig
CHANGED
|
Binary file
|