Skip to content

Instantly share code, notes, and snippets.

@gabrieljcs
Last active March 5, 2022 18:56
Show Gist options
  • Save gabrieljcs/fdd0f0f103686fde6eaad0c97ea75f71 to your computer and use it in GitHub Desktop.
Save gabrieljcs/fdd0f0f103686fde6eaad0c97ea75f71 to your computer and use it in GitHub Desktop.
zsh script to go through VPN's IPs and validate if they're blacklisted in a streaming service
# This script iterates through Mullvad's servers in order to find a valid (non-geoblocked) IP for HBO Max
mullvad relay update && mullvad connect
# Replace "us" below with the country code you desire
for i in $(mullvad relay list | grep -ow $'\t''us\S*'); do
mullvad relay set hostname $i
sleep 3
# Copy your full request to HBO's (or similar service) session URL including your cookies and user agent
curl -H "https://oauth-us.api.hbo.com/auth/tokens" [...] | grep geo_blocked
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment