Skip to content

Instantly share code, notes, and snippets.

@rainbowdashlabs
Last active June 15, 2021 16:44
Show Gist options
  • Save rainbowdashlabs/ad24545c14a446c00d6823c0a458d147 to your computer and use it in GitHub Desktop.
Save rainbowdashlabs/ad24545c14a446c00d6823c0a458d147 to your computer and use it in GitHub Desktop.
disney plus pin finder in bash
#!/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