Created
October 7, 2018 00:18
-
-
Save chapinb/01be73471e611a6a0be6bce1291157eb to your computer and use it in GitHub Desktop.
Quick python one-liner to decode URL safe base64 data that may be improperly padded
This file contains hidden or 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
# $1 = file to parse | |
# $2 = file to write to | |
cat $1 | python -c 'import sys, base64; data=sys.stdin.read(); print base64.urlsafe_b64decode(data+"="*(4-len(data)%4))' > $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
inspiration from: https://stackoverflow.com/a/9956217/3194812