Sha256: ab7fa470b6568acab60b05d89a300e573f60386f335a944b7077b76c1fd2c4c7

Contents?: true

Size: 426 Bytes

Versions: 69

Compression:

Stored size: 426 Bytes

Contents

shared_context 'Rex::Text' do
  before(:each) 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

69 entries across 69 versions & 1 rubygems

Version Path
metasploit_data_models-1.2.10 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.9 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.8 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.7 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.6 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.5 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.4 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.3 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.2 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-0.24.5 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-0.24.4 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.1 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.2.0 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.1.0 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.0.1 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-1.0.0 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-0.24.3 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-0.24.2 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-0.24.1.pre.rspec.pre.3.pre.1 spec/support/shared/contexts/rex/text.rb
metasploit_data_models-0.24.1 spec/support/shared/contexts/rex/text.rb