Skip to content

Instantly share code, notes, and snippets.

@CyberRoute
Created October 4, 2018 15:24
Show Gist options
  • Save CyberRoute/ba56bf2e3268cc1a9c62bfcc158d7342 to your computer and use it in GitHub Desktop.
Save CyberRoute/ba56bf2e3268cc1a9c62bfcc158d7342 to your computer and use it in GitHub Desktop.
challenge_bash
#!/bin/bash
X="http://letsrevolutionizetesting.com/challenge.json"
jsonparser() {
R=`curl -s $1| cut -d : -f3 -f2 | sed s/'"'//g | sed s/'}'//g | sed s/challenge/challenge.json/g`
echo $R
}
jsonparser $X
while [ -n "$R" ];
do jsonparser $R
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment