Created
April 10, 2020 18:29
-
-
Save chuckersjp/88a621a900d6530d7e7a1e370ca3cef3 to your computer and use it in GitHub Desktop.
OpenShift 4 bootstrap decoder
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/python | |
import sys, json, base64 | |
file_list = json.load(sys.stdin)['storage']['files'] | |
for files in file_list: | |
print files['path'] + "\n" + base64.b64decode(files['contents']['source'].split(',')[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool! Thanks for that. I didn't figure it would be all that hard but most of the systems I have been using this on don't have python3 on them just yet so didn't really have the need.
But this will definitely be useful going forward,