Class: Ronin::Payloads::Encoders::JS::Encode

Inherits:
Ronin::Payloads::Encoders::JavaScriptEncoder show all
Defined in:
lib/ronin/payloads/encoders/builtin/js/encode.rb

Overview

A JavaScript encoder that encodes every character in the given String as an JavaScript special character.

Instance Method Summary collapse

Methods inherited from Encoder

register, #validate

Instance Method Details

#encode(data) ⇒ String

JS encodes the given data.

Parameters:

  • data (String)

Returns:

  • (String)


53
54
55
# File 'lib/ronin/payloads/encoders/builtin/js/encode.rb', line 53

def encode(data)
  Support::Encoding::JS.encode(data)
end