Thanks Tim. That looks great! I like the idea of a loader script.
-----Original Message-----
From: Tim Litwiller [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 11:59 PM
To: e-smith-devinfo
Subject: Re: [e-smith-devinfo] squidguard returns
make another perl file called loader ( for this example ) that
takes
the script name the domain and the switch as variables and then
check that script name is valid before running the domain and the
switch
thru it.
this will keep users from being able to attempt to run other
executables.
in this loader you can also put html return calls to indicate
success or failure
and then call back to the original form.
or generate an entire page in the loader with the success or
failure notice and
a link to add another.
<form name="squid-guard" method="post"
action="/cgi-bin/loader?script=$script&domain=&formelement1&switch=$switch">
<table width="75%" border="0">
<tr><td colspan=2>
Choose list to modify<hr>
<table width="100%" border="1">
<tr>
<td>
<input type="radio" name="script" value="trusted-d">
trusted-d</td>
<td>
<input type="radio" name="script" value="trusted-e">
trusted-e</td>
<td>
<input type="radio" name="script" value="trusted-u">
trusted-u</td>
</tr>
<tr>
<td>
<input type="radio" name="script"
value="untrusted-d">
untrusted-d</td>
<td>
<input type="radio" name="script"
value="untrusted-e">
untrusted-e</td>
<td>
<input type="radio" name="script" value="untrusted-u">
untrusted-u </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>enter domain </td>
<td>
<input type="text" name="formelement1" size="35"
maxlength="55">
</td>
</tr>
<tr>
<td>click to unblock domain </td>
<td>
<input type="radio" name="switch" value="r">
</td>
</tr>
</table>
<br>
</form>
Trevor Ouellette wrote:
>
> I've done a lot of work today on squidguard... but I still need to
implement
> it into the manager.
>
> It automatically downloads the latest public blacklists and installs them
> weekly.
>
> I've written 6 scripts: trusted-d, trusted-e, trusted-u, untrusted-d,
> untrusted-e, and untrusted-u for updating the user-database in squidguard.
> It works perfectly.
>
> The scripts work like this:
>
> If I'm adding a pornographic domain (xxx.com) to my database, I simply
> enter:
>
> # ./untrusted-d xxx.com
>
> And it's added. I can remove them as well:
>
> # ./untrusted-d xxx.com r
>
> It's very simple. I would like to display forms on a webpage (ibay) that
> the administrator can enter the "xxx.com" in the box and hit submit. Then
> PHP or perl passes those arguments "$1" and "$2" to my 6 scripts.
>
> Any ideas? Any perl wizards out there? I can give you full details and a
> copy of the scripts if you are not sure.
>
> Trev.
>
> --
> Please report bugs to [EMAIL PROTECTED]
> Please mail [EMAIL PROTECTED] (only) to discuss security issues
> Support for registered customers and partners to [EMAIL PROTECTED]
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Archives by mail and
http://www.mail-archive.com/devinfo%40lists.e-smith.org
--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org
--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org