Sha256: 30bf9a57b3d44f3d6da05cd037956f2ef3dc900b0385a542a3cbb343a7da2288

Contents?: true

Size: 501 Bytes

Versions: 48

Compression:

Stored size: 501 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'optparse'

opts = {}
OptionParser.new do |options|
  options.banner = "USAGE:
    #{File.basename($PROGRAM_NAME)} [opts]
  "

  options.on('-pSTRING', '--payload=STRING', '<Required - String to Encode>') do |p|
    opts[:payload] = p
  end
end.parse!

if opts.empty?
  puts `#{File.basename($PROGRAM_NAME)} --help`
  exit 1
end

payload = opts[:payload].to_s.scrub
puts payload.unpack('U*').map { |i| "\\u#{i.to_s(16).rjust(4, '0')}" }.join

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
pwn-0.5.193 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.192 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.191 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.190 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.189 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.188 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.187 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.186 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.185 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.184 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.183 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.181 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.180 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.179 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.178 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.177 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.176 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.175 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.174 bin/pwn_char_unicode_escaped_encoding
pwn-0.5.173 bin/pwn_char_unicode_escaped_encoding