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.40 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.39 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.38 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.37 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.36 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.35 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.34 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.33 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.32 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.31 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.30 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.29 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.28 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.27 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.26 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.25 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.24 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.23 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.22 lib/rex/exploitation/js/utils.rb
rex-exploitation-0.1.21 lib/rex/exploitation/js/utils.rb