-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.1 2001/05/13 21:57:06 administrator Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.1.1.1 2001/05/15 13:58:54 oes Exp $";
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/jbsockets.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
*
* Purpose : Contains wrappers for system-specific sockets code,
* so that the rest of JunkBuster can be more
*
* Revisions :
* $Log: jbsockets.c,v $
+ * Revision 1.1.1.1 2001/05/15 13:58:54 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
}
#endif /* def TCP_NODELAY */
-#if !defined(_WIN32) && !defined(__BEOS__) && !defined(AMIGA)\r
+#if !defined(_WIN32) && !defined(__BEOS__) && !defined(AMIGA)
if ((flags = fcntl(fd, F_GETFL, 0)) != -1)
{
flags |= O_NDELAY;
{
#if defined(_WIN32) || defined(__BEOS__)
closesocket(fd);
-#elif defined(AMIGA)\r
- CloseSocket(fd); \r
+#elif defined(AMIGA)
+ CloseSocket(fd);
#else
close(fd);
#endif
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.1 2001/05/13 21:57:06 administrator Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.1.1.1 2001/05/15 13:58:58 oes Exp $";
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/loadcfg.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
*
* Purpose : Loads settings from the configuration file into
* global variables. This file contains both the
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.1.1.1 2001/05/15 13:58:58 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
#if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST)
int tinygif = 0;
-const char *tinygifurl = NULL;\r
+const char *tinygifurl = NULL;
#endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */
const char *logfile = NULL;
multi_threaded = 1;
#if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST)
- tinygif = 0;\r
+ tinygif = 0;
freez((char *)tinygifurl);
#endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */
switch( hash_string( cmd ) )
{
#ifdef TRUST_FILES
- case hash_trustfile :\r
+ case hash_trustfile :
freez((char *)trustfile);
trustfile = strdup(arg);
continue;
continue;
#if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST)
- case hash_tinygif :\r
+ case hash_tinygif :
freez((char *)tinygifurl);
tinygif = atoi(arg);
- if(3 == tinygif)\r
- {\r
- p = arg;\r
- while((*p >= '0') && (*p <= '9'))\r
- {\r
- p++;\r
- }\r
- while((*p == ' ') || (*p == '\t'))\r
- {\r
- p++;\r
- }\r
- if (*p)\r
- {\r
- q = malloc(strlen(p) + 5);\r
- if (q)\r
- {\r
- strcpy(q, p);\r
- strcat(q, "\r\n\r\n");\r
- tinygifurl = q;\r
- }\r
- }\r
- }\r
- if ((tinygif != 1) && \r
- (tinygif != 2) && \r
- ((tinygif != 3) || (tinygifurl==NULL)) )\r
- {\r
- log_error(LOG_LEVEL_ERROR, "tinygif setting invalid.");\r
- }\r
+ if(3 == tinygif)
+ {
+ p = arg;
+ while((*p >= '0') && (*p <= '9'))
+ {
+ p++;
+ }
+ while((*p == ' ') || (*p == '\t'))
+ {
+ p++;
+ }
+ if (*p)
+ {
+ q = malloc(strlen(p) + 5);
+ if (q)
+ {
+ strcpy(q, p);
+ strcat(q, "\r\n\r\n");
+ tinygifurl = q;
+ }
+ }
+ }
+ if ((tinygif != 1) &&
+ (tinygif != 2) &&
+ ((tinygif != 3) || (tinygifurl==NULL)) )
+ {
+ log_error(LOG_LEVEL_ERROR, "tinygif setting invalid.");
+ }
continue;
#endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */
enlist(xtra_list, arg);
continue;
- case hash_cookiefile :\r
+ case hash_cookiefile :
freez((char *)cookiefile);
cookiefile = strdup(arg);
continue;
- case hash_logfile :\r
+ case hash_logfile :
freez((char *)logfile);
logfile = strdup(arg);
continue;
- case hash_blockfile :\r
+ case hash_blockfile :
freez((char *)blockfile);
blockfile = strdup(arg);
continue;
#ifdef USE_IMAGE_LIST
- case hash_imagefile :\r
+ case hash_imagefile :
freez((char *)imagefile);
imagefile = strdup(arg);
continue;
#endif /* def USE_IMAGE_LIST */
#ifdef JAR_FILES
- case hash_jarfile :\r
+ case hash_jarfile :
freez((char *)jarfile);
jarfile = strdup(arg);
continue;
#endif /* def JAR_FILES */
- case hash_listen_address :\r
+ case hash_listen_address :
freez((char *)haddr);
haddr = strdup(arg);
continue;
- case hash_forwardfile :\r
+ case hash_forwardfile :
freez((char *)forwardfile);
forwardfile = strdup(arg);
continue;
#ifdef ACL_FILES
- case hash_aclfile :\r
+ case hash_aclfile :
freez((char *)aclfile);
aclfile = strdup(arg);
continue;
#endif /* def ACL_FILES */
#ifdef KILLPOPUPS
- case hash_popupfile :\r
+ case hash_popupfile :
freez((char *)popupfile);
popupfile = strdup(arg);
continue;
#endif /* def KILLPOPUPS */
#ifdef PCRS
- case hash_re_filterfile :\r
+ case hash_re_filterfile :
freez((char *)re_filterfile);
re_filterfile = strdup(arg);
continue;
continue;
#endif /* def PCRS */
- case hash_user_agent :\r
+ case hash_user_agent :
freez((char *)uagent);
uagent = strdup(arg);
continue;
* or the misspelling used in the HTTP spec.
*/
case hash_referrer :
- case hash_referer :\r
+ case hash_referer :
freez((char *)referrer);
referrer = strdup(arg);
continue;
- case hash_from :\r
+ case hash_from :
freez((char *)from);
from = strdup(arg);
continue;
#ifndef _LOADCFG_H
#define _LOADCFG_H
-#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.1 2001/05/13 21:57:06 administrator Exp $"
+#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.1.1.1 2001/05/15 13:58:58 oes Exp $"
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/loadcfg.h,v $
+ * File : $Source: /cvsroot/ijbswa/current/loadcfg.h,v $
*
* Purpose : Loads settings from the configuration file into
* global variables. This file contains both the
*
* Revisions :
* $Log: loadcfg.h,v $
+ * Revision 1.1.1.1 2001/05/15 13:58:58 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
#if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST)
extern int tinygif;
-extern const char *tinygifurl;\r
+extern const char *tinygifurl;
#endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */
extern const char *logfile;
-const char loaders_rcs[] = "$Id: loaders.c,v 1.1 2001/05/13 21:57:06 administrator Exp $";
+const char loaders_rcs[] = "$Id: loaders.c,v 1.1.1.1 2001/05/15 13:58:59 oes Exp $";
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/loaders.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $
*
* Purpose : Functions to load and unload the various
* configuration files. Also contains code to manage
*
* Revisions :
* $Log: loaders.c,v $
+ * Revision 1.1.1.1 2001/05/15 13:58:59 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
char * p = html_encode(filename);
if (p)
{
- fs->proxy_args = strsav(fs->proxy_args, "<h2>The file `");\r
- fs->proxy_args = strsav(fs->proxy_args, p);\r
- fs->proxy_args = strsav(fs->proxy_args, \r
- "' contains the following patterns</h2>\n");\r
- freez(p);\r
+ fs->proxy_args = strsav(fs->proxy_args, "<h2>The file `");
+ fs->proxy_args = strsav(fs->proxy_args, p);
+ fs->proxy_args = strsav(fs->proxy_args,
+ "' contains the following patterns</h2>\n");
+ freez(p);
}
fs->proxy_args = strsav(fs->proxy_args, "<pre>");
}
#ifndef _PROJECT_H
#define _PROJECT_H
-#define PROJECT_H_VERSION "$Id: project.h,v 1.1 2001/05/13 21:57:07 administrator Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.1.1.1 2001/05/15 13:59:03 oes Exp $"
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/project.h,v $
+ * File : $Source: /cvsroot/ijbswa/current/project.h,v $
*
* Purpose : Defines data structures which are widely used in the
* project. Does not define any variables or functions
*
* Revisions :
* $Log: project.h,v $
+ * Revision 1.1.1.1 2001/05/15 13:59:03 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
#define BANNER "<strong>Internet J<small>UNK<i><font color=\"red\">BUSTER</font></i></small></strong>"
#ifdef FORCE_LOAD
-/*\r
- * FIXME: Unfortunately, IE lowercases the domain name. JunkBuster does\r
- * a case-sensitive compare. JunkBuster should be modified to do a\r
- * case-insensitive compatison. As a temporary workaround, I've lowercased\r
- * the FORCE_PREFIX.\r
- *\r
- * #define FORCE_PREFIX "IJB-FORCE-LOAD-"\r
- */\r
-#define FORCE_PREFIX "ijb-force-load-"\r
+/*
+ * FIXME: Unfortunately, IE lowercases the domain name. JunkBuster does
+ * a case-sensitive compare. JunkBuster should be modified to do a
+ * case-insensitive compatison. As a temporary workaround, I've lowercased
+ * the FORCE_PREFIX.
+ *
+ * #define FORCE_PREFIX "IJB-FORCE-LOAD-"
+ */
+#define FORCE_PREFIX "ijb-force-load-"
#endif /* def FORCE_LOAD */
#define HOME_PAGE_URL "http://ijbswa.sourceforge.net/"
-const char showargs_rcs[] = "$Id: showargs.c,v 1.1 2001/05/13 21:57:07 administrator Exp $";
+const char showargs_rcs[] = "$Id: showargs.c,v 1.1.1.1 2001/05/15 13:59:03 oes Exp $";
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/showargs.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/showargs.c,v $
*
* Purpose : Contains various utility routines needed to
* generate the show-proxy-args page.
*
* Revisions :
* $Log: showargs.c,v $
+ * Revision 1.1.1.1 2001/05/15 13:59:03 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
"</h1></center>\n"
"<h2>You are using the " BANNER " <sup><small><small>TM</small></small></sup></h2>\n"
"Version: " VERSION "\n"
- "<br>Home page: <a href=\"" HOME_PAGE_URL "\">" HOME_PAGE_URL "</a>\n"\r
+ "<br>Home page: <a href=\"" HOME_PAGE_URL "\">" HOME_PAGE_URL "</a>\n"
"<p>\n"
);
#else /* ifndef REGEX */
b = strsav(b, " <li><code>#undef <b>REGEX</b></code> - No support for regular expressions in the path specs.</li>\n");
#endif /* ndef REGEX */
-\r
-#ifdef PCRE\r
- b = strsav(b, " <li><code>#define <b>PCRE</b></code> - Use PCRE rather than old GNU regex library.</li>\n");\r
-#else /* ifndef PCRE */\r
- b = strsav(b, " <li><code>#undef <b>PCRE</b></code> - Use old GNU regex library rather than PCRE.</li>\n");\r
-#endif /* ndef PCRE */\r
+
+#ifdef PCRE
+ b = strsav(b, " <li><code>#define <b>PCRE</b></code> - Use PCRE rather than old GNU regex library.</li>\n");
+#else /* ifndef PCRE */
+ b = strsav(b, " <li><code>#undef <b>PCRE</b></code> - Use old GNU regex library rather than PCRE.</li>\n");
+#endif /* ndef PCRE */
#ifdef PCRS
b = strsav(b, " <li><code>#define <b>PCRS</b></code> - Enables arbitrary content modification regexps.</li>\n");
#else /* ifndef PCRS */
b = strsav(b, " <li><code>#undef <b>PCRS</b></code> - Disables arbitrary content modification regexps.</li>\n");
#endif /* ndef PCRS */
-\r
-#ifdef TOGGLE\r
- b = strsav(b, " <li><code>#define <b>TOGGLE</b></code> - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");\r
-#else /* ifndef TOGGLE */\r
- b = strsav(b, " <li><code>#undef <b>TOGGLE</b></code> - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");\r
-#endif /* ndef TOGGLE */\r
-\r
-#ifdef FORCE_LOAD\r
- b = strsav(b, " <li><code>#define <b>FORCE_LOAD</b></code> - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".</li>\n");\r
-#else /* ifndef FORCE_LOAD */\r
- b = strsav(b, " <li><code>#undef <b>FORCE_LOAD</b></code> - Disables bypassing filtering for a single page.</li>\n");\r
-#endif /* ndef FORCE_LOAD */\r
+
+#ifdef TOGGLE
+ b = strsav(b, " <li><code>#define <b>TOGGLE</b></code> - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");
+#else /* ifndef TOGGLE */
+ b = strsav(b, " <li><code>#undef <b>TOGGLE</b></code> - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");
+#endif /* ndef TOGGLE */
+
+#ifdef FORCE_LOAD
+ b = strsav(b, " <li><code>#define <b>FORCE_LOAD</b></code> - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".</li>\n");
+#else /* ifndef FORCE_LOAD */
+ b = strsav(b, " <li><code>#undef <b>FORCE_LOAD</b></code> - Disables bypassing filtering for a single page.</li>\n");
+#endif /* ndef FORCE_LOAD */
#ifdef DENY_GZIP
b = strsav(b, " <li><code>#define <b>DENY_GZIP</b></code> - Prevents requests from being compressed - required for PCRS.</li>\n");
#else /* ifndef ACL_FILES */
b = strsav(b, " <li><code>#undef <b>ACL_FILES</b></code> - Disables the use of ACL files to control access to the proxy by IP address.</li>\n");
#endif /* ndef ACL_FILES */
-\r
+
#ifdef TRUST_FILES
b = strsav(b, " <li><code>#define <b>TRUST_FILES</b></code> - Enables the use of trust files.</li>\n");
#else /* ifndef TRUST_FILES */
b = strsav(b, " <li><code>#undef <b>TRUST_FILES</b></code> - Disables the use of trust files.</li>\n");
#endif /* ndef TRUST_FILES */
-#ifdef JAR_FILES\r
- b = strsav(b, " <li><code>#define <b>JAR_FILES</b></code> - Enables the use of jar files to capture cookies.</li>\n");\r
-#else /* ifndef JAR_FILES */\r
- b = strsav(b, " <li><code>#undef <b>JAR_FILES</b></code> - Disables the use of jar files to capture cookies.</li>\n");\r
-#endif /* ndef JAR_FILES */\r
+#ifdef JAR_FILES
+ b = strsav(b, " <li><code>#define <b>JAR_FILES</b></code> - Enables the use of jar files to capture cookies.</li>\n");
+#else /* ifndef JAR_FILES */
+ b = strsav(b, " <li><code>#undef <b>JAR_FILES</b></code> - Disables the use of jar files to capture cookies.</li>\n");
+#endif /* ndef JAR_FILES */
b = strsav(b, "</ul>\n<br>\n");
-const char ssplit_rcs[] = "$Id: ssplit.c,v 1.1 2001/05/13 21:57:07 administrator Exp $";
+const char ssplit_rcs[] = "$Id: ssplit.c,v 1.1.1.1 2001/05/15 13:59:04 oes Exp $";
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/ssplit.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/ssplit.c,v $
*
* Purpose : A function to split a string at specified deliminters.
*
*
* Revisions :
* $Log: ssplit.c,v $
+ * Revision 1.1.1.1 2001/05/15 13:59:04 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
#include "config.h"
#include <string.h>
-#include <stdlib.h>\r
+#include <stdlib.h>
#ifdef _WIN32
#include <malloc.h>