Method: Rex::Text.dehex!
- Defined in:
- lib/rex/text.rb
.dehex!(str) ⇒ Object
Convert and replace hex-encoded characters to literals.
1188 1189 1190 1191 1192 1193 |
# File 'lib/rex/text.rb', line 1188 def self.dehex!(str) return str unless str.respond_to? :match return str unless str.respond_to? :gsub regex = /\x5cx[0-9a-f]{2}/nmi str.gsub!(regex) { |x| x[2,2].to_i(16).chr } end |