Last active
January 28, 2017 16:36
-
-
Save HugoPoi/0c55a2096dffccf62fe3677c1acbc4d3 to your computer and use it in GitHub Desktop.
iot failed to secure things, today i choose to pilote my thing with a file injected in a shell script running as root
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
http://192.168.1.97:8081/|-20 |
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
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