Last active
December 31, 2015 08:19
-
-
Save mrngm/7960204 to your computer and use it in GitHub Desktop.
Kerstboomscraper voor http://www.ru.nl/vm/kerstboom/
This file contains 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 | |
set +H | |
GETIT='/usr/bin/wget -qO- http://communicatie.ruhosting.nl/kerstboom/active-entry2.php' | |
LASTMSG=`$GETIT | recode html..ascii` | |
while true; do | |
CMD=`$GETIT | recode html..ascii` | |
if [[ "$CMD" == "$LASTMSG" || "$CMD" == "De kerstboom staat nu uit. Zet jij hem aan?" ]]; then | |
echo -n "." | |
else | |
echo "" | |
echo "$CMD" | nc -uw1 88.198.13.144 65400 | |
echo "$CMD" | |
LASTMSG=$CMD | |
fi | |
sleep 1; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment