rex-text 0.2.15 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rex/text/block_api.rb +2 -2
- data/lib/rex/text/rand.rb +29 -1
- data/lib/rex/text/version.rb +1 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0711ef0fbfeac5d76e81b38059935440f5ef6d13
|
4
|
+
data.tar.gz: 58626ff7efe22cb34624010cc2540ba6ded45b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65095b537c518bb196b926106030f5110ceafb4d6ae948463f80b891e66c36415843f7b036b32a04bf3befc3751118035d4dacc651375385d515e856531497c5
|
7
|
+
data.tar.gz: ae5bec90e93e11d2fdb4fd3290f46ca632e8b0cb73a2b85f1c2607429f6741a0124d274024e6c54360082a99e868194fe168ee3b6d12dc043c9773113d4fae07
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rex/text/block_api.rb
CHANGED
@@ -13,10 +13,10 @@ module Rex
|
|
13
13
|
# @param fun [String] The name of the function.
|
14
14
|
#
|
15
15
|
# @return [String] The hash of the mod/fun pair in string format
|
16
|
-
def self.block_api_hash(mod,
|
16
|
+
def self.block_api_hash(mod, func)
|
17
17
|
unicode_mod = (mod.upcase + "\x00").unpack('C*').pack('v*')
|
18
18
|
mod_hash = self.ror13_hash(unicode_mod)
|
19
|
-
fun_hash = self.ror13_hash(
|
19
|
+
fun_hash = self.ror13_hash(func + "\x00")
|
20
20
|
"0x#{(mod_hash + fun_hash & 0xFFFFFFFF).to_s(16)}"
|
21
21
|
end
|
22
22
|
|
data/lib/rex/text/rand.rb
CHANGED
@@ -13,6 +13,29 @@ module Rex
|
|
13
13
|
"MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH",
|
14
14
|
"OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA",
|
15
15
|
"WI", "WV", "WY"]
|
16
|
+
|
17
|
+
Countries = ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM",
|
18
|
+
"AW", "AC", "AU", "AT", "AZ", "BS", "BH", "BB", "BD", "BY", "BE", "BZ",
|
19
|
+
"BJ", "BM", "BT", "BW", "BO", "BA", "BV", "BR", "IO", "BN", "BG", "BF",
|
20
|
+
"BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC",
|
21
|
+
"CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "CS",
|
22
|
+
"DK", "DJ", "DM", "DO", "TP", "EC", "EG", "SV", "GQ", "ER", "EE", "ET",
|
23
|
+
"FK", "FO", "FJ", "FI", "FR", "FX", "GF", "PF", "TF", "MK", "GA", "GM",
|
24
|
+
"GE", "DE", "GH", "GI", "GB", "GR", "GL", "GD", "GP", "GU", "GT", "GN",
|
25
|
+
"GY", "HT", "HM", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE",
|
26
|
+
"IL", "IM", "IT", "JE", "JM", "JP", "JO", "KZ", "KE", "KI", "KP", "KR",
|
27
|
+
"KW", "KG", "LA", "LV", "LB", "LI", "LR", "LY", "LS", "LT", "LU", "MO",
|
28
|
+
"MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX",
|
29
|
+
"FM", "MD", "MC", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL",
|
30
|
+
"AN", "NT", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM",
|
31
|
+
"PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR",
|
32
|
+
"QA", "RE", "RO", "RU", "RW", "GS", "KN", "LC", "VC", "WS", "SM", "ST",
|
33
|
+
"SA", "SN", "RS", "SC", "SL", "SG", "SI", "SK", "SB", "SO", "ZA", "ES",
|
34
|
+
"LK", "SH", "PM", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ",
|
35
|
+
"TZ", "TH", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG",
|
36
|
+
"UA", "AE", "UK", "US", "UM", "UY", "SU", "UZ", "VU", "VA", "VE", "VN",
|
37
|
+
"VG", "VI", "WF", "EH", "YE", "YU", "ZM", "ZW"]
|
38
|
+
|
16
39
|
#
|
17
40
|
# Most 100 common surnames, male/female names in the U.S. (http://names.mongabay.com/)
|
18
41
|
#
|
@@ -191,6 +214,11 @@ module Rex
|
|
191
214
|
host.join('.').downcase
|
192
215
|
end
|
193
216
|
|
217
|
+
# Generate a country code
|
218
|
+
def self.rand_country
|
219
|
+
Countries.sample
|
220
|
+
end
|
221
|
+
|
194
222
|
# Generate a state
|
195
223
|
def self.rand_state()
|
196
224
|
States.sample
|
@@ -230,4 +258,4 @@ module Rex
|
|
230
258
|
mail_address << Rex::Text.rand_hostname
|
231
259
|
end
|
232
260
|
end
|
233
|
-
end
|
261
|
+
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.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David 'thelightcosine' Maloney
|
@@ -88,7 +88,7 @@ cert_chain:
|
|
88
88
|
G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
|
89
89
|
8mVuTXnyJOKRJA==
|
90
90
|
-----END CERTIFICATE-----
|
91
|
-
date: 2017-
|
91
|
+
date: 2017-12-29 00:00:00.000000000 Z
|
92
92
|
dependencies:
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: bundler
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.6.
|
195
|
+
rubygems_version: 2.6.13
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Provides Text Manipulation Methods for Exploitation
|
metadata.gz.sig
CHANGED
Binary file
|