Split grml-scripts into grml-scripts and grml-scripts-core
[grml-scripts-core.git] / usr_bin / myip
diff --git a/usr_bin/myip b/usr_bin/myip
deleted file mode 100755 (executable)
index 1fbe731..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/zsh
-# Filename:      myip
-# Purpose:       return IP address of running system on stdout (requires network access)
-# Authors:       grml-team (grml.org), (c) Alexander Wirt <formorer@grml.org>
-# Bug-Reports:   see http://grml.org/bugs/
-# License:       This file is licensed under the GPL v2.
-################################################################################
-
-# little helper functions that skips the httpheader of a site
-function skip_httpheader {
-   for i in {1..7} ; do
-         read -u $REPLY LINE; 
-         if [[ "$LINE" == "\r" ]] ; then return ; fi
-  done
-}
-
-zmodload zsh/net/tcp
-HOST=v4.showip.spamt.net
-ztcp $HOST 80
-print -u $REPLY "GET / HTTP/1.0\r\nHost: $HOST\r\n\r\n"
-skip_httpheader
-read -u $REPLY LINE
-echo "$LINE"
-ztcp -c $REPLY
-
-## END OF FILE #################################################################