Created
August 31, 2022 13:39
-
-
Save Und3rf10w/cc1dd81ea67632240fba94fd5be1a249 to your computer and use it in GitHub Desktop.
Extracts the contentBytes from a Microsoft Graph (o365) response and writes them to raw files using jq
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
for line in `cat response.json| jq '.value[].contentBytes'`; do | |
echo $line | tr -d '"' | base64 -d > $(echo -n $line | cut -c2-5).file; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment