Skip to content

Instantly share code, notes, and snippets.

@chapinb
Created October 7, 2018 00:18
Show Gist options
  • Save chapinb/01be73471e611a6a0be6bce1291157eb to your computer and use it in GitHub Desktop.
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
# $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
@chapinb
Copy link
Author

chapinb commented Oct 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment