Sha256: df02454c86db1bbe10053fc8e1e5fa7686b245a8efc8c223a0a61936980c735f

Contents?: true

Size: 623 Bytes

Versions: 41

Compression:

Stored size: 623 Bytes

Contents

# -*- coding: binary -*-

require 'rex/text'
require 'rex/exploitation/jsobfu'

module Rex
module Exploitation
module Js

#
# Javascript utilities
#
class Utils

  def self.base64
    js = ::File.read(::File.join(Rex::Exploitation::DATA_DIR, "js", "utils", "base64.js"))

    opts = {
      'Symbols' => {
        'Variables' => %w{ Base64 encoding result _keyStr encoded_data utftext input_idx
          input output chr chr1 chr2 chr3 enc1 enc2 enc3 enc4 },
        'Methods'   => %w{ _utf8_encode _utf8_decode encode decode }
      }
    }

    ::Rex::Exploitation::ObfuscateJS.new(js, opts).to_s
  end

end
end
end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
rex-exploitation-0.1.20 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.19 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.18 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.17 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.16 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.15 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.14 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.13 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.12 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.11 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.10 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.9 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.8 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.7 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.6 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.5 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.4 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.3 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.2 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.1 lib/rex/exploitation/js/utils.rb