nega0 / pianobarfly

pandora2[mp3|m4a]
https://github.com/nega0/pianobarfly
Other
62 stars 31 forks source link

Auto-Update TLS Fingerprint #70

Open demlak opened 5 years ago

demlak commented 5 years ago

Hey, since the TLS Fingerprint changed every once in a while when using portaler DNS (don't use portaler as systemwide DNS! Just use host entries for your desired hosts!), one year ago i made a simple bash script to autoupdate it before starting pianobarfly.

feel free to use this: pia.sh

#!/bin/bash
function fingerprint {
openssl s_client -connect tuner.pandora.com:443 < /dev/null 2> /dev/null | openssl x509 -noout -fingerprint | tr -d ':' | cut -d'=' -f2
}

sed -i "s/tls_fingerprint =.*$/tls_fingerprint = $(fingerprint)/" ~/.config/pianobarfly/config

pianobarfly
SebastianHD commented 5 years ago

Thanks demlak, very useful.

pythonian1027 commented 4 years ago

Hi, I'm trying to run in Ubuntu 12.04, initially I get the error TLS mismatch, and also I don't have the ~/.config/pianobarfly/config so I get a "sed: can't read /home/username/.config/pianobarfly/config: No such a file or directory.

Any ideas how can I get around? Many thanks!

demlak commented 4 years ago

create config file manualy.. read the manpage