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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rex/text/hex.rb +5 -1
- 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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 181bf20065e213ea804a85f21de44e9f1b44982e
|
4
|
+
data.tar.gz: da78823665c67bdf1843a4738e4ff34fc00666b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.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-
|
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
|