M86 Security M86 User Manual page 474

Web filtering and reporting suite
Hide thumbs Also See for M86:
Table of Contents

Advertisement

W
F
A
EB
ILTER
PPENDICES
446
S
A
B
ECTION
PPENDIX
void printhtml();
void unescape_url(char *url);
char x2c(char *what);
char *makeword(char *line, char stop);
void plustospace(char *str);
char *fmakeword(FILE *f, char stop, int *cl);
int to_upper(char *string);
void getquery(char *paramd, char **paramv);
void getnextquery(char **paramv);
int main(int argc, char **argv)
{
int data_size; /* size (in bytes) of POST input */
int index;
char *paramd, *paramn, *paramv;
char step[120];
printf("content-type: text/html\n\n");
/* If using the GET method */
if (strcmp((char *)getenv("REQUEST_METHOD"), "GET") == 0)
{
paramd = (char *)strdup((char *)getenv("QUERY_STRING"));
getquery(paramd, &paramv);
while (paramv)
{
plustospace(paramv);
unescape_url(paramv);
paramn = (char *)makeword(paramv, '=');
to_upper(paramn);
if (strcmp(paramn, "IP") == 0)
strcpy(szIP, paramv);
else if (strcmp(paramn, "URL") == 0)
strcpy(szURL, paramv);
else if (strcmp(paramn, "CAT") == 0)
strcpy(szCategory, paramv);
else if (strcmp(paramn, "USER") == 0)
strcpy(szUserName, paramv);
getnextquery(&paramv);
}
free(paramd);
}
else
{
/*====================================================
Read stdin and convert form data into an array; set
a variety of global variables to be used by other
M86 S
U
G
ECURITY
SER
UIDE

Advertisement

Table of Contents
loading

Table of Contents