[Toybox] Implement wget

Rob Landley rob at landley.net
Mon Feb 22 12:10:20 PST 2016


On 02/19/2016 05:44 AM, Felix Janda wrote:
> Lipi C. H. Lee wrote:
>> implement simple 'wget' and port name can be specified in URL if default
>> port 80 is not used.
>> It may be added to toys/pending directory.
> 
> Thanks for your submission!
> 
> Some comments below.

I gave Lipi a few days to respond to this, but if he's busy I can merge
it into pending and try some cleanups myself if he doesn't get to it first.

The reason I haven't tackled this myself is:

A) I want https support via "openssl s_client -quiet -connect" ala
http://lists.landley.net/pipermail/toybox-landley.net/2015-July/004286.html

B) I need to genericize the netcat plumbing, and tcpsvd and
telnetd/tftpd/dhcp/syslogd, and put something commonish in lib/net.c.
(Possibly tail -f can work in there too, not sure? We've got some stuff
using poll(), and some stuff using select(), and I need to audit the lot
at some point.)

C) Aboriginal Linux is using ftpget and ftpput, and this seems like it
should share code with wget. I also want a very simple httpd (wget in
reverse plus ~30 lines of basic CGI support, just enough to support
http://ph7.symisc.net/ if you're that crazy), and maybe a "curl" alias
for wget supporting that command line syntax (some people like it, maybe
even just an OLDTOY() with a couple tests).

I.E. "networking is a can of worms", but that's no reason to keep this
out of pending. :)

Rob

P.S. For servers it's easy to restrict files to within a directory if
you basically readlink -f each file and then strncmp() the path. I
didn't say it was efficient, I said it was easy. :)

 1456171820.0


More information about the Toybox mailing list