Re: openssh
Claudio Nieder <[email protected]>
| Newsgroups | gmane.linux.lfs.security |
|---|---|
| Organization | disorganized |
| Message-ID | <[email protected]> |
> http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2002/06/0426.html
Hey, that's cool. I just added this function get to my .bashrc:
get()
{
h=${1#http://}
h=${h%%/*}
p=${h#*:}
if [ "$p" = "$h" ]; then
p='80'
fi
f=${1#http://*/}
if [ "$f" = "$1" ]; then
f='/'
else
if [ -z "$f" ]; then
f='/'
else
f="/$f"
fi
fi
( echo -e "GET $f HTTP/1.0\r\nHost: $h\r\n\r\n" 1>&3 & cat 0<&3 ) 3<>/dev/tcp/$h/$p \
| (read i; while [ "$(echo $i | tr -d '\r')" != "" ]; do read i; done; cat)
}
works great. Thanks for the hint!
claudio
--
Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 6743
yahoo messenger: claudionieder aim: claudionieder icq:42315212
mailto:[email protected] http://www.claudio.ch
--
Unsubscribe: send email to [email protected]
and put 'unsubscribe lfs-security' in the subject header of the message