Skip to content

Instantly share code, notes, and snippets.

@4thel00z
Last active October 31, 2020 11:17
Show Gist options
  • Save 4thel00z/32e502588a5285c23a141d668affec07 to your computer and use it in GitHub Desktop.
Save 4thel00z/32e502588a5285c23a141d668affec07 to your computer and use it in GitHub Desktop.
The intention of this software is to provide a script to upload encrypted data to gist
#
# Licensed under the GPL-3 License
#
# Author: Mohamed Mustapha Tahrioui aka. ransomware aka. 4thel00z ([email protected])
#
# The intention of this software is to provide a script to upload encrypted data to gist for myself
# and others who are interested in using my software non-commercially or commercialy.
#
# The requirements for this script are :
# - base64
# - curl
# - gpg
# - hub -> https://github.com/github/hub
# - env
#
#! /usr/bin/zsh
set -x
which hub
if [ $! -nq 0 ]; then
failure=$!
echo "You need to install hub!" >&2
return $failure
fi
if [ $# -eq 3 ]
then
cat $1 | gpg --encrypt -r $2 | base64 | env GITHUB_TOKEN=$3 hub gist create
else
cat $1 | gpg --encrypt -r $2 | base64 | hub gist create
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment