Date: Mon, 14 Aug 95 10:31:44 -0700
From: Aaron Spangler 
Organization: Electrical Engineering University of Washington
Subject: Cert Advisory index with Hyperlinks

Here is a small filter I wrote myself.  I wrote it so that I could BROWSE
the CERT advisories.

You can view it in action:

You can also get the source from my page.

I have also included the source below.

--
Aaron Spangler                 EE Unix System Administrator
Electrical Engineering FT-10        pokee@ee.washington.edu
University of Washington            Phone    (206) 543-8984
Box 352500                             or    (206) 543-2523
Seattle, WA 98195-2500              Fax      (206) 543-3842

#!/bin/sh
#          cert2html.cgi  Written by Aaron Spangler
####  Get Cert README file and convert it into html.

site=info.cert.org
dir=/pub/cert_advisories
file=01-README
URL="ftp://$site$dir"/

# first ftp the readme file
echo "open ${site}
user ftp www@
bin
cd $dir
get $file
quit
" | ftp -n -i -v -d

# now convert the references to hrefs
cat $file | awk -vurl=$URL '
BEGIN{ printf "Content-type: text/html\n\n
" }
{
  if (substr($0,1,3) == "CA-") {

     file=$1
     left=substr($0,length(file)+1,length($0)-length(file))
     print "" file "" left

  } else print $0
}
END { printf "
\n"}'