Skip to content

Instantly share code, notes, and snippets.

@mrngm
Last active December 31, 2015 08:19
Show Gist options
  • Save mrngm/7960204 to your computer and use it in GitHub Desktop.
Save mrngm/7960204 to your computer and use it in GitHub Desktop.
Kerstboomscraper voor http://www.ru.nl/vm/kerstboom/
#!/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