rex-text 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d5076155b7b82845a9ad453afb5a3e29390f9fe
4
- data.tar.gz: eebdf7f404d01a997af19003d3f7f9d375aeeec0
3
+ metadata.gz: 181bf20065e213ea804a85f21de44e9f1b44982e
4
+ data.tar.gz: da78823665c67bdf1843a4738e4ff34fc00666b4
5
5
  SHA512:
6
- metadata.gz: 9113091ac90906ba4bbed43a5d63c624126e23e429b75d3c698c5d510edc44438f727fe3a4d0594c2d30ea96cbb8f25a7e7529cb4851f71772fb1323bcbd66f4
7
- data.tar.gz: 5a877df040f398fdabffebc31d161df1c61a828d7e9b45f86708770c5946c8f77e14326e6dd1d59fe501791b7d398b5ead5960640319fc92d5d396679d451987
6
+ metadata.gz: a8dad29fe5e79df5a70c34fb5fc2925ebae33ad9ea78754aac5f76b8b6872ef839c1c047a7b426708a09a218318636a57b7cc3920e59615f3507ef59eb0c11b6
7
+ data.tar.gz: 59656b234b4c9a02f334b17f84ebb407084c70d5f7e1246770eae8f7ea07004667ca55aee7d97b0fbbc08ac6948fa72fdf6dd7176a6ca49ff932fb371f4ffe49
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rex/text/hex.rb CHANGED
@@ -1,4 +1,3 @@
1
- # -*- coding: binary -*-
2
1
  module Rex
3
2
  module Text
4
3
  # We are re-opening the module to add these module methods.
@@ -112,6 +111,11 @@ module Rex
112
111
  # @see to_hex Converts all the chars
113
112
  #
114
113
  def self.ascii_safe_hex(str, whitespace=false)
114
+ # This sanitization is terrible and breaks everything if it finds unicode.
115
+ # ~4 Billion can't be wrong; long-term, this should be removed.
116
+ if str.encoding == (::Encoding::UTF_8)
117
+ return str
118
+ end
115
119
  if whitespace
116
120
  str.gsub(/([\x00-\x20\x80-\xFF])/n){ |x| "\\x%.2x" % x.unpack("C*")[0] }
117
121
  else
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Text
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
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.3
4
+ version: 0.2.4
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: 2016-10-11 00:00:00.000000000 Z
91
+ date: 2016-10-14 00:00:00.000000000 Z
92
92
  dependencies:
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: bundler
metadata.gz.sig CHANGED
Binary file