-
-
Save hotelzululima/6a5715ba4f5fd8ac95cc227f3460e3cf to your computer and use it in GitHub Desktop.
Replace Pandora's old tls fingerprint with new one in pianobar config
This file contains hidden or 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 | |
## | |
## A simple little shell script that will return the current | |
## fingerprint on the SSL certificate and replace it in | |
## pianobar's config file automatically | |
## | |
## Author: William Jacoby (bonelifer) <> | |
## | |
## Base on the Github Gist by Bob Saska at: https://gist.github.com/r35krag0th/4173333 | |
## | |
## Assign the output of the openssl command to a variable for later use | |
tlsFingerPrint=`openssl s_client -connect tuner.pandora.com:443 < /dev/null 2> /dev/null | \ | |
openssl x509 -noout -fingerprint | tr -d ':' | cut -d'=' -f2` | |
## Debug outpout line | |
## echo "$tlsFingerPrint" | |
## Change this line to point to your pianobar config file | |
file="/home/pi/.config/pianobar/config" | |
## Go ahead and rewrite the tls_fingerprint line in pianobar's config file | |
sed -ie "s/^tls_fingerprint =.*/tls_fingerprint = $tlsFingerPrint/" $file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment