projects
/
grml-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fb2156f
)
Fix for myip, thanks to wuehlmaus and schula.
0.9.21
author
Michael Prokop
<mika@grml.org>
Thu, 1 Mar 2007 13:58:31 +0000
(14:58 +0100)
committer
Michael Prokop
<mika@grml.org>
Thu, 1 Mar 2007 13:58:31 +0000
(14:58 +0100)
debian/changelog
patch
|
blob
|
history
usr_bin/myip
patch
|
blob
|
history
diff --git
a/debian/changelog
b/debian/changelog
index
f03e0db
..
ccae1a8
100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-1,3
+1,9
@@
+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.
grml-scripts (0.9.20) unstable; urgency=low
* Updated make_chroot_jail to latest upstream version.
diff --git
a/usr_bin/myip
b/usr_bin/myip
index
0f77d5a
..
66ef2e4
100755
(executable)
--- a/
usr_bin/myip
+++ b/
usr_bin/myip
@@
-9,13
+9,16
@@
# little helper functions that skips the httpheader of a site
function skip_httpheader {
# 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
}
zmodload zsh/net/tcp
-HOST=showip.spamt.net
+HOST=
v4.
showip.spamt.net
ztcp $HOST 80
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"
skip_httpheader
read -u $REPLY LINE
echo "$LINE"