Last active
February 24, 2024 09:55
-
-
Save pvdb/34a57da12cfce63261ca1d727cf6303d to your computer and use it in GitHub Desktop.
Obfuscate sensitive input read from STDIN and write to STDOUT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# INSTALLATION | |
# | |
# ln -s ${PWD}/obfuscate $(brew --prefix)/bin/ | |
# sudo ln -s ${PWD}/obfuscate /usr/local/bin/ | |
# | |
# ALIAS | |
# | |
# ln -s ${PWD}/obfuscate $(brew --prefix)/bin/pbobfuscate | |
# sudo ln -s ${PWD}/obfuscate /usr/local/bin/pbobfuscate | |
# | |
if [ "${0##*/}" = "pbobfuscate" ]; then | |
if [ "$(uname)" = "Darwin" ]; then | |
pbpaste | obfuscate | pbcopy ; | |
exit 0 ; | |
fi | |
fi | |
tr '[:digit:]' '0' | tr '[:lower:]' 'x' | tr '[:upper:]' 'X' | tr '[:punct:]' '.' ; | |
# That's all Folks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment