[PLUG] Writing a CGI scipt.

Michael C. Robinson michael at goose.robinson-west.com
Sun Oct 12 01:12:01 UTC 2003


##!/bin/sh
#echo Content-type: text/html
#echo
#echo
#echo "<HTML>"
#echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"
#echo "<HEAD>"
#echo "<TITLE>Masquerading changer.</TITLE>"
#echo "</HEAD>"
#echo "<BODY BGCOLOR=WHITE TEXT=PURPLE LINK=PURPLE VLINK=PURPLE>"
#echo "<H2>Internet access changer.</H2>"
#echo "<CENTER>"
#echo "<P><H4>Enter name of host to change Internet access of.</H4></P>"
#echo "<FORM method="POST">"
#echo "<input type=\"text\" name=\"host\" size=\"30\">"
#echo "<P><H4>Enter your firewall password.</H4></P>"
#echo "<input type=\"password\" name=\"pass\" size=\"20\">"
#echo "</CENTER>"
#echo "<BR>"
#echo "<BR>"
#echo "<BR>"
#echo "<input type=\"radio\" name=\"a\" value=\"on\"> on<br>"
#echo "<input type=\"radio\" name=\"a\" value=\"off\"> off<br>"
#echo "<PRE>"
#
#
#echo "</PRE>"
#echo "<input type=\"submit\" value=\"Process.\">"
#echo "<input type=\"reset\" value=\"Clear.\">"
#echo "</FORM>"
#echo "<PRE>"
#
#
#echo "</PRE>"
#echo "<HR>"
#echo "<A HREF=\"http://goose.robinson-west.com/firewall-i.htm\"><IMG
#SRC=\"../icons/back.gif\"></A>"
#echo "<PRE>"
#echo "</PRE>
#echo "</BODY>"
#echo "</HTML>"


Okay, this is my current version of the cgi script I'm working on to
allow users to open and close their Internet access.  I put a # in front
of every line so that it hopefully won't render as html in people's
email readers.  At this point I'm wondering if there are any glaring
errors and how to use the entries to test them against
lists, do dns checks ( especially the password ), then store the 
result out to a file.  Of course if the test fails can I unpost and
the data and clear the form?

     --  Michael Robinson




More information about the PLUG mailing list