W
EB
F
ILTER
A
PPENDICES
S
ECTION
A
PPENDIX
B
M86 S
ECURITY
U
SER
G
UIDE
447
areas of the program
====================================================*/
data_size = atoi(getenv("CONTENT_LENGTH"));
for(index = 0; data_size && (!feof(stdin)); index++)
{
entries[index].val = (char *)fmakeword(stdin, '&',
&data_size);
plustospace(entries[index].val);
unescape_url(entries[index].val);
entries[index].name = (char
*)makeword(entries[index].val, '=');
if (strcmp(entries[index].name, "IP") == 0)
strcpy(szIP, entries[index].val);
else if (strcmp(entries[index].name, "URL") == 0)
strcpy(szURL, entries[index].val);
else if (strcmp(entries[index].name, "CAT") == 0)
strcpy(szCategory, entries[index].val);
else if (strcmp(entries[index].name, "USER") == 0)
strcpy(szUserName, entries[index].val);
}
}
printhtml();
}
void printhtml()
{
printf("<html>\n");
printf("<head>\n");
printf("<script language=\"JavaScript\">\n");
printf("function do_options()\n");
printf("{\n");
printf("document.block.action=\"http://<Web Filter IP>:81/cgi/
block.cgi\"\n");
printf("document.block.submit()\n");
printf("}\n");
printf("</script>\n");
printf("</head>\n");
printf("<form method=post name=block >\n");
printf("<input type=hidden name=\"SITE\"
value=\"_BLOCK_SITE_\">\n");
printf("<input type=hidden name=\"IP\" value=\"%s\">\n", szIP);
printf("<input type=hidden name=\"URL\" value=\"%s\">\n",
szURL);
printf("<input type=hidden name=\"CAT\" value=\"%s\">\n",
szCategory);
printf("<input type=hidden name=\"USER\" value=\"%s\">\n",