Skip to content

Instantly share code, notes, and snippets.

@KINGSABRI
Created March 16, 2018 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KINGSABRI/cf45e054d91ff8821acd99561c42c9d2 to your computer and use it in GitHub Desktop.
Save KINGSABRI/cf45e054d91ff8821acd99561c42c9d2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env crystal
#
# Author: KING SABRI | @KINGSABRI
# Description: Base64 encoding all characters in a given payload
# Requirements: None
#
require "json"
require "base64"
json = JSON.parse(ARGV[0])
payload = json["payload"]
kwargs = json["kwargs"]
json["payload"] = Base64.encode(payload)
print json.to_json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment