Sha256: 174a775bfbb53bd6f727c963f81bb082c0f39ac0d157fba3acd1a80f46cd82f1

Contents?: true

Size: 508 Bytes

Versions: 69

Compression:

Stored size: 508 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
payload.each_char do |char|
  print "\\x#{char.to_s.unpack1('H*')}"
end
print "\n"

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
pwn-0.5.236 bin/pwn_char_hex_escaped_encoding
pwn-0.5.235 bin/pwn_char_hex_escaped_encoding
pwn-0.5.234 bin/pwn_char_hex_escaped_encoding
pwn-0.5.233 bin/pwn_char_hex_escaped_encoding
pwn-0.5.232 bin/pwn_char_hex_escaped_encoding
pwn-0.5.231 bin/pwn_char_hex_escaped_encoding
pwn-0.5.230 bin/pwn_char_hex_escaped_encoding
pwn-0.5.229 bin/pwn_char_hex_escaped_encoding
pwn-0.5.228 bin/pwn_char_hex_escaped_encoding
pwn-0.5.227 bin/pwn_char_hex_escaped_encoding
pwn-0.5.226 bin/pwn_char_hex_escaped_encoding
pwn-0.5.225 bin/pwn_char_hex_escaped_encoding
pwn-0.5.224 bin/pwn_char_hex_escaped_encoding
pwn-0.5.223 bin/pwn_char_hex_escaped_encoding
pwn-0.5.222 bin/pwn_char_hex_escaped_encoding
pwn-0.5.221 bin/pwn_char_hex_escaped_encoding
pwn-0.5.220 bin/pwn_char_hex_escaped_encoding
pwn-0.5.219 bin/pwn_char_hex_escaped_encoding
pwn-0.5.217 bin/pwn_char_hex_escaped_encoding
pwn-0.5.216 bin/pwn_char_hex_escaped_encoding