GETURL - minimalist browser

Example usage:

geturl cnnfn.com | less

geturl gets almost any URL.  Most protocols have special handlers, any
others will simply run the program passively and connect to the named
port, e.g. telnet:/x.y.z will open a telnet session to x.y.z and get
anything displayed when it starts - normally a login prompt, and it
will immediately close.

It supports full URLs of the form:

  protocol://site.dns.spec:port/path/file
  [---------][-----------][---][--------]
     http://             :80  /index.html -defaults

Protocol is normally http or ftp.  Protocol will default to http if
omitted.  The port will default to 80, or whatever is found when the
protocol is looked up as a service (so /etc/services should contain
ftp as 21/tcp and https as 443/tcp if you wish to use them).  You must
specify at least the dns name of the site.  If a port is specified, it
will be looked up if text, or used as a value if decimal.  /index.html
will be used for the file if no path is specified.

Proxies are supported including the lynx SSL proxies (i.e. you can do
https by running a lynx SSL proxy server like eassl, and setting
https_proxy as described in the proxies).

All options should follow the URL.

It also supports authentication (as when you register your username).
Use the -u, and include a line of the form:
site.dns.spec username:password
in the ~/.geturlauth file (in your home directory).  chmod it to 600.
This works with both ftp and http(s).

-c <file or -> will send a file as content and create content messages
internally and set the transfer type to POST for forms using the POST
method.

-g will send the form parameter file appended to the url (the GET
method)

Specifying - as a file will send data read from stdin (whatever is
sending will need to close stdin so a content count can be made).

-a will specify a user-agent string (since some sites won't work unless
it thinks a graphics capable browser is at the other end), e.g.
"-a Mosaic".

To get an FTP directory, use the -l option.  Don't specify it for
files.

"-i num" will repeat the request every num seconds.

Add -d to get debug information

-z will attempt to strip the HTTP header, leaving only the file

SOCKS support is available if enabled.



PUTURL - minimalist server

This is an easy way to get files from a remote account (it was
inspired by pftp for linux).  It isn't secure, so should be run
from a tmp directory with the files you want to transfer inside
the directory.

General Usage:

puturl [options]

This will pick a port to use and display it.  You can override with
-p.  -u will require authentication by getting the username:password
from the first line in ~/.upgetauth (there should be only one line,
with a colon between username and password).  -a x.y.z.w will force it
to use ip address x.y.z.w for the address (so you can force it to be
localhost).

The root is the current directory, and it will attempt to return the
current directory in html if none is specified, or if the path ends up
as a directory.

geturl host:12345/filename

running "puturl -p 12345" on host, it will send filename.  It
identifies all files as octet streams so browsers will attempt to
download them instead of displaying or running them.

WARNING: files above the root can be accessed by specifying the parent
directory as .., i.e. http://host:12345/.. will return the parent of
the directory where puturl was started from.

The files come over as application/octet stream (except for text/html
for directories), unless overridden with "-t mime/type".

POSTing will send files.  They will be placed in the current directory,
and/or in the directory where -l specifies with an optional prefix,
"-l /tmp/puturl." will place the file xxx in /tmp/puturl.xxx"  The string
in -l is simply prepended to the location of the POST target.

SOCKS support is available, but be careful with the bind command since
it may not try a remote connection if the server thinks it is local.

NOTE: hex constants aren't collapsed, i.e. %20 will not be converted
to a space, so filenames must only contain printable characters, or
extended characters should be entered verbatim on the URL line.
