Skip to content

Instantly share code, notes, and snippets.

@romanrm
Created May 7, 2018 19:11
Show Gist options
  • Save romanrm/ea52814e168791fca9e2e81861d5039b to your computer and use it in GitHub Desktop.
Save romanrm/ea52814e168791fca9e2e81861d5039b to your computer and use it in GitHub Desktop.
#!/bin/bash
CC4=`curl -Ls4 https://www.youtube.com/ | egrep -o "content-region\">([[:alpha:]]+)</" | cut -d \> -f 2 | cut -d \< -f 1`
CC6=`curl -Ls6 https://www.youtube.com/ | egrep -o "content-region\">([[:alpha:]]+)</" | cut -d \> -f 2 | cut -d \< -f 1`
if [ "$CC4" != "" ]; then
echo "IPv4: $CC4"
fi
if [ "$CC6" != "" ]; then
echo "IPv6: $CC6"
fi
curl -s4 http://redirector.googlevideo.com/report_mapping | head -n1
curl -s6 http://redirector.googlevideo.com/report_mapping | head -n1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment