Sha256: eeab7ad4eb3aa0b7208216d35e38ddfd09da1abd298e54c9fc762cb8865e8c0d

Contents?: true

Size: 641 Bytes

Versions: 15

Compression:

Stored size: 641 Bytes

Contents

# -*- coding: binary -*-

require 'msf/core'
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(Msf::Config.data_directory, "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

15 entries across 15 versions & 3 rubygems

Version Path
rex-2.0.13 lib/rex/exploitation/js/utils.rb
rex-2.0.12 lib/rex/exploitation/js/utils.rb
rex-2.0.11 lib/rex/exploitation/js/utils.rb
rex-2.0.10 lib/rex/exploitation/js/utils.rb
rex-2.0.9 lib/rex/exploitation/js/utils.rb
rex-2.0.8 lib/rex/exploitation/js/utils.rb
rex-2.0.7 lib/rex/exploitation/js/utils.rb
rex-2.0.5 lib/rex/exploitation/js/utils.rb
rex-2.0.4 lib/rex/exploitation/js/utils.rb
dstruct-0.0.1 lib/rex/exploitation/js/utils.rb
rex-2.0.3 lib/rex/exploitation/js/utils.rb
librex-0.0.999 lib/rex/exploitation/js/utils.rb
rex-2.0.2 lib/rex/exploitation/js/utils.rb
librex-0.0.71 lib/rex/exploitation/js/utils.rb
librex-0.0.70 lib/rex/exploitation/js/utils.rb