+grml-scripts (0.9.21) unstable; urgency=low
+
+ * Fix for myip, thanks to wuehlmaus and schula.
+
+ -- Michael Prokop <mika@grml.org> Thu, 1 Mar 2007 14:58:05 +0100
+
grml-scripts (0.9.20) unstable; urgency=low
* Updated make_chroot_jail to latest upstream version.
# little helper functions that skips the httpheader of a site
function skip_httpheader {
- for i in {1..6} ; do read -u $REPLY LINE; done
+ for i in {1..7} ; do
+ read -u $REPLY LINE;
+ if [[ "$LINE" == "\r" ]] ; then return ; fi
+ done
}
zmodload zsh/net/tcp
-HOST=showip.spamt.net
+HOST=v4.showip.spamt.net
ztcp $HOST 80
-print -u $REPLY "GET / HTTP/1.1\r\nHost: $HOST\r\n\r\n"
+print -u $REPLY "GET / HTTP/1.0\r\nHost: $HOST\r\n\r\n"
skip_httpheader
read -u $REPLY LINE
echo "$LINE"