Sha256: 86905b02673436e7e093abe6110e1143cff35b22bd294d93ba0b057f5d5f73bd

Contents?: true

Size: 435 Bytes

Versions: 50

Compression:

Stored size: 435 Bytes

Contents

RSpec.shared_context 'Rex::Text' do
  before(:example) do
    rex_text = Module.new do
      def self.ascii_safe_hex(str, whitespace=false)
        if whitespace
          str.gsub(/([\x00-\x20\x80-\xFF])/n){ |x| "\\x%.2x" % x.unpack("C*")[0] }
        else
          str.gsub(/([\x00-\x08\x0b\x0c\x0e-\x1f\x80-\xFF])/n){ |x| "\\x%.2x" % x.unpack("C*")[0]}
        end
      end
    end

    stub_const('Rex::Text', rex_text)
  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
wg-metasploit_data_models-4.1.4.02 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-6.0.5 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-6.0.4 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-6.0.3 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-6.0.2 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-6.0.1 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-6.0.0 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-5.0.6 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-5.0.5 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-5.0.4 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-5.0.3 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-5.0.2 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-5.0.1 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-5.0.0 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-4.1.4 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-4.1.3 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-4.1.2 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-4.1.1 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-4.1.0 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-4.0.2 spec/support/shared/contexts/rex/text.rb