-
-
Save rainbowdashlabs/ad24545c14a446c00d6823c0a458d147 to your computer and use it in GitHub Desktop.
disney plus pin finder in bash
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
#!/bin/bash | |
# This script can help you when you forgot the pin for your disney plus profile. | |
# Dont use it to get access to other members of your account. This is only for your own profile :3 | |
# Arguments: <start> <end> <profile_id> <token> | |
# start and end are the first and last pin to be checked. zeros will be added by the script. | |
# the profile id can be found in the url url when you have to enter your pin | |
# the token can be found in any request which requires authentification. try a pin to get it for example. | |
# the token has to be entered without the "Bearer" in front of it. | |
FIRST=$1 | |
LAST=$2 | |
PROFILE_ID=$3 | |
TOKEN=$4 | |
for pin in $(seq -f "%04g" $FIRST $LAST) | |
do | |
BODY="{\"entryPin\":\"$pin\"}" | |
echo "testing pin $pin" | |
response=$(curl -X PUT -H "Content-Type: application/json" -d $BODY --write-out '%{http_code}' --silent --output /dev/null -H "authorization: Bearer $TOKEN" https://global.edge.bamgrid.com/accounts/me/active-profile/$PROFILE_ID) | |
if [ $response -eq 200 ] | |
then | |
echo "Pin is $pin. Have fun!" | |
exit | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment