Skip to content

Instantly share code, notes, and snippets.

@HugoPoi HugoPoi/madplay.conf
Last active Jan 28, 2017

Embed
What would you like to do?
iot failed to secure things, today i choose to pilote my thing with a file injected in a shell script running as root
http://192.168.1.97:8081/|-20
while true; do
conf=$(wget -q -O - http://192.168.1.97:8888/madplay.conf)
streamadr=$(echo $conf | cut -f1 -d\|)
volume=$(echo $conf | cut -f2 -d\|)
echo $streamadr
echo $volume
if [[ -z $streamadr ]];
then killall madplay;
else madplay_process_id=$(pidof madplay)
if [[ -z $madplay_process_id ]]; then
wget -q -O - $streamadr | madplay -a $volume - &
fi
fi;
echo "Wait for 10 seconds"
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.