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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5450980d3f681010b1318d5b4ef2c681a83f9058
4
- data.tar.gz: a908feda2f8c2836011c4b9b4e613c50153c7c39
3
+ metadata.gz: 0711ef0fbfeac5d76e81b38059935440f5ef6d13
4
+ data.tar.gz: 58626ff7efe22cb34624010cc2540ba6ded45b3f
5
5
  SHA512:
6
- metadata.gz: c0a92e7087e79470ec3e7c09b94ff8d8b9005ae448bfe020d06d4de4c4e883b977bf04690e6d8a550aef6711eb4fadc156c9d08594e65cde05435c0ac116c08c
7
- data.tar.gz: 7d3ea2347b0c39340603b79a7c5b827ce7d6d6900af4689cb2733d3ef25e779c9562e131f6898ed1abbd5702a8b88d02ef6f8fa474313c4a889095ffff262b18
6
+ metadata.gz: 65095b537c518bb196b926106030f5110ceafb4d6ae948463f80b891e66c36415843f7b036b32a04bf3befc3751118035d4dacc651375385d515e856531497c5
7
+ data.tar.gz: ae5bec90e93e11d2fdb4fd3290f46ca632e8b0cb73a2b85f1c2607429f6741a0124d274024e6c54360082a99e868194fe168ee3b6d12dc043c9773113d4fae07
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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, fun)
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(fun + "\x00")
19
+ fun_hash = self.ror13_hash(func + "\x00")
20
20
  "0x#{(mod_hash + fun_hash & 0xFFFFFFFF).to_s(16)}"
21
21
  end
22
22
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Text
3
- VERSION = "0.2.15"
3
+ VERSION = "0.2.16"
4
4
  end
5
5
  end
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.15
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-05-11 00:00:00.000000000 Z
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.8
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