There are several files in the archive

upget.c		URL to stdout utility.
upput.c		Minimalist web server.
Makefile	makes these
t2t		table to text awk script
t2tgrnest	table to text awk script, nested w/ graphic chars
formextr.awk	extract forms to editable shell script
spkac.c	        takes genrsa key files and creates an spkac structure
		for use with the keygen tag.



UPGET - minimalist browser

Example usage:

upget cnnfn.com | tally | headstrip | less

upget gets almost any URL.  For people with access to SSLeay, it will
work with https, and with SSLftp (with the -s required for SSL
transfers, otherwise it will work as a normal ftp client) for versions
later than 0.8 (requires PASV).  Other protocols 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.  https will switch to SSL if this is
enabled.  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.

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 ~/.upgetauth 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

SSL usage

-s will enable ssl (for ftp, and http if https isn't used).

-x will bypass the validity check for the certificate

-v certfile will send the pem certificate if asked by the server

NOTE: for certificates to be verified, the files in the certs
directory from the original SSLeay distribution need to be in the
certs directory of the final install location (normally
/usr/local/ssl), and new ones need to be added for each new CA,
otherwise use the -x command.

SOCKS support is available if enabled.



UPPUT - minimalist server

NOTE: Netscape 3.0's idea of SSL and SSLeay are a little different, so
using upput -s may not work if you use Netscape to retrieve the file.
Lynx and Upget both work.

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:

upput [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 ~/.upputauth (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.

upget host:12345/filename

running "upput -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 upput 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/upput." will place the file xxx in /tmp/upput.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.



OTHERS

formextr.awk converts form data into a shell script.
