Created
November 26, 2021 21:09
-
-
Save Asvarox/7b412f7b7086947f883baf4c94cf4170 to your computer and use it in GitHub Desktop.
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
getJsonValue() { | |
# $1: JSON string to process, $2: Desired JSON key | |
osascript -l 'JavaScript' -e "JSON.parse(\`$1\`).$2;" | |
} | |
# String sent by a rogue API endpoint | |
json='{}`);const app = Application.currentApplication(); app.includeStandardAdditions = true;app.displayAlert("👾🔥🙈");JSON.parse(`{}'; | |
fullName=$(getJsonValue "$json" name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment