branch 2.7.x

This commit is contained in:
brenosilva
2012-09-10 19:31:29 +00:00
95 changed files with 22544 additions and 47 deletions

17
CHANGES
View File

@@ -1,3 +1,20 @@
XX NNN 2012 - 2.7.0-rc3
-------------------
* Fixed requests bigger than SecRequestBodyNoFilesLimit were truncated even engine mode was detection only.
* Fixed double close() for multipart temporary files (Thanks Seema Deepak).
* Fixed many small issues reported by Coverity Scanner (Thanks Peter Vrabek).
* Fixed format string issue in ngnix experimental code. (Thanks Eldar Zaitov).
* Added ctl:ruleRemoveTargetByTag/Msg and removed ctl:ruleUpdateTargetByTag/Msg.
* Added IIS and Ngnix platform code.
* Added new transformation utf8toUnicode.
23 Jul 2012 - 2.6.7
-------------------

View File

@@ -21,7 +21,7 @@ CC = CL
MT = mt
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE -D$(VERSION)
DLL = mod_security2.so

View File

@@ -222,7 +222,7 @@ int perform_interception(modsec_rec *msr) {
/* ENH This does not seem to work on Windows. Is there a
* better way to drop a connection anyway?
*/
#ifndef WIN32
#if !defined(WIN32) && defined(ALLOW_ACTION_DROP)
{
extern module core_module;
apr_socket_t *csd = ap_get_module_config(msr->r->connection->conn_config,

View File

@@ -1,25 +1 @@
/* Some APR files define PACKAGE* constants, which may conflict
* so this is here to prevent that by removing them.
*/
/* Undefine all these so there are no conflicts */
#undef PACKAGE
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_URL
#undef PACKAGE_VERSION
/* Include the real autoconf header */
#include "modsecurity_config_auto.h"
/* Undefine all these (again) so there are no conflicts */
#undef PACKAGE
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_URL
#undef PACKAGE_VERSION
/* This file is left empty for building on Windows. */

View File

@@ -40,7 +40,7 @@
#define MODSEC_VERSION_MINOR "7"
#define MODSEC_VERSION_MAINT "0"
#define MODSEC_VERSION_TYPE "-rc"
#define MODSEC_VERSION_RELEASE "2"
#define MODSEC_VERSION_RELEASE "3"
#define MODSEC_VERSION_SUFFIX MODSEC_VERSION_TYPE MODSEC_VERSION_RELEASE
@@ -49,7 +49,19 @@
MODSEC_VERSION_SUFFIX
/* Apache Module Defines */
#ifdef VERSION_IIS
#define MODSEC_MODULE_NAME "ModSecurity for IIS"
#else
#ifdef VERSION_NGINX
#define MODSEC_MODULE_NAME "ModSecurity for nginx"
#else
#ifdef VERSION_STANDALONE
#define MODSEC_MODULE_NAME "ModSecurity Standalone"
#else
#define MODSEC_MODULE_NAME "ModSecurity for Apache"
#endif
#endif
#endif
#define MODSEC_MODULE_VERSION MODSEC_VERSION
#define MODSEC_MODULE_NAME_FULL MODSEC_MODULE_NAME "/" MODSEC_MODULE_VERSION " (http://www.modsecurity.org/)"

View File

@@ -364,8 +364,8 @@ apr_status_t modsecurity_request_body_store(modsec_rec *msr,
*error_msg = apr_psprintf(msr->mp, "Request body no files data length is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_no_files_limit);
if (msr->txcfg->debuglog_level >= 4) {
msr_log(msr, 4, "%s", *error_msg);
if (msr->txcfg->debuglog_level >= 1) {
msr_log(msr, 1, "%s", *error_msg);
}
if ((msr->txcfg->is_enabled == MODSEC_ENABLED) && (msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_REJECT)) {

View File

@@ -74,6 +74,233 @@ static unsigned char *c2x(unsigned what, unsigned char *where);
static unsigned char x2c(unsigned char *what);
static unsigned char xsingle2c(unsigned char *what);
/** \brief Decode utf-8 to unicode format.
*
* \param mp Pointer to memory pool
* \param input Pointer to input data
* \param input_len Input data length
* \param changed Set if data is changed
*
* \retval rval On Success
*/
char *utf8_unicode_inplace_ex(apr_pool_t *mp, unsigned char *input, long int input_len, int *changed) {
int unicode_len = 0, length = 0;
unsigned int d = 0, count = 0;
unsigned char c, *utf;
char *rval, *data;
unsigned int i, len, j;
unsigned int bytes_left = input_len;
unsigned char *unicode = NULL;
*changed = 0;
len = input_len * 7 + 1;
data = rval = apr_palloc(mp, len);
if (rval == NULL) return NULL;
if (input == NULL) return NULL;
for(i = 0; i < bytes_left;) {
unicode_len = 0; d = 0;
utf = (unsigned char *)&input[i];
c = *utf;
/* If first byte begins with binary 0 it is single byte encoding */
if ((c & 0x80) == 0) {
/* single byte unicode (7 bit ASCII equivilent) has no validation */
count++;
if(count <= len)
*data++ = c;
}
/* If first byte begins with binary 110 it is two byte encoding*/
else if ((c & 0xE0) == 0xC0) {
/* check we have at least two bytes */
if (bytes_left < 2) unicode_len = UNICODE_ERROR_CHARACTERS_MISSING;
/* check second byte starts with binary 10 */
else if (((*(utf + 1)) & 0xC0) != 0x80) unicode_len = UNICODE_ERROR_INVALID_ENCODING;
else {
unicode_len = 2;
count+=6;
if(count <= len) {
/* compute character number */
d = ((c & 0x1F) << 6) | (*(utf + 1) & 0x3F);
*data++ = '%';
*data++ = 'u';
unicode = apr_psprintf(mp, "%x", d);
length = strlen(unicode);
switch(length) {
case 1:
*data++ = '0';
*data++ = '0';
*data++ = '0';
break;
case 2:
*data++ = '0';
*data++ = '0';
break;
case 3:
*data++ = '0';
break;
case 4:
case 5:
break;
}
for(j=0; j<length; j++) {
*data++ = unicode[j];
}
*changed = 1;
}
}
}
/* If first byte begins with binary 1110 it is three byte encoding */
else if ((c & 0xF0) == 0xE0) {
/* check we have at least three bytes */
if (bytes_left < 3) unicode_len = UNICODE_ERROR_CHARACTERS_MISSING;
/* check second byte starts with binary 10 */
else if (((*(utf + 1)) & 0xC0) != 0x80) unicode_len = UNICODE_ERROR_INVALID_ENCODING;
/* check third byte starts with binary 10 */
else if (((*(utf + 2)) & 0xC0) != 0x80) unicode_len = UNICODE_ERROR_INVALID_ENCODING;
else {
unicode_len = 3;
count+=6;
if(count <= len) {
/* compute character number */
d = ((c & 0x0F) << 12) | ((*(utf + 1) & 0x3F) << 6) | (*(utf + 2) & 0x3F);
*data++ = '%';
*data++ = 'u';
unicode = apr_psprintf(mp, "%x", d);
length = strlen(unicode);
switch(length) {
case 1:
*data++ = '0';
*data++ = '0';
*data++ = '0';
break;
case 2:
*data++ = '0';
*data++ = '0';
break;
case 3:
*data++ = '0';
break;
case 4:
case 5:
break;
}
for(j=0; j<length; j++) {
*data++ = unicode[j];
}
*changed = 1;
}
}
}
/* If first byte begins with binary 11110 it is four byte encoding */
else if ((c & 0xF8) == 0xF0) {
/* restrict characters to UTF-8 range (U+0000 - U+10FFFF)*/
if (c >= 0xF5) {
*data++ = c;
}
/* check we have at least four bytes */
if (bytes_left < 4) unicode_len = UNICODE_ERROR_CHARACTERS_MISSING;
/* check second byte starts with binary 10 */
else if (((*(utf + 1)) & 0xC0) != 0x80) unicode_len = UNICODE_ERROR_INVALID_ENCODING;
/* check third byte starts with binary 10 */
else if (((*(utf + 2)) & 0xC0) != 0x80) unicode_len = UNICODE_ERROR_INVALID_ENCODING;
/* check forth byte starts with binary 10 */
else if (((*(utf + 3)) & 0xC0) != 0x80) unicode_len = UNICODE_ERROR_INVALID_ENCODING;
else {
unicode_len = 4;
count+=7;
if(count <= len) {
/* compute character number */
d = ((c & 0x07) << 18) | ((*(utf + 1) & 0x3F) << 12) | ((*(utf + 2) & 0x3F) < 6) | (*(utf + 3) & 0x3F);
*data++ = '%';
*data++ = 'u';
unicode = apr_psprintf(mp, "%x", d);
length = strlen(unicode);
switch(length) {
case 1:
*data++ = '0';
*data++ = '0';
*data++ = '0';
break;
case 2:
*data++ = '0';
*data++ = '0';
break;
case 3:
*data++ = '0';
break;
case 4:
case 5:
break;
}
for(j=0; j<length; j++) {
*data++ = unicode[j];
}
*changed = 1;
}
}
}
/* any other first byte is invalid (RFC 3629) */
else {
count++;
if(count <= len)
*data++ = c;
}
/* invalid UTF-8 character number range (RFC 3629) */
if ((d >= 0xD800) && (d <= 0xDFFF)) {
count++;
if(count <= len)
*data++ = c;
}
/* check for overlong */
if ((unicode_len == 4) && (d < 0x010000)) {
/* four byte could be represented with less bytes */
count++;
if(count <= len)
*data++ = c;
}
else if ((unicode_len == 3) && (d < 0x0800)) {
/* three byte could be represented with less bytes */
count++;
if(count <= len)
*data++ = c;
}
else if ((unicode_len == 2) && (d < 0x80)) {
/* two byte could be represented with less bytes */
count++;
if(count <= len)
*data++ = c;
}
if(unicode_len > 0) {
i += unicode_len;
} else {
i++;
}
}
*data ='\0';
return rval;
}
/** \brief Validate IPv4 Netmask
*
* \param ip_strv6 Pointer to ipv6 address

View File

@@ -30,8 +30,23 @@
#ifdef WIN32
#include <ws2tcpip.h>
// This is a trick: for ModSecurity modules this will declare inet_pton,
// but for mymodule.cpp (IIS module) this will skip, because we include
// windows.h before including msc_util.h
// Without the trick we have redefinition conflict.
//
#if !(NTDDI_VERSION >= NTDDI_VISTA)
int DSOLOCAL inet_pton(int family, const char *src, void *dst);
#endif
#endif
#define UNICODE_ERROR_CHARACTERS_MISSING -1
#define UNICODE_ERROR_INVALID_ENCODING -2
#define UNICODE_ERROR_OVERLONG_CHARACTER -3
#define UNICODE_ERROR_RESTRICTED_CHARACTER -4
#define UNICODE_ERROR_DECODING_ERROR -5
char DSOLOCAL *utf8_unicode_inplace_ex(apr_pool_t *mp, unsigned char *input, long int input_len, int *changed);
char DSOLOCAL *m_strcasestr(const char *haystack, const char *needle);

View File

@@ -1209,7 +1209,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
p2 = apr_strtok(NULL,";",&savedptr);
if (msr->txcfg->debuglog_level >= 4) {
msr_log(msr, 4, "Ctl: ruleUpdateTargetById id=%s targets=%s", p1, p2);
msr_log(msr, 4, "Ctl: ruleRemoveTargetById id=%s targets=%s", p1, p2);
}
re = apr_pcalloc(msr->mp, sizeof(rule_exception));
re->type = RULE_EXCEPTION_REMOVE_ID;
@@ -1251,7 +1251,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
p2 = apr_strtok(NULL,";",&savedptr);
if (msr->txcfg->debuglog_level >= 4) {
msr_log(msr, 4, "Ctl: ruleUpdateTargetByMsg msg=%s targets=%s", p1, p2);
msr_log(msr, 4, "Ctl: ruleRemoveTargetByMsg msg=%s targets=%s", p1, p2);
}
re = apr_pcalloc(msr->mp, sizeof(rule_exception));

View File

@@ -4024,12 +4024,6 @@ static int msre_op_validateUrlEncoding_execute(modsec_rec *msr, msre_rule *rule,
/* validateUtf8Encoding */
#define UNICODE_ERROR_CHARACTERS_MISSING -1
#define UNICODE_ERROR_INVALID_ENCODING -2
#define UNICODE_ERROR_OVERLONG_CHARACTER -3
#define UNICODE_ERROR_RESTRICTED_CHARACTER -4
#define UNICODE_ERROR_DECODING_ERROR -5
/* NOTE: This is over-commented for ease of verification */
static int detect_utf8_character(const unsigned char *p_read, unsigned int length) {
int unicode_len = 0;

View File

@@ -495,6 +495,18 @@ static int msre_fn_urlDecodeUni_execute(apr_pool_t *mptmp, unsigned char *input,
return changed;
}
static int msre_fn_utf8Unicode_execute(apr_pool_t *mptmp, unsigned char *input,
long int input_len, char **rval, long int *rval_len)
{
int changed = 0;
*rval = (char *)utf8_unicode_inplace_ex(mptmp, input, input_len, &changed);
*rval_len = strlen(*rval);
return changed;
}
/* urlEncode */
static int msre_fn_urlEncode_execute(apr_pool_t *mptmp, unsigned char *input,
@@ -1018,6 +1030,12 @@ void msre_engine_register_default_tfns(msre_engine *engine) {
msre_fn_urlDecodeUni_execute
);
/* Utf8Unicode */
msre_engine_tfn_register(engine,
"Utf8toUnicode",
msre_fn_utf8Unicode_execute
);
/* urlEncode */
msre_engine_tfn_register(engine,
"urlEncode",

View File

@@ -52,12 +52,23 @@ if test -n "${libxml2_path}"; then
LIBXML2_CONFIG="${libxml2_path}/${LIBXML2_CONFIG}"
fi
AC_MSG_RESULT([${LIBXML2_CONFIG}])
LIBXML2_VERSION="`${LIBXML2_CONFIG} --version`"
LIBXML2_VERSION=`${LIBXML2_CONFIG} --version | sed 's/^[[^0-9]][[^[:space:]]][[^[:space:]]]*[[[:space:]]]*//'`
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml VERSION: $LIBXML2_VERSION); fi
LIBXML2_CFLAGS="`${LIBXML2_CONFIG} --cflags`"
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml CFLAGS: $LIBXML2_CFLAGS); fi
LIBXML2_LDADD="`${LIBXML2_CONFIG} --libs`"
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml LDADD: $LIBXML2_LDADD); fi
AC_MSG_CHECKING([if libxml2 is at least v2.6.29])
libxml2_min_ver=`echo 2.6.29 | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
libxml2_ver=`echo ${LIBXML2_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
if test "$libxml2_ver" -ge "$libxml2_min_ver"; then
AC_MSG_RESULT([yes, $LIBXML2_VERSION])
else
AC_MSG_RESULT([no, $LIBXML2_VERSION])
AC_MSG_ERROR([NOTE: libxml2 library must be at least 2.6.29])
fi
else
AC_MSG_RESULT([no])
fi
@@ -75,5 +86,5 @@ if test -z "${LIBXML2_VERSION}"; then
else
AC_MSG_NOTICE([using libxml2 v${LIBXML2_VERSION}])
ifelse([$1], , , $1)
fi
fi
])

View File

@@ -162,6 +162,27 @@ if test "$build_apache2_module" -eq 1; then
TOPLEVEL_SUBDIRS="$TOPLEVEL_SUBDIRS apache2"
fi
# Standalone Module
AC_ARG_ENABLE(standalone-module,
AS_HELP_STRING([--enable-standalone-module],
[Enable building standalone module.]),
[
if test "$enableval" != "no"; then
build_standalone_module=1
else
build_standalone_module=0
fi
],
[
build_standalone_module=0
])
AM_CONDITIONAL([BUILD_STANDALONE_MODULE], [test "$build_standalone_module" -eq 1])
if test "$build_standalone_module" -eq 1; then
TOPLEVEL_SUBDIRS="$TOPLEVEL_SUBDIRS standalone"
fi
# Extensions
AC_ARG_ENABLE(extentions,
AS_HELP_STRING([--enable-extentions],
@@ -661,6 +682,9 @@ fi
if test "$build_apache2_module" -ne 0; then
AC_CONFIG_FILES([apache2/Makefile])
fi
if test "$build_standalone_module" -ne 0; then
AC_CONFIG_FILES([standalone/Makefile])
fi
if test "$build_extentions" -ne 0; then
AC_CONFIG_FILES([ext/Makefile])
fi

80
iis/Makefile.win Normal file
View File

@@ -0,0 +1,80 @@
###########################################################################
#
# Usage: NMAKE -f Makefile.win APACHE={httpd installion dir} PCRE={pcre dir} LIBXML2={LibXML2 dir} [ LUA={Lua dir} ]
#
!IF "$(APACHE)" == "" || "$(PCRE)" == "" || "$(LIBXML2)" == ""
!ERROR NMAKE arguments: APACHE=dir PCRE=dir LIBXML2=dir are required to build mod_security2 for Windows
!ENDIF
# Linking libraries
LIBS = $(APACHE)\lib\libapr-1.lib \
$(APACHE)\lib\libaprutil-1.lib \
$(PCRE)\pcre.lib \
$(LIBXML2)\win32\bin.msvc\libxml2.lib \
"kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" \
"oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "ws2_32.lib"
###########################################################################
###########################################################################
CC = CL
LINK = link.exe
MT = mt
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE -DAP_DECLARE_STATIC -D_MBCS -D$(VERSION)
DLL = ModSecurityIIS.dll
INCLUDES = -I. -I.. \
-I$(PCRE)\include -I$(PCRE) \
-I$(LIBXML2)\include \
-I$(APACHE)\include \
-I..\apache2 \
-I..\standalone
# Lua is optional
!IF "$(LUA)" != ""
LIBS = $(LIBS) $(LUA)\lua5.1.lib
DEFS=$(DEFS) -DWITH_LUA
INCLUDES = $(INCLUDES) -I$(LUA)\include -I$(LUA) \
!ENDIF
CFLAGS= -MD /Zi $(INCLUDES) $(DEFS)
LDFLAGS = /DEF:"mymodule.def" /DEBUG /OPT:REF /OPT:ICF /MANIFEST /ManifestFile:"ModSecurityIIS.dll.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:1 /DYNAMICBASE /NXCOMPAT
OBJS1 = mod_security2.obj apache2_config.obj apache2_io.obj apache2_util.obj \
re.obj re_operators.obj re_actions.obj re_tfns.obj re_variables.obj \
msc_logging.obj msc_xml.obj msc_multipart.obj modsecurity.obj \
msc_parsers.obj msc_util.obj msc_pcre.obj persist_dbm.obj \
msc_reqbody.obj msc_geo.obj msc_gsb.obj msc_unicode.obj acmp.obj msc_lua.obj \
msc_release.obj msc_crypt.obj msc_tree.obj
OBJS2 = api.obj buckets.obj config.obj filters.obj hooks.obj regex.obj server.obj
OBJS3 = main.obj moduleconfig.obj mymodule.obj
all: $(DLL)
dll: $(DLL)
..\apache2\mod_security2_config.h: ..\apache2\mod_security2_config.hw
@type ..\apache2\mod_security2_config.hw > ..\apache2\modsecurity_config.h
$(OBJS1): ..\apache2\$*.c
$(CC) $(CFLAGS) -c ..\apache2\$*.c -Fo$@
$(OBJS2): ..\standalone\$*.c
$(CC) $(CFLAGS) -c ..\standalone\$*.c -Fo$@
.cpp.obj:
$(CC) $(CFLAGS) -c $< -Fo$@
$(DLL): ..\apache2\mod_security2_config.h $(OBJS1) $(OBJS2) $(OBJS3)
$(LINK) $(LDFLAGS) $(OBJS1) $(OBJS2) $(OBJS3) $(LIBS)
IF EXIST $(DLL).manifest $(MT) -manifest $(DLL).manifest -outputresource:$(DLL);#1
clean:
del /f *.obj
del /f *.dll
del /f *.exp
del /f *.lib

13
iis/ModSecurity.xml Normal file
View File

@@ -0,0 +1,13 @@
<!--
ModSecurity configuration schema.
-->
<configSchema>
<sectionSchema name="system.webServer/ModSecurity">
<attribute name="enabled" type="bool" defaultValue="false"/>
<attribute name="configFile" type="string" defaultValue="c:\inetpub\modsecurity.conf" validationType="nonEmptyString" />
</sectionSchema>
</configSchema>

37
iis/ModSecurityIIS.sln Normal file
View File

@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModSecurityIIS", "ModSecurityIIS.vcxproj", "{D1F7201F-064B-48AB-868C-FED22464841C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Mixed Platforms.Build.0 = Debug|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Win32.ActiveCfg = Debug|Win32
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Win32.Build.0 = Debug|Win32
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|x64.ActiveCfg = Debug|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|x64.Build.0 = Debug|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|x86.ActiveCfg = Debug|Win32
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Mixed Platforms.ActiveCfg = Release|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Mixed Platforms.Build.0 = Release|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Win32.ActiveCfg = Release|Win32
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Win32.Build.0 = Release|Win32
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x64.ActiveCfg = Release|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x64.Build.0 = Release|x64
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x86.ActiveCfg = Release|Win32
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

233
iis/ModSecurityIIS.vcxproj Normal file
View File

@@ -0,0 +1,233 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D1F7201F-064B-48AB-868C-FED22464841C}</ProjectGuid>
<RootNamespace>ModSecurityIIS</RootNamespace>
<ProjectName>ModSecurityIIS</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.dll</TargetExt>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.dll</TargetExt>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.dll</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC;VERSION_IIS</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);C:\apache22\lib\libapr-1.lib;C:\apache22\lib\libaprutil-1.lib;C:\work\pcre-8.30\pcre.lib;C:\work\libxml2-2.7.7\win32\bin.msvc\libxml2.lib</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone;c:\work\apache24\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC;VERSION_IIS</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);C:\apache22\lib\libapr-1.lib;C:\apache22\lib\libaprutil-1.lib;C:\work\pcre-8.30\pcre.lib;C:\work\libxml2-2.7.7\win32\bin.msvc\libxml2.lib</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\apache2\acmp.c" />
<ClCompile Include="..\apache2\apache2_config.c" />
<ClCompile Include="..\apache2\apache2_io.c" />
<ClCompile Include="..\apache2\apache2_util.c" />
<ClCompile Include="..\apache2\modsecurity.c" />
<ClCompile Include="..\apache2\mod_security2.c" />
<ClCompile Include="..\apache2\msc_crypt.c" />
<ClCompile Include="..\apache2\msc_geo.c" />
<ClCompile Include="..\apache2\msc_gsb.c" />
<ClCompile Include="..\apache2\msc_logging.c" />
<ClCompile Include="..\apache2\msc_lua.c" />
<ClCompile Include="..\apache2\msc_multipart.c" />
<ClCompile Include="..\apache2\msc_parsers.c" />
<ClCompile Include="..\apache2\msc_pcre.c" />
<ClCompile Include="..\apache2\msc_release.c" />
<ClCompile Include="..\apache2\msc_reqbody.c" />
<ClCompile Include="..\apache2\msc_tree.c" />
<ClCompile Include="..\apache2\msc_unicode.c" />
<ClCompile Include="..\apache2\msc_util.c" />
<ClCompile Include="..\apache2\msc_xml.c" />
<ClCompile Include="..\apache2\persist_dbm.c" />
<ClCompile Include="..\apache2\re.c" />
<ClCompile Include="..\apache2\re_actions.c" />
<ClCompile Include="..\apache2\re_operators.c" />
<ClCompile Include="..\apache2\re_tfns.c" />
<ClCompile Include="..\apache2\re_variables.c" />
<ClCompile Include="..\standalone\api.c" />
<ClCompile Include="..\standalone\buckets.c" />
<ClCompile Include="..\standalone\config.c" />
<ClCompile Include="..\standalone\filters.c" />
<ClCompile Include="..\standalone\hooks.c" />
<ClCompile Include="..\standalone\regex.c" />
<ClCompile Include="..\standalone\server.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="moduleconfig.cpp" />
<ClCompile Include="mymodule.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="ModSecurity.xml">
<SubType>Designer</SubType>
</None>
<None Include="mymodule.def" />
<None Include="readme.htm">
<DeploymentContent>true</DeploymentContent>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\apache2\acmp.h" />
<ClInclude Include="..\apache2\apache2.h" />
<ClInclude Include="..\apache2\modsecurity.h" />
<ClInclude Include="..\apache2\modsecurity_config.h" />
<ClInclude Include="..\apache2\modsecurity_config_auto.h" />
<ClInclude Include="..\apache2\msc_crypt.h" />
<ClInclude Include="..\apache2\msc_geo.h" />
<ClInclude Include="..\apache2\msc_gsb.h" />
<ClInclude Include="..\apache2\msc_logging.h" />
<ClInclude Include="..\apache2\msc_lua.h" />
<ClInclude Include="..\apache2\msc_multipart.h" />
<ClInclude Include="..\apache2\msc_parsers.h" />
<ClInclude Include="..\apache2\msc_pcre.h" />
<ClInclude Include="..\apache2\msc_release.h" />
<ClInclude Include="..\apache2\msc_tree.h" />
<ClInclude Include="..\apache2\msc_unicode.h" />
<ClInclude Include="..\apache2\msc_util.h" />
<ClInclude Include="..\apache2\msc_xml.h" />
<ClInclude Include="..\apache2\persist_dbm.h" />
<ClInclude Include="..\apache2\re.h" />
<ClInclude Include="..\apache2\utf8tables.h" />
<ClInclude Include="..\standalone\api.h" />
<ClInclude Include="moduleconfig.h" />
<ClInclude Include="mymodule.h" />
<ClInclude Include="mymodulefactory.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,191 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="moduleconfig.cpp" />
<ClCompile Include="mymodule.cpp" />
<ClCompile Include="..\apache2\acmp.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\apache2_config.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\apache2_io.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\apache2_util.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\mod_security2.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\modsecurity.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_geo.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_gsb.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_logging.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_lua.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_multipart.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_parsers.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_pcre.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_release.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_reqbody.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_unicode.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_util.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_xml.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\persist_dbm.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_actions.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_operators.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_tfns.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_variables.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\standalone\api.c">
<Filter>Standalone</Filter>
</ClCompile>
<ClCompile Include="..\standalone\buckets.c">
<Filter>Standalone</Filter>
</ClCompile>
<ClCompile Include="..\standalone\config.c">
<Filter>Standalone</Filter>
</ClCompile>
<ClCompile Include="..\standalone\filters.c">
<Filter>Standalone</Filter>
</ClCompile>
<ClCompile Include="..\standalone\hooks.c">
<Filter>Standalone</Filter>
</ClCompile>
<ClCompile Include="main.cpp" />
<ClCompile Include="..\standalone\regex.c">
<Filter>Standalone</Filter>
</ClCompile>
<ClCompile Include="..\standalone\server.c">
<Filter>Standalone</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_crypt.c">
<Filter>ModSecurity</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_tree.c">
<Filter>ModSecurity</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="moduleconfig.h" />
<ClInclude Include="mymodule.h" />
<ClInclude Include="mymodulefactory.h" />
<ClInclude Include="..\apache2\acmp.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\modsecurity.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\modsecurity_config.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\modsecurity_config_auto.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_geo.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_gsb.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_logging.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_lua.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_multipart.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_parsers.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_pcre.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_release.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_unicode.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_util.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_xml.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\persist_dbm.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\re.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\utf8tables.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\apache2.h">
<Filter>Standalone</Filter>
</ClInclude>
<ClInclude Include="..\standalone\api.h">
<Filter>Standalone</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_crypt.h">
<Filter>ModSecurity</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_tree.h">
<Filter>ModSecurity</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="ModSecurity.xml" />
<None Include="mymodule.def" />
<None Include="readme.htm" />
</ItemGroup>
<ItemGroup>
<Filter Include="ModSecurity">
<UniqueIdentifier>{ba9b4453-b351-4739-9f9d-3d56d6b27bbc}</UniqueIdentifier>
</Filter>
<Filter Include="Standalone">
<UniqueIdentifier>{ba6117ea-f101-4d23-85f2-d1af0235e22a}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,39 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "ModSecurityIIS", "ModSecurityIIS\ModSecurityIIS.vdproj", "{3352AEF1-9F2A-47CD-9F63-658553063040}"
ProjectSection(ProjectDependencies) = postProject
{023E10BD-4FF6-4401-9A40-AED9717073F2} = {023E10BD-4FF6-4401-9A40-AED9717073F2}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "configure", "ModSecurityIIS\installer project\configure.csproj", "{023E10BD-4FF6-4401-9A40-AED9717073F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x64.ActiveCfg = Debug
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x64.Build.0 = Debug
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x86.ActiveCfg = Debug
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x86.Build.0 = Debug
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x64.ActiveCfg = Release
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x64.Build.0 = Release
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x86.ActiveCfg = Release
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x86.Build.0 = Release
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.ActiveCfg = Debug|x64
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.Build.0 = Debug|x64
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.ActiveCfg = Debug|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.Build.0 = Debug|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.ActiveCfg = Release|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.Build.0 = Release|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.ActiveCfg = Release|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,245 @@
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f410\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
{\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0
\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{
\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
\sbasedon0 \snext15 \ssemihidden \sunhideused \styrsid3168183 Normal (Web);}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \ul\cf2 \sbasedon10 \ssemihidden \sunhideused \styrsid3168183 Hyperlink;}{\*\cs17 \additive \rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b
\sbasedon10 \sqformat \spriority22 \styrsid3168183 Strong;}}{\*\listtable{\list\listtemplateid235441858{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}
\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2160
\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\jclisttab\tx2880\lin2880 }
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc0
\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0
\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0
\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid625282538}}{\*\listoverridetable{\listoverride\listid625282538\listoverridecount0\ls1}}{\*\pgptbl
{\pgp\ipgp2\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp4\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp3\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid1197496\rsid3168183\rsid6967166\rsid9512544\rsid12742482\rsid16593896}{\mmathPr\mmathFont34\mbrkBin0
\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Suha Can}{\operator Greg}{\creatim\yr2012\mo6\dy4\hr11\min43}{\revtim\yr2012\mo7\dy9\min41}{\version3}{\edmins2}{\nofpages4}{\nofwords1368}
{\nofchars7798}{\*\company Microsoft Corporation}{\nofcharsws9148}{\vern49273}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
\asianbrkrule\rsidroot9512544\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
\pard\plain \ltrpar\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3168183 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 Apache License\line \line Version 2.0, January 2004\line \line }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183
HYPERLINK "http://www.apache.org/licenses/" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \cs16\ul\cf2\lang9\langfe1033\langnp9\insrsid3168183 http://www.apache.org/licenses/}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1
\af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183
\par TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart definitions}1. Definitions}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend definitions}.
\par "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
\par "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
\par "
Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause
the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
\par "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
\par "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
\par "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
\par "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
\par "Derivative Works" shall mean any work, whether in Source or Object form, that is based on
(or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that rema
in separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
\par "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitt
e
d" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed
by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
\par "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart copyright}2. Grant of Copyright License}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend copyright}
. Subject to the terms and conditions of this License, each Contributor here
by grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in
Source or Object form.
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart patent}3. Grant of Patent License}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend patent}
. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) pate
nt license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by com
b
ination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated
within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart redistribution}4. Redistribution}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend redistribution}
. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \ltrpar\s15\ql \fi-360\li720\ri0\sb100\sa100\sbauto1\saauto1\widctlpar
\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin720\itap0\pararsid3168183 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 You must give any other recipients of the Work or D
erivative Works a copy of this License; and
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 2.\tab}You must cause any modified files to carry prominent notices stating that You changed the files; and
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 3.\tab}You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, tradema
rk, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 4.\tab}If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You dis
tribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distribu
t
ed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the
NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additiona
l
attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modificat
ions, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
\par }\pard \ltrpar\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3168183 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183
{\*\bkmkstart contributions}5. Submission of Contributions}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend contributions}. Unless You explicitly state otherwise, any Contri
bution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the te
rms of any separate license agreement you may have executed with Licensor regarding such Contributions.
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart trademarks}6. Trademarks}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend trademarks}
. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as requ
ired for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart no-warranty}7. Disclaimer of Warranty}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend no-warranty}
. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributo
r provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULA
R PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart no-liability}8. Limitation of Liability}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend no-liability}
. In no event and under no legal th
eory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indi
r
ect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfuncti
on, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart additional}9. Accepting Warranty or Additional Liability}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend additional}
. While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibilit
y
, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additiona
l liability.
\par END OF TERMS AND CONDITIONS
\par }\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af0
\ltrch\fcs0 \insrsid6967166
\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100da7e1364a9060000a41b0000160000007468656d652f7468656d652f
7468656d65312e786d6cec594d6f1b4518be23f11f467b6f6327761a4775aad8b11b48d346b15bd4e37877bc3bcdecce6a669cd437d41e9190100571a012370e
08a8d44a5ccaaf09144191fa1778676677bd13af49d24650417b68bcb3cffbfd31efcc5ebd763f66e890084979d2f6ea976b1e2289cf039a846deff6b07f69cd
4352e124c08c27a4ed4d89f4ae6dbcffde55bcae22121304f4895cc76d2f522a5d5f5a923e2c637999a7248177632e62ace051844b81c047c037664bcbb5daea
528c69e2a104c7c0f6d6784c7d82869aa5b79133ef31784c94d40b3e1303cd9a3814061b1cd435424e659709748859db0339013f1a92fbca430c4b052fda5ead
d6efd76aded2c6d525bc9e1131b580d6a1abc1bf8c2e23080e968d4c118e0aa1f57ea37565abe06f004ccde37abd5eb7572ff81900f67db0d4ea52e6d9e8afd5
3b39cf12c8fe9ce7ddad356b0d175fe2bf32a773abd3e9345b992e96a901d99f8d39fc5a6db5b1b9ece00dc8e29b73f84667b3db5d75f00664f1ab73f8fe95d6
6ac3c51b50c468723087d671e9f733ee0564ccd976257c0de06b79206728c88622bbb488314fd4a25c8bf13d2efa00d04086154d909aa6648c7dc8e22e8e4782
62ad0f5e27b8f4c62ef9726e49cb42d21734556defc3144345ccf8bd7afefdabe74fd1f18367c70f7e3a7ef8f0f8c18f969143b58d93b04cf5f2dbcffe7cfc31
fae3e9372f1f7d518d9765fcaf3f7cf2cbcf9f5703a17c66eabcf8f2c96fcf9ebcf8ead3dfbf7b5401df147854860f694c24ba498ed03e8fc130e31557733212
e7a31846989629369350e2046b2915fc7b2a72d037a79865d171f4e810d7837704b48f2ae0f5c93d47e14124268a5648de896207b8cb39eb7051e9851d2dabe4
e6e12409ab858b4919b78ff16195ec2e4e9cf8f62629f4cd3c2d1dc3bb1171d4dc6338513824095148bfe307845458779752c7afbbd4175cf2b1427729ea605a
e992211d39d93423daa631c4655a6533c4dbf1cdee1dd4e1accaea2d72e822a12a30ab507e4898e3c6eb78a2705cc57288635676f80daca22a250753e197713d
a920d221611cf502226515cd2d01f69682be83a16355867d974d631729143da8e27903735e466ef1836e84e3b40a3ba04954c67e200f204531dae3aa0abecbdd
0ad1cf10079c2c0cf71d4a9c709fde0d6ed3d051699620facd4454c4f23ae14efe0ea66c8c896935d0d49d5e1dd3e4ef1a37a3d0b9ad848b6bdcd02a5f7cfdb8
42efb7b5656fc2ee555533db271af522dcc9f6dce522a06f7f77dec293648f4041cc6f51ef9af3bbe6ecfde79bf3a27abef8963cebc2d0a0f52c62076d3376c7
0ba7ee31656ca0a68cdc9066f096b0f7047d58d474e6c4498a53581ac14f5dc920c0c185021b1a24b8fa88aa6810e11486f6baa7998432631d4a9472098745b3
5cc95be361f057f6a8d9d48710db392456bb3cb0cb2b7a393f6b146c8c56a139d0e682563483b30a5bb9923105db5e47585d2b75666975a39a698a8eb4c264ed
627328079717a6c162e14d186a108c42e0e55538f36bd170d8c18c04daef364679584c142e324432c201c962a4ed9e8f51dd0429cf953943b41d3619f4c1f114
af95a4b534db379076962095c5351688cba3f72651ca33781625e076b21c59522e4e96a0a3b6d76a2e373de4e3b4ed8de19c0c3fe314a22ef51c895908974dbe
1236ed4f2d6653e5b368b672c3dc22a8c3d587f5fb9cc14e1f4885545b58463635ccab2c0558a22559fd979be0d68b32a0a21b9d4d8b953548867f4d0bf0a31b
5a321e135f95835d5ad1beb38f592be51345c4200a8ed0884dc43e86f0eb54057b022ae1bac37404fd007773dadbe695db9cb3a22bdf88199c5dc72c8d70d66e
7589e6956ce1a621153a98a7927a605ba5eec6b8f39b624afe824c29a7f1ffcc14bd9fc0edc34aa023e0c3d5b0c048574adbe342451cba501a51bf2f607030bd
03b205ee77e13524155c509bbf821ceabfb6e62c0f53d6708854fb344482c27ea42241c81eb425937da730ab677b9765c9324626a34aeacad4aa3d2287840d75
0f5cd57bbb87224875d34db236607027f3cf7dce2a6814ea21a75c6f4e272bf65e5b03fff4e4638b198c72fbb0196872ff172a16e3c16c57b5f4863cdf7bcb86
e817b331ab915705082b6d05adacec5f5385736eb5b663cd59bcdccc958328ce5b0c8bc54094c21d12d2ffc1fe4785cfecd70ebda10ef93ef456041f2f343348
1bc8ea4b76f040ba41dac5110c4e76d1269366655d9b8d4eda6bf9667dc1936e21f784b3b5666789f7399d5d0c67ae38a7162fd2d999871d5fdbb585ae86c89e
2c51581ae707191318f399acfc258b8fee41a0b7e09bc18429699209be53090c33f4c0d40114bf95684837fe020000ffff0300504b0304140006000800000021
000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484
f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e
89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5
001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de
0fbfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5
d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b79961683000000
8a0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000
2100da7e1364a9060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d0014000600
0800000021000dd1909fb60000001b0100002700000000000000000000000000b30900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ae0a00000000}
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000002079
0935a65dcd01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000105000000000000}}

View File

@@ -0,0 +1,13 @@
<!--
ModSecurity configuration schema.
-->
<configSchema>
<sectionSchema name="system.webServer/ModSecurity">
<attribute name="enabled" type="bool" defaultValue="false"/>
<attribute name="configFile" type="string" defaultValue="c:\inetpub\modsecurity.conf" validationType="nonEmptyString" />
</sectionSchema>
</configSchema>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@@ -0,0 +1,21 @@
Please note that installing ModSecurity for IIS requires IIS to be installed and enabled.
After installing ModSecurity for IIS, the module will be running in all websites by default. To remove from a website add to web.config:
<modules>
<remove name="ModSecurityIIS" />
</modules>
To configure module in a website add to web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<ModSecurity enabled="true" configFile="c:\inetpub\wwwroot\xss.conf" />
</system.webServer>
</configuration>
where configFile is standard ModSecurity config file.
Events from the module will show up in "Application" Windows log.

View File

@@ -0,0 +1,3 @@
Set WshShell = CreateObject("WScript.Shell")
WshShell.Exec("%windir%\system32\inetsrv\appcmd.exe install module /name:ModSecurityIIS /image:%windir%\system32\inetsrv\modsecurityiis.dll")

View File

@@ -0,0 +1,314 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;
using AppHostAdminLibrary;
using System.Runtime.InteropServices;
namespace configure
{
public class ModSecurityConfigurator
{
public void Install(string installDir)
{
if (installDir.EndsWith("\""))
{
installDir = installDir.Substring(0, installDir.Length - 1);
}
Console.WriteLine("Copying 32-bit binaries...");
string dstpath = Environment.ExpandEnvironmentVariables("%windir%\\SysWow64");
if (!Directory.Exists(dstpath))
dstpath = Environment.ExpandEnvironmentVariables("%windir%\\system32");
CopyBinaries(Path.Combine(installDir, "x86"), Path.Combine(dstpath, "inetsrv"));
dstpath = Environment.ExpandEnvironmentVariables("%windir%\\SysNative");
if (Directory.Exists(dstpath))
{
Console.WriteLine("Copying 64-bit binaries...");
CopyBinaries(Path.Combine(installDir, "amd64"), Path.Combine(dstpath, "inetsrv"));
}
string text = Path.Combine(installDir, "ModSecurity.xml");
string text2 = null;
IntPtr zero = IntPtr.Zero;
try
{
bool flag = false;
if (Wow64Redirection.IsWow64Process(new IntPtr(-1), out flag) && flag)
{
Wow64Redirection.Wow64DisableWow64FsRedirection(out zero);
}
if (!File.Exists(text))
{
throw new FileNotFoundException("The specified schema file does not exist", text);
}
Console.WriteLine("Installing schema file: " + text);
text2 = Path.Combine(Environment.ExpandEnvironmentVariables("%windir%\\system32\\inetsrv\\config\\schema\\"), Path.GetFileName(text));
if (!text2.Equals(text, StringComparison.InvariantCultureIgnoreCase))
{
File.Copy(text, text2, true);
Console.WriteLine("Installed schema file: " + text2);
}
else
{
Console.WriteLine("Schema file is already in the destination location.");
}
}
finally
{
if (IntPtr.Zero != zero)
{
Wow64Redirection.Wow64RevertWow64FsRedirection(zero);
}
}
SectionList configurationSections = GetConfigurationSections(text2);
RegisterConfigurationSections(configurationSections, false);
Console.WriteLine("Finished");
}
/* add specific cleanup logic here (basically mirror install)
* No need to clean Program Files or other aspects of install, just revert the things you manually modified in Install() */
public void Uninstall()
{
}
private SectionList GetConfigurationSections(string schemaPath)
{
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(schemaPath);
SectionList sectionList = new SectionList();
XmlElement documentElement = xmlDocument.DocumentElement;
foreach (XmlNode xmlNode in documentElement.ChildNodes)
{
if (xmlNode.LocalName.Equals("sectionSchema", StringComparison.InvariantCultureIgnoreCase))
{
sectionList.Add(new SectionDefinition(xmlNode.Attributes["name"].Value));
}
}
return sectionList;
}
private static SectionList GetConfigurationSections(string sectionGroupName, IAppHostSectionGroup sectionGroup)
{
SectionList sectionList = new SectionList();
string text = string.IsNullOrEmpty(sectionGroupName) ? sectionGroup.Name : (sectionGroupName + "/" + sectionGroup.Name);
for (uint num = 0u; num < sectionGroup.Count; num += 1u)
{
IAppHostSectionGroup sectionGroup2 = sectionGroup[num];
SectionList configurationSections = GetConfigurationSections(text, sectionGroup2);
sectionList.AddRange(configurationSections);
}
IAppHostSectionDefinitionCollection sections = sectionGroup.Sections;
for (uint num2 = 0u; num2 < sections.Count; num2 += 1u)
{
IAppHostSectionDefinition appHostSectionDefinition = sections[num2];
sectionList.Add(new SectionDefinition(string.IsNullOrEmpty(text) ? appHostSectionDefinition.Name : (text + "/" + appHostSectionDefinition.Name), (AllowDefinition)Enum.Parse(typeof(AllowDefinition), appHostSectionDefinition.AllowDefinition, true), (OverrideModeDefault)Enum.Parse(typeof(OverrideModeDefault), appHostSectionDefinition.OverrideModeDefault, true), appHostSectionDefinition.Type));
}
return sectionList;
}
private static bool RegisterConfigSection(IAppHostWritableAdminManager adminManager, SectionDefinition sectionDefinition, string sectionName, IAppHostSectionGroup sectionGroup, bool remove)
{
string text = null;
string sectionName2 = sectionName;
int num = sectionName.IndexOf('/');
if (num >= 0)
{
text = sectionName.Substring(0, num);
sectionName2 = sectionName.Substring(num + 1, sectionName.Length - num - 1);
}
if (text != null)
{
uint count = sectionGroup.Count;
for (uint num2 = 0u; num2 < count; num2 += 1u)
{
IAppHostSectionGroup appHostSectionGroup = sectionGroup[num2];
if (appHostSectionGroup.Name.Equals(text, StringComparison.InvariantCultureIgnoreCase))
{
return RegisterConfigSection(adminManager, sectionDefinition, sectionName2, appHostSectionGroup, remove);
}
}
if (remove)
{
return false;
}
IAppHostSectionGroup sectionGroup2 = sectionGroup.AddSectionGroup(text);
return RegisterConfigSection(adminManager, sectionDefinition, sectionName2, sectionGroup2, remove);
}
else
{
IAppHostSectionDefinitionCollection sections = sectionGroup.Sections;
bool flag = false;
uint count2 = sections.Count;
for (uint num3 = 0u; num3 < count2; num3 += 1u)
{
IAppHostSectionDefinition appHostSectionDefinition = sections[num3];
if (appHostSectionDefinition.Name.Equals(sectionName, StringComparison.InvariantCultureIgnoreCase))
{
flag = true;
break;
}
}
if (!flag)
{
if (remove)
{
return false;
}
IAppHostSectionDefinition appHostSectionDefinition2 = sections.AddSection(sectionName);
appHostSectionDefinition2.OverrideModeDefault = sectionDefinition.OverrideModeDefault.ToString();
appHostSectionDefinition2.AllowDefinition = sectionDefinition.AllowDefinition.ToString();
appHostSectionDefinition2.Type = sectionDefinition.Type;
return true;
}
else
{
if (remove)
{
try
{
IAppHostElement adminSection = adminManager.GetAdminSection(sectionName, "MACHINE/WEBROOT/APPHOST");
adminSection.Clear();
}
catch (Exception)
{
}
sections.DeleteSection(sectionName);
return true;
}
return false;
}
}
}
private void RegisterConfigurationSections(SectionList sectionList, bool remove)
{
IAppHostWritableAdminManager appHostWritableAdminManager = new AppHostWritableAdminManagerClass();
appHostWritableAdminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
IAppHostConfigManager configManager = appHostWritableAdminManager.ConfigManager;
IAppHostConfigFile configFile = configManager.GetConfigFile("MACHINE/WEBROOT/APPHOST");
IAppHostSectionGroup rootSectionGroup = configFile.RootSectionGroup;
foreach (SectionDefinition current in sectionList)
{
if (RegisterConfigSection(appHostWritableAdminManager, current, current.Name, rootSectionGroup, remove))
{
if (remove)
{
Console.WriteLine("Unregistered section: " + current.Name);
}
else
{
Console.WriteLine("Registered section: " + current.Name);
}
}
else
{
if (remove)
{
Console.WriteLine("Section not currently registered, ignoring: " + current.Name);
}
else
{
Console.WriteLine("Section already registered, ignoring: " + current.Name);
}
}
}
appHostWritableAdminManager.CommitChanges();
}
internal class Wow64Redirection
{
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
public static extern bool IsWow64Process(IntPtr hProcess, out bool isWow64);
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
public static extern bool Wow64DisableWow64FsRedirection(out IntPtr oldValue);
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
public static extern bool Wow64RevertWow64FsRedirection(IntPtr oldValue);
}
private void CopyBinaries(string srcpath, string dstpath)
{
string[] files = { "libapr-1.dll", "libapriconv-1.dll", "libaprutil-1.dll",
"libxml2.dll", "lua5.1.dll", "pcre.dll", "zlib1.dll", "ModSecurityIIS.dll" };
foreach (string s in files)
File.Copy(Path.Combine(srcpath, s), Path.Combine(dstpath, s), true);
}
public enum AllowDefinition
{
MachineOnly,
MachineToWebRoot,
MachineToApplication,
AppHostOnly,
Everywhere
}
public enum OverrideModeDefault
{
Allow,
Deny
}
public class SectionDefinition
{
public const AllowDefinition DefaultAllowDefinition = AllowDefinition.Everywhere;
public const OverrideModeDefault DefaultOverrideModeDefault = OverrideModeDefault.Allow;
private string name;
private AllowDefinition allowDefinition;
private OverrideModeDefault overrideModeDefault;
private string type;
public string Name
{
get
{
return this.name;
}
}
public AllowDefinition AllowDefinition
{
get
{
return this.allowDefinition;
}
}
public OverrideModeDefault OverrideModeDefault
{
get
{
return this.overrideModeDefault;
}
}
public string Type
{
get
{
return this.type;
}
set
{
this.type = value;
}
}
public SectionDefinition(string sectionName)
: this(sectionName, AllowDefinition.Everywhere, OverrideModeDefault.Allow, null)
{
}
public SectionDefinition(string sectionName, AllowDefinition allowDefinition, OverrideModeDefault overrideModeDefault, string type)
{
this.name = sectionName;
this.allowDefinition = allowDefinition;
this.overrideModeDefault = overrideModeDefault;
this.type = type;
}
}
internal class SectionList : List<SectionDefinition> {}
}
}

View File

@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModSecurityIIS Installer", "ModSecurityIIS Installer.csproj", "{023E10BD-4FF6-4401-9A40-AED9717073F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.ActiveCfg = Debug|x64
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.Build.0 = Debug|x64
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.ActiveCfg = Debug|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.Build.0 = Debug|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.ActiveCfg = Release|x64
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.Build.0 = Release|x64
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.ActiveCfg = Release|x86
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,26 @@
using System;
namespace configure
{
public class Program
{
static void Main(string[] args)
{
ModSecurityConfigurator configurator = new ModSecurityConfigurator();
if (args.Length > 0)
{
if (args[0].Equals("uninstall", StringComparison.InvariantCultureIgnoreCase))
configurator.Uninstall();
else
{
configurator.Install(args[0]);
}
}
else
{
Console.WriteLine("configure.exe <install dir> | uninstall");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("configure")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("configure")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("320c5ce4-6089-4bb4-a9d2-ea68f9894a88")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,70 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace configure.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("configure.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Bitmap ModSecurityLogo {
get {
object obj = ResourceManager.GetObject("ModSecurityLogo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ModSecurityLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ModSecurityLogo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace configure.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>

View File

@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{023E10BD-4FF6-4401-9A40-AED9717073F2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>configure</RootNamespace>
<AssemblyName>configure</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisLogFile>bin\Debug\ModSecurityIIS Installer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\ModSecurityIIS Installer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<StartupObject>configure.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ModSecurityConfigurator.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<COMReference Include="AppHostAdminLibrary">
<Guid>{598F9C7D-D2D7-4980-B234-F1E753CD9FD9}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\ModSecurityLogo.png" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,221 @@
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f49\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f50\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
{\f52\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f53\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f54\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f55\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
{\f56\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f57\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f49\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f50\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
{\f52\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f53\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f54\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f55\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
{\f56\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f57\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f410\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
{\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0
\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \sunhideused \spriority1 Default Paragraph Font;}{\*
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{
\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
\sbasedon0 \snext15 \ssemihidden \sunhideused \styrsid3168183 Normal (Web);}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \ul\cf2 \sbasedon10 \sunhideused \styrsid3168183 Hyperlink;}{\*\cs17 \additive \rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b
\sbasedon10 \sqformat \spriority22 \styrsid3168183 Strong;}}{\*\listtable{\list\listtemplateid235441858{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}
\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
\fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2160
\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\jclisttab\tx2880\lin2880 }
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc0
\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0
\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0
\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid625282538}{\list\listtemplateid232439776\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0
\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid-1715947050\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1
\levelspace0\levelindent0{\leveltext\leveltemplateid-465034936\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0
\levelindent0{\leveltext\leveltemplateid857778786\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0
{\leveltext\leveltemplateid601148814\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
\leveltemplateid1944200722\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
\leveltemplateid-132083520\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
\leveltemplateid-1230063730\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
\leveltemplateid1225817962\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
\leveltemplateid1897401684\'01\'95;}{\levelnumbers;}\f1\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid652101753}}{\*\listoverridetable{\listoverride\listid625282538\listoverridecount0\ls1}{\listoverride\listid652101753
\listoverridecount0\ls2}}{\*\pgptbl {\pgp\ipgp10\itap0\li720\ri0\sb0\sa240}{\pgp\ipgp10\itap0\li720\ri0\sb0\sa240}{\pgp\ipgp10\itap0\li720\ri0\sb0\sa240}{\pgp\ipgp10\itap0\li720\ri0\sb0\sa240}{\pgp\ipgp6\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp8\itap0\li0\ri0\sb0
\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp7\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp10\itap0\li720\ri0\sb0\sa240}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid1197496\rsid2315486\rsid3168183\rsid4593034\rsid6385683\rsid6967166\rsid9512544
\rsid10098429\rsid12742482\rsid13639667\rsid16350125\rsid16593896}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Suha Can}{\operator Greg}
{\creatim\yr2012\mo6\dy4\hr11\min43}{\revtim\yr2012\mo7\dy12\hr17\min47}{\version7}{\edmins6}{\nofpages1}{\nofwords134}{\nofchars767}{\*\company Microsoft Corporation}{\nofcharsws900}{\vern49273}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/w
ord/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
\asianbrkrule\rsidroot9512544\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
\pard\plain \ltrpar\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3168183 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid13639667 Thank you}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid4593034 for installing ModSecurity for IIS.}{\rtlch\fcs1 \af0 \ltrch\fcs0
\lang9\langfe1033\langnp9\insrsid3168183
\par }\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid16350125 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125 ModSecurity home page }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486 HYPERLINK "http://www.modsecurity.org"}{\rtlch\fcs1 \af0\afs24
\ltrch\fcs0 \f0\fs24\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5000000068007400740070003a002f002f007700770077002e006d006f006400730065006300750072006900740079002e006f00720067002f000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}
}{\fldrslt {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \cs16\f0\fs24\ul\cf2\insrsid6385683\charrsid16350125 http://www.modsecurity.org}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24
\ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125 HYPERLINK "http://engineering/" }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b4000000068007400740070003a002f002f0065006e00670069006e0065006500720069006e0067002f000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af0\afs24
\ltrch\fcs0 \cs16\f0\fs24\ul\cf2\insrsid6385683\charrsid16350125 /}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125
\par OWASP Core Rule Set for ModSecurity: }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125 HYPERLINK "https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project" }{\rtlch\fcs1
\af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90bba000000680074007400700073003a002f002f007700770077002e006f0077006100730070002e006f00720067002f0069006e006400650078002e007000680070002f00430061007400650067006f00720079003a00
4f0057004100530050005f004d006f006400530065006300750072006900740079005f0043006f00720065005f00520075006c0065005f005300650074005f00500072006f006a006500630074000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af0\afs24
\ltrch\fcs0 \cs16\f0\fs24\ul\cf2\insrsid6385683\charrsid16350125 https://}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486
HYPERLINK "https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project"}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90bba000000680074007400700073003a002f002f007700770077002e006f0077006100730070002e006f00720067002f0069006e006400650078002e007000680070002f00430061007400650067006f00720079003a00
4f0057004100530050005f004d006f006400530065006300750072006900740079005f0043006f00720065005f00520075006c0065005f005300650074005f00500072006f006a006500630074000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af0\afs24
\ltrch\fcs0 \cs16\f0\fs24\ul\cf2\insrsid6385683\charrsid16350125 www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0
\f0\fs24\insrsid6385683\charrsid16350125
\par }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\lang1045\langfe1033\langnp1045\insrsid6385683\charrsid16350125 MSRC blog }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\lang1045\langfe1033\langnp1045\insrsid6385683\charrsid16350125
HYPERLINK "http://blogs.technet.com/b/srd/" }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\lang1045\langfe1033\langnp1045\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5800000068007400740070003a002f002f0062006c006f00670073002e0074006500630068006e00650074002e0063006f006d002f0062002f007300720064002f000000795881f43b1d7f48af2c825dc48527630000
0000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \cs16\f0\fs24\ul\cf2\lang1045\langfe1033\langnp1045\insrsid6385683\charrsid16350125 http://blogs.technet.com/b/srd/}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {
\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\lang1045\langfe1033\langnp1045\insrsid6385683\charrsid16350125
\par }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125 Trustwave SpiderLabs blog: }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486 HYPERLINK "http://blog.spiderlabs.com/"}{\rtlch\fcs1
\af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5000000068007400740070003a002f002f0062006c006f0067002e007300700069006400650072006c006100620073002e0063006f006d002f000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}
}{\fldrslt {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \cs16\f0\fs24\ul\cf2\insrsid6385683\charrsid16350125 http://blog.spiderlabs.com}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24
\ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125 HYPERLINK "http://blog.spiderlabs.com/" }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5000000068007400740070003a002f002f0062006c006f0067002e007300700069006400650072006c006100620073002e0063006f006d002f000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}
}{\fldrslt {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \cs16\f0\fs24\ul\cf2\insrsid6385683\charrsid16350125 /}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125
\par Trustwave Commercial Rule Set for ModSecurity: }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid2315486 HYPERLINK "https://www.trustwave.com/modsecurity-rules-support.php"}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0
\f0\fs24\insrsid2315486\charrsid16350125 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b88000000680074007400700073003a002f002f007700770077002e007400720075007300740077006100760065002e0063006f006d002f006d006f006400730065006300750072006900740079002d00720075006c00
650073002d0073007500700070006f00720074002e007000680070000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \cs16\f0\fs24\ul\cf2\insrsid6385683\charrsid16350125
https://www.trustwave.com/modsecurity-rules-support.php}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6385683\charrsid16350125
\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid6967166
\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210030dd4329a8060000a41b0000160000007468656d652f7468656d652f
7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
e877f0034e16bafb0e258ebb4faf06b769e888340b103d331115bebc4eb813bf83291b63624a0d1475a756c734f9bbc2cd28546ecbe1e20a3794ca175f3fae90
fb6d2dd99bb07b55e5ccf68942bd0877b23c77b908e8db5f9db7f024d9239010f35bd4bbe2fcae387bfff9e2bc289f2fbe24cfaa301468dd8bd846dbb4ddf1c2
ae7b4c191ba8292337a469bc25ec3d411f06f53a73e224c5292c8de0516732307070a1c0660d125c7d44553488700a4d7bddd3444299910e254ab984c3a219ae
a4adf1d0f82b7bd46cea4388ad1c12ab5d1ed8e1153d9c9f350a3246aad01c6873462b9ac05999ad5cc988826eafc3acae853a33b7ba11cd1445875ba1b236b1
399483c90bd560b0b0263435085a21b0f22a9cf9356b38ec6046026d77eba3dc2dc60b17e92219e180643ed27acffba86e9c94c7ca9c225a0f1b0cfae0788ad5
4adc5a9aec1b703b8b93caec1a0bd8e5de7b132fe5113cf312503b998e2c2927274bd051db6b35979b1ef271daf6c6704e86c73805af4bdd476216c26593af84
0dfb5393d964f9cc9bad5c313709ea70f561ed3ea7b053075221d51696910d0d339585004b34272bff7213cc7a510a5454a3b349b1b206c1f0af490176745d4b
c663e2abb2b34b23da76f6352ba57ca2881844c1111ab189d8c7e07e1daaa04f40255c77988aa05fe06e4e5bdb4cb9c5394bbaf28d98c1d971ccd20867e556a7
689ec9166e0a522183792b8907ba55ca6e943bbf2a26e52f48957218ffcf54d1fb09dc3eac04da033e5c0d0b8c74a6b43d2e54c4a10aa511f5fb021a07533b20
5ae07e17a621a8e082dafc17e450ffb739676998b48643a4daa7211214f623150942f6a02c99e83b85583ddbbb2c4996113211551257a656ec1139246ca86be0
aadedb3d1441a89b6a929501833b197fee7b9641a3503739e57c732a59b1f7da1cf8a73b1f9bcca0945b874d4393dbbf10b1680f66bbaa5d6f96e77b6f59113d
316bb31a795600b3d256d0cad2fe354538e7566b2bd69cc6cbcd5c38f0e2bcc63058344429dc2121fd07f63f2a7c66bf76e80d75c8f7a1b622f878a18941d840
545fb28d07d205d20e8ea071b283369834296bdaac75d256cb37eb0bee740bbe278cad253b8bbfcf69eca23973d939b97891c6ce2cecd8da8e2d343578f6648a
c2d0383fc818c798cf64e52f597c740f1cbd05df0c264c49134cf09d4a60e8a107260f20f92d47b374e32f000000ffff0300504b030414000600080000002100
0dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f7
8277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89
d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd500
1996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0f
bfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6
a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a
0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021
0030dd4329a8060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d001400060008
00000021000dd1909fb60000001b0100002700000000000000000000000000b20900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ad0a00000000}
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000301c
57149160cd01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000105000000000000}}

View File

@@ -0,0 +1,3 @@
Set WshShell = CreateObject("WScript.Shell")
WshShell.Exec("%windir%\system32\inetsrv\appcmd.exe uninstall module ModSecurityIIS")

102
iis/main.cpp Normal file
View File

@@ -0,0 +1,102 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#define WIN32_LEAN_AND_MEAN
#undef inline
#define inline inline
// IIS7 Server API header file
#include "httpserv.h"
// Project header files
#include "mymodule.h"
#include "mymodulefactory.h"
// Global server instance
IHttpServer * g_pHttpServer = NULL;
// Global module context id
PVOID g_pModuleContext = NULL;
// The RegisterModule entrypoint implementation.
// This method is called by the server when the module DLL is
// loaded in order to create the module factory,
// and register for server events.
HRESULT
__stdcall
RegisterModule(
DWORD dwServerVersion,
IHttpModuleRegistrationInfo * pModuleInfo,
IHttpServer * pHttpServer
)
{
HRESULT hr = S_OK;
CMyHttpModuleFactory * pFactory = NULL;
//IHttpModuleRegistrationInfo2 * pModuleInfo2;
if ( pModuleInfo == NULL || pHttpServer == NULL )
{
hr = HRESULT_FROM_WIN32( ERROR_INVALID_PARAMETER );
goto Finished;
}
/*hr = HttpGetExtendedInterface( g_pGlobalInfo,
pModuleInfo,
&pModuleInfo2 );
if ( FAILED ( hr ) )
{
goto Finished;
}*/
// step 1: save the IHttpServer and the module context id for future use
//
g_pModuleContext = pModuleInfo->GetId();
g_pHttpServer = pHttpServer;
// step 2: create the module factory
//
pFactory = new CMyHttpModuleFactory();
if ( pFactory == NULL )
{
hr = HRESULT_FROM_WIN32( ERROR_NOT_ENOUGH_MEMORY );
goto Finished;
}
// step 3: register for server events
//
hr = pModuleInfo->SetRequestNotifications( pFactory, /* module factory */
RQ_BEGIN_REQUEST | RQ_SEND_RESPONSE /* server event mask */,
RQ_END_REQUEST /* server post event mask */);
if ( FAILED( hr ) )
{
goto Finished;
}
hr = pModuleInfo->SetPriorityForRequestNotification(RQ_BEGIN_REQUEST, PRIORITY_ALIAS_FIRST);
hr = pModuleInfo->SetPriorityForRequestNotification(RQ_SEND_RESPONSE, PRIORITY_ALIAS_LAST); // reverted!
//hr = pModuleInfo2->SetPriorityForPostRequestNotification(RQ_END_REQUEST, PRIORITY_ALIAS_LAST);
pFactory = NULL;
Finished:
/* if ( pFactory != NULL )
{
delete pFactory;
pFactory = NULL;
} */
return hr;
}

654
iis/moduleconfig.cpp Normal file
View File

@@ -0,0 +1,654 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#define WIN32_LEAN_AND_MEAN
#undef inline
#define inline inline
// IIS7 Server API header file
#include "httpserv.h"
// Project header files
#include "mymodule.h"
#include "mymodulefactory.h"
#include "moduleconfig.h"
HRESULT
MODSECURITY_STORED_CONTEXT::Initialize(
IHttpContext * pW3Context,
IAppHostConfigException ** ppException
)
{
HRESULT hr = S_OK;
IAppHostAdminManager *pAdminManager = NULL;
IAppHostElement *pSessionTrackingElement = NULL;
IAppHostPropertyException *pPropertyException = NULL;
PCWSTR pszConfigPath = pW3Context->GetMetadata()->GetMetaPath();
BSTR bstrUrlPath = SysAllocString( pszConfigPath );
pAdminManager = g_pHttpServer->GetAdminManager();
if ( ( FAILED( hr ) ) || ( pAdminManager == NULL ) )
{
hr = E_UNEXPECTED;
goto Failure;
}
// Get a handle to the section:
hr = pAdminManager->GetAdminSection(
MODSECURITY_SECTION,
bstrUrlPath,
&pSessionTrackingElement );
if ( FAILED( hr ) )
{
goto Failure;
}
if ( pSessionTrackingElement == NULL )
{
hr = E_UNEXPECTED;
goto Failure;
}
// Get the property object for the 'enabled' attribute:
hr = GetBooleanPropertyValue(
pSessionTrackingElement,
MODSECURITY_SECTION_ENABLED,
&pPropertyException,
&m_bIsEnabled);
if ( FAILED( hr ) )
{
goto Failure;
}
// If there is a config failure, we cannot continue execution:
if ( pPropertyException != NULL )
{
ppException = ( IAppHostConfigException** ) &pPropertyException;
goto Failure;
}
if ( m_bIsEnabled == FALSE )
{
// There is no point in reading any more of the config associated with the session
// tracking section, since this feature is not enabled for the current URL
goto Failure;
}
// Get the property object for the 'configfile' attribute:
hr = GetStringPropertyValue(
pSessionTrackingElement,
MODSECURITY_SECTION_CONFIGFILE,
&pPropertyException,
&m_pszPath);
if ( FAILED( hr ) )
{
goto Failure;
}
// If there is a config failure, we cannot continue execution:
if ( pPropertyException != NULL )
{
ppException = ( IAppHostConfigException** ) &pPropertyException;
goto Failure;
}
Failure:
SysFreeString( bstrUrlPath );
return hr;
}
HRESULT
MODSECURITY_STORED_CONTEXT::GetBooleanPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
BOOL* pBoolValue )
{
HRESULT hr = S_OK;
IAppHostProperty *pProperty = NULL;
VARIANT vPropertyValue;
if (
( pElement == NULL ) ||
( pszPropertyName == NULL ) ||
( pException == NULL ) ||
( pBoolValue == NULL )
)
{
hr = E_INVALIDARG;
goto Failure;
}
// Get the property object for the BOOLEAN attribute:
hr = pElement->GetPropertyByName(
pszPropertyName,
&pProperty );
if ( FAILED( hr ) )
{
goto Failure;
}
if ( pProperty == NULL )
{
hr = E_UNEXPECTED;
goto Failure;
}
// Get the attribute value:
VariantInit( &vPropertyValue );
hr = pProperty->get_Value( &vPropertyValue );
if ( FAILED( hr ) )
{
goto Failure;
}
// See it there is an exception that might be due to the actual value in the
// config not meeting validation criteria
*pException = NULL;
hr = pProperty->get_Exception( pException );
if ( FAILED( hr ) )
{
goto Failure;
}
// No need to continue if we got an exception...
if ( ( *pException ) != NULL )
{
goto Failure;
}
// Finally, get the value:
*pBoolValue = ( vPropertyValue.boolVal == VARIANT_TRUE ) ? TRUE : FALSE;
Failure:
VariantClear( &vPropertyValue );
if ( pProperty != NULL )
{
pProperty->Release();
pProperty = NULL;
}
return hr;
}
HRESULT
MODSECURITY_STORED_CONTEXT::GetDWORDPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
DWORD* pnValue )
{
HRESULT hr = S_OK;
IAppHostProperty *pProperty = NULL;
VARIANT vPropertyValue;
if (
( pElement == NULL ) ||
( pszPropertyName == NULL ) ||
( pException == NULL ) ||
( pnValue == NULL )
)
{
hr = E_INVALIDARG;
goto Failure;
}
// Get the property object for the INT attribute:
hr = pElement->GetPropertyByName(
pszPropertyName,
&pProperty );
if ( FAILED( hr ) )
{
goto Failure;
}
if ( pProperty == NULL )
{
hr = E_UNEXPECTED;
goto Failure;
}
// Get the attribute value:
VariantInit( &vPropertyValue );
hr = pProperty->get_Value( &vPropertyValue );
if ( FAILED( hr ) )
{
goto Failure;
}
// See it there is an exception that might be due to the actual value in the
// config not meeting validation criteria
*pException = NULL;
hr = pProperty->get_Exception( pException );
if ( FAILED( hr ) )
{
goto Failure;
}
// No need to continue if we got an exception...
if ( ( *pException ) != NULL )
{
goto Failure;
}
// Finally, get the value:
*pnValue = vPropertyValue.ulVal;
Failure:
VariantClear( &vPropertyValue );
if ( pProperty != NULL )
{
pProperty->Release();
pProperty = NULL;
}
return hr;
}
HRESULT
MODSECURITY_STORED_CONTEXT::GetTimeSpanPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
ULONGLONG* pnValue )
{
HRESULT hr = S_OK;
IAppHostProperty *pProperty = NULL;
VARIANT vPropertyValue;
if (
( pElement == NULL ) ||
( pszPropertyName == NULL ) ||
( pException == NULL ) ||
( pnValue == NULL )
)
{
hr = E_INVALIDARG;
goto Failure;
}
// Get the property object for the INT attribute:
hr = pElement->GetPropertyByName(
pszPropertyName,
&pProperty );
if ( FAILED( hr ) )
{
goto Failure;
}
if ( pProperty == NULL )
{
hr = E_UNEXPECTED;
goto Failure;
}
// Get the attribute value:
VariantInit( &vPropertyValue );
hr = pProperty->get_Value( &vPropertyValue );
if ( FAILED( hr ) )
{
goto Failure;
}
// See it there is an exception that might be due to the actual value in the
// config not meeting validation criteria
*pException = NULL;
hr = pProperty->get_Exception( pException );
if ( FAILED( hr ) )
{
goto Failure;
}
// No need to continue if we got an exception...
if ( ( *pException ) != NULL )
{
goto Failure;
}
// Finally, get the value:
*pnValue = vPropertyValue.ullVal;
Failure:
VariantClear( &vPropertyValue );
if ( pProperty != NULL )
{
pProperty->Release();
pProperty = NULL;
}
return hr;
}
HRESULT
MODSECURITY_STORED_CONTEXT::GetStringPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
WCHAR** ppszValue )
{
HRESULT hr = S_OK;
IAppHostProperty *pProperty = NULL;
DWORD dwLength;
VARIANT vPropertyValue;
if (
( pElement == NULL ) ||
( pszPropertyName == NULL ) ||
( pException == NULL ) ||
( ppszValue == NULL )
)
{
hr = E_INVALIDARG;
goto Failure;
}
*ppszValue = NULL;
// Get the property object for the string attribute:
hr = pElement->GetPropertyByName(
pszPropertyName,
&pProperty );
if ( FAILED( hr ) )
{
goto Failure;
}
if ( pProperty == NULL )
{
hr = E_UNEXPECTED;
goto Failure;
}
// Get the attribute value:
VariantInit( &vPropertyValue );
hr = pProperty->get_Value( &vPropertyValue );
if ( FAILED( hr ) )
{
goto Failure;
}
// See it there is an exception that might be due to the actual value in the
// config not meeting validation criteria
*pException = NULL;
hr = pProperty->get_Exception( pException );
if ( FAILED( hr ) )
{
goto Failure;
}
// No need to continue if we got an exception...
if ( ( *pException ) != NULL )
{
goto Failure;
}
// Finally, get the value:
dwLength = SysStringLen( vPropertyValue.bstrVal );
*ppszValue = new WCHAR[ dwLength + 1 ];
if ( (*ppszValue) == NULL )
{
hr = E_OUTOFMEMORY;
goto Failure;
}
wcsncpy(
*ppszValue,
vPropertyValue.bstrVal,
dwLength );
(*ppszValue)[ dwLength ] = L'\0';
Failure:
VariantClear( &vPropertyValue );
if ( pProperty != NULL )
{
pProperty->Release();
pProperty = NULL;
}
return hr;
}
MODSECURITY_STORED_CONTEXT::~MODSECURITY_STORED_CONTEXT()
{
if ( m_pszPath != NULL )
{
delete [] m_pszPath;
m_pszPath = NULL;
}
}
MODSECURITY_STORED_CONTEXT::MODSECURITY_STORED_CONTEXT():
m_bIsEnabled ( FALSE ),
m_pszPath( NULL ),
m_Config( NULL ),
m_dwLastCheck( 0 )
{
m_LastChange.dwLowDateTime = 0;
m_LastChange.dwHighDateTime = 0;
}
DWORD
MODSECURITY_STORED_CONTEXT::GlobalWideCharToMultiByte(
WCHAR* pSource,
DWORD dwLengthSource,
CHAR** ppszDestination,
USHORT* pdwLengthDestination )
{
DWORD dwResult = NULL;
DWORD dwCount = 0;
if (
( pSource == NULL ) ||
( ppszDestination == NULL ) ||
( pdwLengthDestination == NULL )
)
{
dwResult = ERROR_INVALID_PARAMETER;
goto Exit;
}
// Initialize result length
*pdwLengthDestination = 0;
*ppszDestination = NULL;
dwCount = WideCharToMultiByte(
CP_ACP,
0,
pSource,
dwLengthSource + 1,
*ppszDestination,
0,
NULL,
NULL );
if ( 0 == dwCount )
{
dwResult = GetLastError ();
if ( dwResult == 0 )
{
dwResult = ERROR_INVALID_DATA;
}
goto Exit;
}
*ppszDestination = new CHAR[ dwCount + 1 ];
if ( NULL == ( *ppszDestination ) )
{
dwResult = ERROR_OUTOFMEMORY;
goto Exit;
}
// Make sure the memory is 'clean':
SecureZeroMemory(
( *ppszDestination ),
( dwCount + 1 ) * sizeof ( CHAR ) );
if (
0 == WideCharToMultiByte(
CP_ACP,
0,
pSource,
dwLengthSource + 1,
*ppszDestination,
dwCount,
NULL,
NULL )
)
{
dwResult = GetLastError();
goto Exit;
}
*pdwLengthDestination = ( USHORT )dwCount;
Exit:
if ( dwResult != 0 )
{
// Make sure we do the proper cleanup in the error case:
if ( pdwLengthDestination != NULL )
{
*pdwLengthDestination = 0;
}
if ( ppszDestination != NULL )
{
if ( ( *ppszDestination ) != NULL )
{
delete [] ( *ppszDestination );
( *ppszDestination ) = NULL;
}
}
}
return dwResult;
}
HRESULT
MODSECURITY_STORED_CONTEXT::GetConfig(
IHttpContext * pContext,
MODSECURITY_STORED_CONTEXT ** ppModuleConfig
)
{
HRESULT hr = S_OK;
MODSECURITY_STORED_CONTEXT * pModuleConfig = NULL;
IHttpModuleContextContainer * pMetadataContainer = NULL;
IAppHostConfigException * pException = NULL;
pMetadataContainer = pContext->GetMetadata()->GetModuleContextContainer();
if ( pMetadataContainer == NULL )
{
hr = E_UNEXPECTED;
return hr;
}
pModuleConfig = (MODSECURITY_STORED_CONTEXT *)pMetadataContainer->GetModuleContext( g_pModuleContext );
if ( pModuleConfig != NULL )
{
//
// We found stored data for this module for the metadata
// object which is different for unique configuration path
//
*ppModuleConfig = pModuleConfig;
return S_OK;
}
//
// If we reach here, that means this is first request or first
// request after a configuration change IIS core will throw stored context away
// if a change notification arrives for this metadata path
//
pModuleConfig = new MODSECURITY_STORED_CONTEXT();
if ( pModuleConfig == NULL )
{
return E_OUTOFMEMORY;
}
//
// Read module configuration data and store in MODSECURITY_STORED_CONTEXT
//
hr = pModuleConfig->Initialize( pContext, &pException );
if ( FAILED( hr ) || pException != NULL )
{
pModuleConfig->CleanupStoredContext();
pModuleConfig = NULL;
hr = E_UNEXPECTED;
return hr;
}
//
// Store MODSECURITY_STORED_CONTEXT data as metadata stored context
//
hr = pMetadataContainer->SetModuleContext( pModuleConfig,
g_pModuleContext );
if ( FAILED( hr ) )
{
pModuleConfig->CleanupStoredContext();
pModuleConfig = NULL;
//
// It is possible that some other thread stored context before this thread
// could do. Check returned hr and return context stored by other thread
//
if ( hr == HRESULT_FROM_WIN32( ERROR_ALREADY_ASSIGNED ) )
{
*ppModuleConfig = (MODSECURITY_STORED_CONTEXT *)pMetadataContainer->GetModuleContext( g_pModuleContext );
return S_OK;
}
}
*ppModuleConfig = pModuleConfig;
return hr;
}

105
iis/moduleconfig.h Normal file
View File

@@ -0,0 +1,105 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#pragma once
#define MODSECURITY_SECTION L"system.webServer/ModSecurity"
#define MODSECURITY_SECTION_ENABLED L"enabled"
#define MODSECURITY_SECTION_CONFIGFILE L"configFile"
extern IHttpServer * g_pHttpServer;
extern PVOID g_pModuleContext;
class MODSECURITY_STORED_CONTEXT : public IHttpStoredContext
{
public:
MODSECURITY_STORED_CONTEXT();
~MODSECURITY_STORED_CONTEXT();
static
HRESULT
GetConfig(
IHttpContext * pContext,
MODSECURITY_STORED_CONTEXT ** ppModuleConfig
);
// virtual
VOID
CleanupStoredContext(
VOID
)
{
delete this;
}
BOOL GetIsEnabled()
{
return m_bIsEnabled;
}
WCHAR* GetPath()
{
return m_pszPath;
}
HRESULT
Initialize(
IHttpContext * pW3Context,
IAppHostConfigException ** ppException
);
DWORD
GlobalWideCharToMultiByte(
WCHAR* pSource,
DWORD dwLengthSource,
CHAR** ppszDestination,
USHORT* pdwLengthDestination );
void* m_Config;
DWORD m_dwLastCheck;
FILETIME m_LastChange;
private:
HRESULT
GetBooleanPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
BOOL* pBoolValue );
HRESULT
GetDWORDPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
DWORD* pnValue );
HRESULT
GetTimeSpanPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
ULONGLONG* pnValue );
HRESULT
GetStringPropertyValue(
IAppHostElement* pElement,
WCHAR* pszPropertyName,
IAppHostPropertyException** pException,
WCHAR** ppszValue );
BOOL m_bIsEnabled;
WCHAR* m_pszPath;
};

1260
iis/mymodule.cpp Normal file

File diff suppressed because it is too large Load Diff

4
iis/mymodule.def Normal file
View File

@@ -0,0 +1,4 @@
LIBRARY "ModSecurityIIS"
EXPORTS
RegisterModule

56
iis/mymodule.h Normal file
View File

@@ -0,0 +1,56 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#ifndef __MY_MODULE_H__
#define __MY_MODULE_H__
// The module implementation.
// This class is responsible for implementing the
// module functionality for each of the server events
// that it registers for.
class CMyHttpModule : public CHttpModule
{
public:
HANDLE m_hEventLog;
DWORD m_dwPageSize;
REQUEST_NOTIFICATION_STATUS
OnBeginRequest(
IN IHttpContext * pHttpContext,
IN IHttpEventProvider * pProvider
);
REQUEST_NOTIFICATION_STATUS
OnSendResponse(
IN IHttpContext * pHttpContext,
IN ISendResponseProvider * pProvider
);
REQUEST_NOTIFICATION_STATUS
OnPostEndRequest(
IN IHttpContext * pHttpContext,
IN IHttpEventProvider * pProvider
);
HRESULT ReadFileChunk(HTTP_DATA_CHUNK *chunk, char *buf);
CMyHttpModule();
~CMyHttpModule();
void Dispose();
BOOL WriteEventViewerLog(LPCSTR szNotification, WORD category = EVENTLOG_INFORMATION_TYPE);
};
#endif

79
iis/mymodulefactory.h Normal file
View File

@@ -0,0 +1,79 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#ifndef __MODULE_FACTORY_H__
#define __MODULE_FACTORY_H__
// Factory class for CMyHttpModule.
// This class is responsible for creating instances
// of CMyHttpModule for each request.
class CMyHttpModuleFactory : public IHttpModuleFactory
{
CMyHttpModule * m_pModule;
public:
CMyHttpModuleFactory()
{
m_pModule = NULL;
}
virtual
HRESULT
GetHttpModule(
OUT CHttpModule **ppModule,
IN IModuleAllocator *
)
{
HRESULT hr = S_OK;
if ( ppModule == NULL )
{
hr = HRESULT_FROM_WIN32( ERROR_INVALID_PARAMETER );
goto Finished;
}
if(m_pModule == NULL)
{
m_pModule = new CMyHttpModule();
if ( m_pModule == NULL )
{
hr = HRESULT_FROM_WIN32( ERROR_NOT_ENOUGH_MEMORY );
goto Finished;
}
}
*ppModule = m_pModule;
Finished:
return hr;
}
virtual
void
Terminate()
{
if ( m_pModule != NULL )
{
//m_pModule->WriteEventViewerLog("Module terminated.");
delete m_pModule;
m_pModule = NULL;
}
delete this;
}
};
#endif

320
iis/readme.htm Normal file
View File

@@ -0,0 +1,320 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Creating a Native Module for IIS7</title>
</head>
<body>
<h1>
Creating a Native Module for IIS7</h1>
<p>
To extend the server, IIS7 provides a new (C++) native core server API, which replaces
ISAPI filter and extension API from previous IIS releases. The new API features
object-oriented development with an intuitive object model, provides more control
over request processing, and uses simpler design patterns to help you write robust
code. Please visit <a target="_new" href="http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=942">Developing a Native Module for IIS7</a> for more information about this sample.<br />
<br />
<strong>NOTE</strong>: The IIS7 native (C++) server API is declared in the Platform
SDK <strong>httpserv.h</strong> header file.&nbsp; <strong>You must obtain this SDK
and register it with Visual Studio in order to compile this module.</strong></p>
<p>
A native module is a Windows DLL that contains an the following:</p>
<ol>
<li><strong>RegisterModule</strong> exported function.&nbsp; This function is responsible
for creating a module factory, and registering the module for one or more server
events.<br />
<br />
<em>
This function is implemented in <strong>main.cpp</strong>.<br />
</em>
</li>
<li>Implementation of the module class inheriting from the <strong>CHttpModule</strong>
base class. &nbsp;This class is provides the main functionality of your module.
<br />
<br />
<em>
This class is declared in <strong>mymodule.h</strong>, with method implementations
in <strong>mymodule.cpp</strong>.<br />
</em>
</li>
<li>Implementation of the module factory class implementing the <strong>IHttpModuleFactory</strong>
interface.&nbsp; The class is responsible for creating instances of your module.<br />
<br />
<em>
This class is declared and implemented in <strong>mymodulefactory.h</strong>.</em></li></ol>
<h2>
0. Prerequisites</h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt">
<span style="font-family: Verdana"><span style="font-size: 9pt">In order to compile
the module, you will need to install the Windows Platform SDK that contains the
required IIS header files.&nbsp;
<br />
<br />
After installing the SDK</span></span><span style="font-size: 9pt; font-family: Verdana;
mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-ansi-language: EN-US;
mso-fareast-language: EN-US; mso-bidi-language: AR-SA">, you will need to register
the SDK with Visual Studio 2005.<span style="mso-spacerun: yes">&nbsp; </span>You
can do this via <b style="mso-bidi-font-weight: normal">Start &gt; Programs &gt; Microsoft
Windows SDK &gt; Visual Studio Registration &gt; Register Windows SDK Directories
with Visual Studio</b>.</span></p>
<h2>
1. Implement RegisterModule entrypoint</h2>
<p>
A native module must export the RegisterModule function.&nbsp; This function will
be invoked by the server when the module DLL is loaded, so that your DLL can register
for the required server events, and provide a mechanism for the server to create
instances of your module class.<br />
<br />
<span style="font-size: 10pt; font-family: Courier New">__stdcall
<br />
HRESULT RegisterModule( DWORD dwServerVersion, IHttpModuleRegistrationInfo
* pModuleInfo, IHttpServer * pHttpServer );<br />
</span>
<br />
<em>This function is implemented for you in the <strong>main.cpp</strong> source file.&nbsp;
</em>
<br />
<br />
It does the following:</p>
<ol>
<li><strong>Create module factory</strong>.<strong>&nbsp; </strong>This is an instance
of your CMyModuleFactory class that implements
the IHttpModuleFactory inteface:<br />
<br />
<span style="font-family: Courier New"><span style="font-size: 10pt"><span style="color: #009900">
// step 2: create module factory</span><br />
pFactory = new CMyHttpModuleFactory();</span></span><br />
</li>
<li><strong>Register module factory for desired server events</strong>.&nbsp; This registers
the module factory for one or more server events that occur during request processing.&nbsp;
The server will use the factory to create an instance of your module class for each
request, and call the appropriate event handler method on your module instance for
each of the requested events:<br />
<br />
<span style="color: #000000;"><span style="font-family: Courier New"><span style="font-size: 10pt">
<span style="color: #009900">
// step 3: register for server events
<br />
// TODO: register for more server events here
<br />
</span>hr = pModuleInfo-&gt;SetRequestNotifications( pFactory, </span></span><span
style="font-family: Courier New"><span style="font-size: 10pt"><span style="color: #009900">
/* module factory */
<br />
</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; RQ_ACQUIRE_REQUEST_STATE,
<span style="color: #009900">/* server event mask */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 <span style="color: #009900">
/* server post event mask */</span> );<br />
<br />
<span style="font-size: 12pt; font-family: Times New Roman">
The server event mask is a bit mask of one or more request processing event names
declared in </span>
</span></span><span style="font-family: Courier New"><span style="font-size: 10pt">
<strong><span style="font-size: 12pt; font-family: Times New Roman">httpserv.h:</span><br />
<br />
</strong><span style="color: #009900">//
<br />
// Request deterministic notifications
<br />
//
<br />
<br />
// request is beginning </span>
<br />
#define RQ_BEGIN_REQUEST 0x00000001
<br />
<span style="color: #009900">// request is being authenticated
<br />
</span>#define RQ_AUTHENTICATE_REQUEST 0x00000002
<br />
<span style="color: #009900">// request is being authorized </span>
<br />
#define RQ_AUTHORIZE_REQUEST 0x00000004
<br />
<span style="color: #009900">// satisfy request from cache </span>
<br />
#define RQ_RESOLVE_REQUEST_CACHE 0x00000008
<br />
<span style="color: #009900">// map handler for request</span>
<br />
#define RQ_MAP_REQUEST_HANDLER 0x00000010
<br />
<span style="color: #009900">// acquire request state</span>
<br />
#define RQ_ACQUIRE_REQUEST_STATE 0x00000020
<br />
<span style="color: #009900">// pre-execute handler</span>
<br />
#define RQ_PRE_EXECUTE_REQUEST_HANDLER 0x00000040
<br />
<span style="color: #009900">// execute handler</span>
<br />
#define RQ_EXECUTE_REQUEST_HANDLER 0x00000080
<br />
<span style="color: #009900">// release request state</span>
<br />
#define RQ_RELEASE_REQUEST_STATE 0x00000100
<br />
<span style="color: #009900">// update cache</span>
<br />
#define RQ_UPDATE_REQUEST_CACHE 0x00000200
<br />
<span style="color: #009900">// log request</span>
<br />
#define RQ_LOG_REQUEST 0x00000400
<br />
<span style="color: #009900">// end request</span>
<br />
#define RQ_END_REQUEST 0x00000800
<br />
<br />
<span style="color: #009900">//
<br />
// Request non-deterministic notifications
<br />
//</span>
<br />
<br />
<span style="color: #009900">// custom notification</span>
<br />
#define RQ_CUSTOM_NOTIFICATION 0x10000000
<br />
<span style="color: #009900">// send response</span>
<br />
#define RQ_SEND_RESPONSE 0x20000000
<br />
<span style="color: #009900">// read entity</span>
<br />
#define RQ_READ_ENTITY 0x40000000
<br />
<span style="color: #009900">// map a url to a physical path</span>
<br />
#define RQ_MAP_PATH 0x80000000<br />
<br />
<span style="font-size: 12pt; font-family: Times New Roman">
The post event mask is a bit mask of the same events, allowing to subscribe
to the post events for each of the specified events.<br />
</span>
</span></span>
</span></li>
</ol>
<h2>
</h2>
<h2>
2. Implement module factory class</h2>
<p>
The server requires a module factory class in order to obtain instances of your
module.&nbsp; The factory class must implement the IHttpModuleFactory interface
declared in the httpserv.h Windows SDK header file.<br />
<br />
<em>This factory is implemented for you in the <strong>mymodulefactory.h</strong> header
file.<br />
<br />
</em>The <strong>GetHttpModule</strong> method of the factory class is called at the beginning of
each request in order to obtain an instance of your module.&nbsp; The typical implementation
simply returns a new instance of your module class:<br />
<br />
<span style="font-family: Courier New; font-size: 10pt;">class CMyHttpModuleFactory : public IHttpModuleFactory
<br />
{
<br />
public:
<br />
&nbsp; &nbsp; virtual HRESULT GetHttpModule( OUT CHttpModule **ppModule, IN IModuleAllocator
* )
<br />
&nbsp; &nbsp; {&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ...<br />
&nbsp; &nbsp; &nbsp; &nbsp; pModule = new CMyHttpModule();&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ...<br />
&nbsp; &nbsp; &nbsp; &nbsp; *ppModule = pModule;&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ...<br />
&nbsp; &nbsp; }&nbsp;<br />
<br />
&nbsp; &nbsp; virtual void Terminate() { }<br />
}</span></p>
<p>
The <strong>Terminate</strong> method of the factory class is called during the
shutdown of the worker process, before your module DLL is unloaded.&nbsp; It typically
releases any resources you may have initialized inside the <strong>RegisterModule</strong>
function.</p>
<h2>
3. Implement module class</h2>
<p>
The module class inherits from the <strong>CHttpModule</strong> base class, which
defines an event handler method for each of the server events discussed earlier.&nbsp;
When the server executes each event during the processing of a request, it will
invoke the associated event handler method on each of the module instances that
have registered for that event.&nbsp;<br />
<br />
<em>This class is declared in the <strong>mymodule.h</strong> header file, and its event
handler methods are implemented in the <strong>mymodule.cpp</strong> source file.</em><br />
<br />
In order to provide processing for each server event, the module class MUST override
the corresponding method.&nbsp; The signature of each event handler method is the
following:<br />
<br />
<span style="font-size: 10pt; font-family: Courier New">REQUEST_NOTIFICATION_STATUS
On&lt;EVENT NAME&gt;(
IN IHttpContext * pHttpContext,
IN OUT IHttpEventProvider * pProvider
);
<br />
</span>
<br />
Where &lt;EVENT NAME&gt; is one of the server events we listed earlier.&nbsp; For
example, the module in this project initially overrides only the <strong>OnAcquireRequestState</strong> method since we register only for the <span style="font-size: 10pt;
font-family: Courier New"><strong>RQ_ACQUIRE_REQUEST_STATE</strong></span> event:<br />
<br />
<span style="font-size: 10pt; font-family: Courier New">class CMyHttpModule : public
CHttpModule
<br />
{
<br />
public:
<br />
<br />
<span style="color: #009900">&nbsp; &nbsp; // Implementation of the AcquireRequestState
event handler method. </span>
<br />
&nbsp; &nbsp; REQUEST_NOTIFICATION_STATUS OnAcquireRequestState( IN IHttpContext
* pHttpContext, IN OUT IHttpEventProvider * pProvider );
<br />
<br />
<span style="color: #009900">&nbsp; &nbsp; // TODO: override additional event handler
methods below. </span>
<br />
};</span><br />
<br />
The implementation of this method provides the module functionality desired for
processing the request in the appropriate pipeline stage.&nbsp; This project provides
a dummy implementation in the <strong>mymodule.cpp</strong> source file.</p>
<h2>
4. Deploy the module to the server</h2>
<p>
After you have compiled your module, you need to deploy it on the server.&nbsp;
You can do that by compiling the module, and then copying <strong>IIS7NativeModule.dll</strong>
(and the <strong>IIS7NativeModule.pdb</strong> debugging symbols file if desired)
to any location on the machine running IIS7.<br />
<br />
You can install your module on the server by running the following command from an Elevated command line prompt:<br />
<br />
<strong>%systemroot%\system32\inetsrv\APPCMD.EXE install module /name:MyModule /image:&lt;FULL
PATH TO DLL&gt;</strong><br />
<br />
Where <strong>&lt;FULL_PATH_TO_DLL&gt;</strong> is the full path to the module DLL
file.<br />
<br />
You can also install your module using the IIS7 Administration Tool. After installation,
your module will be loaded and enabled in all application pools on the server.&nbsp;
To learn ore about installing modules, and selecting modules to execute on your
server and for specific applications, please visit <a href="http://www.iis.net">www.iis.net</a>.</p>
<h2>
Congratulations!</h2>
<p>
You have succesfully built and deployed your own IIS7 module.&nbsp; To learn more
about building IIS7 modules, and to download sample modules, be sure to visit <a href="http://www.iis.net">www.iis.net</a>.</p>
</body>
</html>

863
iis/winbuild/CMakeLists.txt Normal file
View File

@@ -0,0 +1,863 @@
# cURL/libcurl CMake script
# by Tetetest and Sukender (Benoit Neil)
# TODO:
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
# Add full (4 or 5 libs) SSL support
# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include).
# Add CTests(?)
# Check on all possible platforms
# Test with as many configurations possible (With or without any option)
# Create scripts that help keeping the CMake build system up to date (to reduce maintenance). According to Tetetest:
# - lists of headers that 'configure' checks for;
# - curl-specific tests (the ones that are in m4/curl-*.m4 files);
# - (most obvious thing:) curl version numbers.
# Add documentation subproject
#
# To check:
# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not.
# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options.
cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
include(Utilities)
project( CURL C )
file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)"
LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
string (REGEX MATCH "([0-9]+)"
LIBCURL_VERSION_MJ ${LIBCURL_VERSION_MJ})
string (REGEX MATCH
"LIBCURL_VERSION_MINOR[ \t]+([0-9]+)"
LIBCURL_VERSION_MI ${CURL_VERSION_H_CONTENTS})
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_MI ${LIBCURL_VERSION_MI})
string (REGEX MATCH
"LIBCURL_VERSION_PATCH[ \t]+([0-9]+)"
LIBCURL_VERSION_PT ${CURL_VERSION_H_CONTENTS})
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_PT ${LIBCURL_VERSION_PT})
set (CURL_MAJOR_VERSION ${LIBCURL_VERSION_MJ})
set (CURL_MINOR_VERSION ${LIBCURL_VERSION_MI})
set (CURL_PATCH_VERSION ${LIBCURL_VERSION_PT})
include_regular_expression("^.*$") # Sukender: Is it necessary?
# Setup package meta-data
# SET(PACKAGE "curl")
set(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION})
message(STATUS "curl version=[${CURL_VERSION}]")
# SET(PACKAGE_TARNAME "curl")
# SET(PACKAGE_NAME "curl")
# SET(PACKAGE_VERSION "-")
# SET(PACKAGE_STRING "curl-")
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/")
set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
set(OS "\"${CMAKE_SYSTEM_NAME}\"")
include_directories(${PROJECT_BINARY_DIR}/include/curl)
include_directories( ${CURL_SOURCE_DIR}/include )
if(WIN32)
set(NATIVE_WINDOWS ON)
endif()
option(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
option(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
option(CURL_USE_ARES "Set to ON to enable c-ares support" OFF)
# initialize CURL_LIBS
set(CURL_LIBS "")
if(CURL_USE_ARES)
set(USE_ARES ${CURL_USE_ARES})
find_package(CARES REQUIRED)
list(APPEND CURL_LIBS ${CARES_LIBRARY} )
set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY})
endif()
option(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of cURL builds here http://www.cdash.org/CDashPublic/index.php?project=CURL" OFF)
if(BUILD_DASHBOARD_REPORTS)
#INCLUDE(Dart)
include(CTest)
endif(BUILD_DASHBOARD_REPORTS)
if(MSVC)
option(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
mark_as_advanced(BUILD_RELEASE_DEBUG_DIRS)
endif()
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
mark_as_advanced(CURL_HIDDEN_SYMBOLS)
# IF(WIN32)
# OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON)
# MARK_AS_ADVANCED(CURL_WINDOWS_SSPI)
# ENDIF()
option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF)
mark_as_advanced(HTTP_ONLY)
option(CURL_DISABLE_FTP "disables FTP" OFF)
mark_as_advanced(CURL_DISABLE_FTP)
option(CURL_DISABLE_LDAP "disables LDAP" OFF)
mark_as_advanced(CURL_DISABLE_LDAP)
option(CURL_DISABLE_TELNET "disables Telnet" OFF)
mark_as_advanced(CURL_DISABLE_TELNET)
option(CURL_DISABLE_DICT "disables DICT" OFF)
mark_as_advanced(CURL_DISABLE_DICT)
option(CURL_DISABLE_FILE "disables FILE" OFF)
mark_as_advanced(CURL_DISABLE_FILE)
option(CURL_DISABLE_TFTP "disables TFTP" OFF)
mark_as_advanced(CURL_DISABLE_TFTP)
option(CURL_DISABLE_HTTP "disables HTTP" OFF)
mark_as_advanced(CURL_DISABLE_HTTP)
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
mark_as_advanced(CURL_DISABLE_LDAPS)
if(WIN32)
set(CURL_DEFAULT_DISABLE_LDAP OFF)
# some windows compilers do not have wldap32
if( NOT HAVE_WLDAP32)
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
else()
option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
endif()
mark_as_advanced(CURL_LDAP_WIN)
endif()
if(HTTP_ONLY)
set(CURL_DISABLE_FTP ON)
set(CURL_DISABLE_LDAP ON)
set(CURL_DISABLE_TELNET ON)
set(CURL_DISABLE_DICT ON)
set(CURL_DISABLE_FILE ON)
set(CURL_DISABLE_TFTP ON)
endif()
option(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
mark_as_advanced(CURL_DISABLE_COOKIES)
option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH)
option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
option(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF)
mark_as_advanced(DISABLED_THREADSAFE)
option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
mark_as_advanced(ENABLE_IPV6)
if(WIN32)
list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
if(CURL_DISABLE_LDAP)
# Remove wldap32.lib from space-separated list
string(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
list(REMOVE_ITEM _LIST "wldap32.lib")
to_list_spaces(_LIST CMAKE_C_STANDARD_LIBRARIES)
else()
# Append wldap32.lib
list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wldap32.lib)
endif()
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}" CACHE STRING "" FORCE)
endif()
# We need ansi c-flags, especially on HP
set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
# Disable warnings on Borland to avoid changing 3rd party code.
if(BORLAND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
endif(BORLAND)
# If we are on AIX, do the _ALL_SOURCE magic
if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
set(_ALL_SOURCE 1)
endif(${CMAKE_SYSTEM_NAME} MATCHES AIX)
# Include all the necessary files for macros
include (CheckFunctionExists)
include (CheckIncludeFile)
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckSymbolExists)
include (CheckTypeSize)
# On windows preload settings
if(WIN32)
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
endif(WIN32)
# This macro checks if the symbol exists in the library and if it
# does, it prepends library to the list.
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
${VARIABLE})
if(${VARIABLE})
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
endif(${VARIABLE})
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
# Check for all needed libraries
check_library_exists_concat("dl" dlopen HAVE_LIBDL)
check_library_exists_concat("socket" connect HAVE_LIBSOCKET)
check_library_exists("c" gethostbyname "" NOT_NEED_LIBNSL)
# Yellowtab Zeta needs different libraries than BeOS 5.
if(BEOS)
set(NOT_NEED_LIBNSL 1)
check_library_exists_concat("bind" gethostbyname HAVE_LIBBIND)
check_library_exists_concat("bnetapi" closesocket HAVE_LIBBNETAPI)
endif(BEOS)
if(NOT NOT_NEED_LIBNSL)
check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL)
endif(NOT NOT_NEED_LIBNSL)
check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32)
check_library_exists_concat("winmm" getch HAVE_LIBWINMM)
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
# IF(NOT CURL_SPECIAL_LIBZ)
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
# ENDIF(NOT CURL_SPECIAL_LIBZ)
# Check for idn
check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
# Check for LDAP
check_library_exists_concat("ldap" ldap_init HAVE_LIBLDAP)
# if(NOT HAVE_LIBLDAP)
# SET(CURL_DISABLE_LDAP ON)
# endif(NOT HAVE_LIBLDAP)
# Check for symbol dlopen (same as HAVE_LIBDL)
check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
# For other tests to use the same libraries
set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS})
option(CURL_ZLIB "Set to ON to enable building cURL with zlib support." ON)
set(HAVE_LIBZ OFF)
set(HAVE_ZLIB_H OFF)
set(HAVE_ZLIB OFF)
if(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
find_package(ZLIB QUIET)
if(ZLIB_FOUND)
set(HAVE_ZLIB_H ON)
set(HAVE_ZLIB ON)
set(HAVE_LIBZ ON)
endif()
endif()
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
mark_as_advanced(CMAKE_USE_OPENSSL)
if(CMAKE_USE_OPENSSL)
if(WIN32)
find_package(OpenSSL)
if(OPENSSL_FOUND)
set(USE_SSLEAY TRUE)
set(USE_OPENSSL TRUE)
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
else()
set(CMAKE_USE_OPENSSL FALSE)
message(STATUS "OpenSSL NOT Found, disabling CMAKE_USE_OPENSSL")
endif()
else(WIN32)
check_library_exists_concat("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
check_library_exists_concat("ssl" SSL_connect HAVE_LIBSSL)
endif(WIN32)
endif(CMAKE_USE_OPENSSL)
# If we have features.h, then do the _BSD_SOURCE magic
check_include_file("features.h" HAVE_FEATURES_H)
# Check if header file exists and add it to the list.
macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
if(${VARIABLE})
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
endif(${VARIABLE})
endmacro(CHECK_INCLUDE_FILE_CONCAT)
# Check for header files
if(NOT UNIX)
check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
endif(NOT UNIX)
check_include_file_concat("stdio.h" HAVE_STDIO_H)
if(NOT UNIX)
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
endif(NOT UNIX)
check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
check_include_file_concat("sys/param.h" HAVE_SYS_PARAM_H)
check_include_file_concat("sys/poll.h" HAVE_SYS_POLL_H)
check_include_file_concat("sys/resource.h" HAVE_SYS_RESOURCE_H)
check_include_file_concat("sys/select.h" HAVE_SYS_SELECT_H)
check_include_file_concat("sys/socket.h" HAVE_SYS_SOCKET_H)
check_include_file_concat("sys/sockio.h" HAVE_SYS_SOCKIO_H)
check_include_file_concat("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file_concat("sys/time.h" HAVE_SYS_TIME_H)
check_include_file_concat("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H)
check_include_file_concat("sys/un.h" HAVE_SYS_UN_H)
check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H)
check_include_file_concat("alloca.h" HAVE_ALLOCA_H)
check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H)
check_include_file_concat("assert.h" HAVE_ASSERT_H)
check_include_file_concat("crypto.h" HAVE_CRYPTO_H)
check_include_file_concat("des.h" HAVE_DES_H)
check_include_file_concat("err.h" HAVE_ERR_H)
check_include_file_concat("errno.h" HAVE_ERRNO_H)
check_include_file_concat("fcntl.h" HAVE_FCNTL_H)
check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
check_include_file_concat("idn-free.h" HAVE_IDN_FREE_H)
check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H)
check_include_file_concat("io.h" HAVE_IO_H)
check_include_file_concat("krb.h" HAVE_KRB_H)
check_include_file_concat("libgen.h" HAVE_LIBGEN_H)
check_include_file_concat("libssh2.h" HAVE_LIBSSH2_H)
check_include_file_concat("limits.h" HAVE_LIMITS_H)
check_include_file_concat("locale.h" HAVE_LOCALE_H)
check_include_file_concat("net/if.h" HAVE_NET_IF_H)
check_include_file_concat("netdb.h" HAVE_NETDB_H)
check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H)
check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H)
check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H)
check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H)
check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H)
check_include_file_concat("pem.h" HAVE_PEM_H)
check_include_file_concat("poll.h" HAVE_POLL_H)
check_include_file_concat("pwd.h" HAVE_PWD_H)
check_include_file_concat("rsa.h" HAVE_RSA_H)
check_include_file_concat("setjmp.h" HAVE_SETJMP_H)
check_include_file_concat("sgtty.h" HAVE_SGTTY_H)
check_include_file_concat("signal.h" HAVE_SIGNAL_H)
check_include_file_concat("ssl.h" HAVE_SSL_H)
check_include_file_concat("stdbool.h" HAVE_STDBOOL_H)
check_include_file_concat("stdint.h" HAVE_STDINT_H)
check_include_file_concat("stdio.h" HAVE_STDIO_H)
check_include_file_concat("stdlib.h" HAVE_STDLIB_H)
check_include_file_concat("string.h" HAVE_STRING_H)
check_include_file_concat("strings.h" HAVE_STRINGS_H)
check_include_file_concat("stropts.h" HAVE_STROPTS_H)
check_include_file_concat("termio.h" HAVE_TERMIO_H)
check_include_file_concat("termios.h" HAVE_TERMIOS_H)
check_include_file_concat("time.h" HAVE_TIME_H)
check_include_file_concat("tld.h" HAVE_TLD_H)
check_include_file_concat("unistd.h" HAVE_UNISTD_H)
check_include_file_concat("utime.h" HAVE_UTIME_H)
check_include_file_concat("x509.h" HAVE_X509_H)
check_include_file_concat("process.h" HAVE_PROCESS_H)
check_include_file_concat("stddef.h" HAVE_STDDEF_H)
check_include_file_concat("dlfcn.h" HAVE_DLFCN_H)
check_include_file_concat("malloc.h" HAVE_MALLOC_H)
check_include_file_concat("memory.h" HAVE_MEMORY_H)
check_include_file_concat("ldap.h" HAVE_LDAP_H)
check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
check_include_file_concat("stdint.h" HAVE_STDINT_H)
check_include_file_concat("sockio.h" HAVE_SOCKIO_H)
check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H)
check_include_file_concat("idna.h" HAVE_IDNA_H)
if(CMAKE_USE_OPENSSL)
check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H)
endif(CMAKE_USE_OPENSSL)
if(NOT HAVE_LDAP_H)
message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
endif()
check_type_size(size_t SIZEOF_SIZE_T)
check_type_size(ssize_t SIZEOF_SSIZE_T)
check_type_size("long long" SIZEOF_LONG_LONG)
check_type_size("long" SIZEOF_LONG)
check_type_size("short" SIZEOF_SHORT)
check_type_size("int" SIZEOF_INT)
check_type_size("__int64" SIZEOF___INT64)
check_type_size("long double" SIZEOF_LONG_DOUBLE)
check_type_size("time_t" SIZEOF_TIME_T)
if(NOT HAVE_SIZEOF_SSIZE_T)
if(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
set(ssize_t long)
endif(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
if(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
set(ssize_t __int64)
endif(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
endif(NOT HAVE_SIZEOF_SSIZE_T)
# Different sizeofs, etc.
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
set(CURL_SIZEOF_LONG ${SIZEOF_LONG})
if(SIZEOF_LONG EQUAL 8)
set(CURL_TYPEOF_CURL_OFF_T long)
set(CURL_SIZEOF_CURL_OFF_T 8)
set(CURL_FORMAT_CURL_OFF_T "ld")
set(CURL_FORMAT_CURL_OFF_TU "lu")
set(CURL_FORMAT_OFF_T "%ld")
set(CURL_SUFFIX_CURL_OFF_T L)
set(CURL_SUFFIX_CURL_OFF_TU LU)
endif(SIZEOF_LONG EQUAL 8)
if(SIZEOF_LONG_LONG EQUAL 8)
set(CURL_TYPEOF_CURL_OFF_T "long long")
set(CURL_SIZEOF_CURL_OFF_T 8)
set(CURL_FORMAT_CURL_OFF_T "lld")
set(CURL_FORMAT_CURL_OFF_TU "llu")
set(CURL_FORMAT_OFF_T "%lld")
set(CURL_SUFFIX_CURL_OFF_T LL)
set(CURL_SUFFIX_CURL_OFF_TU LLU)
endif(SIZEOF_LONG_LONG EQUAL 8)
if(NOT CURL_TYPEOF_CURL_OFF_T)
set(CURL_TYPEOF_CURL_OFF_T ${ssize_t})
set(CURL_SIZEOF_CURL_OFF_T ${SIZEOF_SSIZE_T})
# TODO: need adjustment here.
set(CURL_FORMAT_CURL_OFF_T "ld")
set(CURL_FORMAT_CURL_OFF_TU "lu")
set(CURL_FORMAT_OFF_T "%ld")
set(CURL_SUFFIX_CURL_OFF_T L)
set(CURL_SUFFIX_CURL_OFF_TU LU)
endif(NOT CURL_TYPEOF_CURL_OFF_T)
if(HAVE_SIZEOF_LONG_LONG)
set(HAVE_LONGLONG 1)
set(HAVE_LL 1)
endif(HAVE_SIZEOF_LONG_LONG)
find_file(RANDOM_FILE urandom /dev)
mark_as_advanced(RANDOM_FILE)
# Check for some functions that are used
check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME)
check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET)
check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(strdup "${CURL_INCLUDES}" HAVE_STRDUP)
check_symbol_exists(strstr "${CURL_INCLUDES}" HAVE_STRSTR)
check_symbol_exists(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R)
check_symbol_exists(strftime "${CURL_INCLUDES}" HAVE_STRFTIME)
check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
check_symbol_exists(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP)
check_symbol_exists(stricmp "${CURL_INCLUDES}" HAVE_STRICMP)
check_symbol_exists(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI)
check_symbol_exists(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI)
check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM)
if(NOT HAVE_STRNCMPI)
set(HAVE_STRCMPI)
endif(NOT HAVE_STRNCMPI)
check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP)
check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R)
check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT)
check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID)
check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID)
check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME)
if(CMAKE_USE_OPENSSL)
check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
check_symbol_exists(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
if(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
set(USE_OPENSSL 1)
set(USE_SSLEAY 1)
endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
endif(CMAKE_USE_OPENSSL)
check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
check_symbol_exists(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
check_symbol_exists(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
check_symbol_exists(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
set(HAVE_SIGNAL 1)
endif(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
check_symbol_exists(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL)
check_symbol_exists(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64)
check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK)
check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
check_symbol_exists(idn_free "${CURL_INCLUDES}" HAVE_IDN_FREE)
check_symbol_exists(idna_strerror "${CURL_INCLUDES}" HAVE_IDNA_STRERROR)
check_symbol_exists(tld_strerror "${CURL_INCLUDES}" HAVE_TLD_STRERROR)
check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)
check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
# symbol exists in win32, but function does not.
check_function_exists(inet_pton HAVE_INET_PTON)
# sigaction and sigsetjmp are special. Use special mechanism for
# detecting those, but only if previous attempt failed.
if(HAVE_SIGNAL_H)
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
endif(HAVE_SIGNAL_H)
if(NOT HAVE_SIGSETJMP)
if(HAVE_SETJMP_H)
check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP)
if(HAVE_MACRO_SIGSETJMP)
set(HAVE_SIGSETJMP 1)
endif(HAVE_MACRO_SIGSETJMP)
endif(HAVE_SETJMP_H)
endif(NOT HAVE_SIGSETJMP)
# If there is no stricmp(), do not allow LDAP to parse URLs
if(NOT HAVE_STRICMP)
set(HAVE_LDAP_URL_PARSE 1)
endif(NOT HAVE_STRICMP)
# For other curl specific tests, use this macro.
macro(CURL_INTERNAL_TEST CURL_TEST)
if("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
if(CMAKE_REQUIRED_LIBRARIES)
set(CURL_TEST_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
endif(CMAKE_REQUIRED_LIBRARIES)
message(STATUS "Performing Curl Test ${CURL_TEST}")
try_compile(${CURL_TEST}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CURL_TEST_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
if(${CURL_TEST})
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
"${OUTPUT}\n")
else(${CURL_TEST})
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}\n")
endif(${CURL_TEST})
endif("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
endmacro(CURL_INTERNAL_TEST)
macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
if("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
if(CMAKE_REQUIRED_LIBRARIES)
set(CURL_TEST_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
endif(CMAKE_REQUIRED_LIBRARIES)
message(STATUS "Performing Curl Test ${CURL_TEST}")
try_run(${CURL_TEST} ${CURL_TEST}_COMPILE
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CURL_TEST_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}")
if(${CURL_TEST}_COMPILE)
file(APPEND
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"There was a problem running this test\n")
endif(${CURL_TEST}_COMPILE)
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"\n\n")
endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
endif("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
endmacro(CURL_INTERNAL_TEST_RUN)
# Do curl specific tests
foreach(CURL_TEST
HAVE_FCNTL_O_NONBLOCK
HAVE_IOCTLSOCKET
HAVE_IOCTLSOCKET_CAMEL
HAVE_IOCTLSOCKET_CAMEL_FIONBIO
HAVE_IOCTLSOCKET_FIONBIO
HAVE_IOCTL_FIONBIO
HAVE_IOCTL_SIOCGIFADDR
HAVE_SETSOCKOPT_SO_NONBLOCK
HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
TIME_WITH_SYS_TIME
HAVE_O_NONBLOCK
HAVE_GETHOSTBYADDR_R_5
HAVE_GETHOSTBYADDR_R_7
HAVE_GETHOSTBYADDR_R_8
HAVE_GETHOSTBYADDR_R_5_REENTRANT
HAVE_GETHOSTBYADDR_R_7_REENTRANT
HAVE_GETHOSTBYADDR_R_8_REENTRANT
HAVE_GETHOSTBYNAME_R_3
HAVE_GETHOSTBYNAME_R_5
HAVE_GETHOSTBYNAME_R_6
HAVE_GETHOSTBYNAME_R_3_REENTRANT
HAVE_GETHOSTBYNAME_R_5_REENTRANT
HAVE_GETHOSTBYNAME_R_6_REENTRANT
HAVE_SOCKLEN_T
HAVE_IN_ADDR_T
HAVE_BOOL_T
STDC_HEADERS
RETSIGTYPE_TEST
HAVE_INET_NTOA_R_DECL
HAVE_INET_NTOA_R_DECL_REENTRANT
HAVE_GETADDRINFO
HAVE_FILE_OFFSET_BITS
)
curl_internal_test(${CURL_TEST})
endforeach(CURL_TEST)
if(HAVE_FILE_OFFSET_BITS)
set(_FILE_OFFSET_BITS 64)
endif(HAVE_FILE_OFFSET_BITS)
foreach(CURL_TEST
HAVE_GLIBC_STRERROR_R
HAVE_POSIX_STRERROR_R
)
curl_internal_test_run(${CURL_TEST})
endforeach(CURL_TEST)
# Check for reentrant
foreach(CURL_TEST
HAVE_GETHOSTBYADDR_R_5
HAVE_GETHOSTBYADDR_R_7
HAVE_GETHOSTBYADDR_R_8
HAVE_GETHOSTBYNAME_R_3
HAVE_GETHOSTBYNAME_R_5
HAVE_GETHOSTBYNAME_R_6
HAVE_INET_NTOA_R_DECL_REENTRANT)
if(NOT ${CURL_TEST})
if(${CURL_TEST}_REENTRANT)
set(NEED_REENTRANT 1)
endif(${CURL_TEST}_REENTRANT)
endif(NOT ${CURL_TEST})
endforeach(CURL_TEST)
if(NEED_REENTRANT)
foreach(CURL_TEST
HAVE_GETHOSTBYADDR_R_5
HAVE_GETHOSTBYADDR_R_7
HAVE_GETHOSTBYADDR_R_8
HAVE_GETHOSTBYNAME_R_3
HAVE_GETHOSTBYNAME_R_5
HAVE_GETHOSTBYNAME_R_6)
set(${CURL_TEST} 0)
if(${CURL_TEST}_REENTRANT)
set(${CURL_TEST} 1)
endif(${CURL_TEST}_REENTRANT)
endforeach(CURL_TEST)
endif(NEED_REENTRANT)
if(HAVE_INET_NTOA_R_DECL_REENTRANT)
set(HAVE_INET_NTOA_R_DECL 1)
set(NEED_REENTRANT 1)
endif(HAVE_INET_NTOA_R_DECL_REENTRANT)
# Some other minor tests
if(NOT HAVE_IN_ADDR_T)
set(in_addr_t "unsigned long")
endif(NOT HAVE_IN_ADDR_T)
# Fix libz / zlib.h
if(NOT CURL_SPECIAL_LIBZ)
if(NOT HAVE_LIBZ)
set(HAVE_ZLIB_H 0)
endif(NOT HAVE_LIBZ)
if(NOT HAVE_ZLIB_H)
set(HAVE_LIBZ 0)
endif(NOT HAVE_ZLIB_H)
endif(NOT CURL_SPECIAL_LIBZ)
if(_FILE_OFFSET_BITS)
set(_FILE_OFFSET_BITS 64)
endif(_FILE_OFFSET_BITS)
set(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64")
set(CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/curl/curl.h")
check_type_size("curl_off_t" SIZEOF_CURL_OFF_T)
set(CMAKE_EXTRA_INCLUDE_FILES)
set(CMAKE_REQUIRED_FLAGS)
# Check for nonblocking
set(HAVE_DISABLED_NONBLOCKING 1)
if(HAVE_FIONBIO OR
HAVE_IOCTLSOCKET OR
HAVE_IOCTLSOCKET_CASE OR
HAVE_O_NONBLOCK)
set(HAVE_DISABLED_NONBLOCKING)
endif(HAVE_FIONBIO OR
HAVE_IOCTLSOCKET OR
HAVE_IOCTLSOCKET_CASE OR
HAVE_O_NONBLOCK)
if(RETSIGTYPE_TEST)
set(RETSIGTYPE void)
else(RETSIGTYPE_TEST)
set(RETSIGTYPE int)
endif(RETSIGTYPE_TEST)
if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
include(CheckCCompilerFlag)
check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
if(HAVE_C_FLAG_Wno_long_double)
# The Mac version of GCC warns about use of long double. Disable it.
get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
if(MPRINTF_COMPILE_FLAGS)
set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
else(MPRINTF_COMPILE_FLAGS)
set(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
endif(MPRINTF_COMPILE_FLAGS)
set_source_files_properties(mprintf.c PROPERTIES
COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
endif(HAVE_C_FLAG_Wno_long_double)
endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
if(HAVE_SOCKLEN_T)
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
if(WIN32)
set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h")
elseif(HAVE_SYS_SOCKET_H)
set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
endif()
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
set(CMAKE_EXTRA_INCLUDE_FILES)
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
message(FATAL_ERROR
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
endif()
else()
set(CURL_TYPEOF_CURL_SOCKLEN_T int)
set(CURL_SIZEOF_CURL_SOCKLEN_T ${SIZEOF_INT})
endif()
include(CMake/OtherTests.cmake)
add_definitions(-DHAVE_CONFIG_H)
# For windows, do not allow the compiler to use default target (Vista).
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0501)
endif(WIN32)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
endif(MSVC)
# Sets up the dependencies (zlib, OpenSSL, etc.) of a cURL subproject according to options.
# TODO This is far to be complete!
function(SETUP_CURL_DEPENDENCIES TARGET_NAME)
if(CURL_ZLIB AND ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIR})
endif()
if(CURL_ZLIB AND ZLIB_FOUND)
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
#ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
endif()
if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
endif()
if(CMAKE_USE_OPENSSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
#ADD_DEFINITIONS( -DUSE_SSLEAY )
endif()
endfunction()
# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
string(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
string(REGEX REPLACE "\\\\\n" "<22>!<21>" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
string(REPLACE "<22>!<21>" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that may not be read by CMake scripts.
file(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT})
endfunction()
add_subdirectory(lib)
if(BUILD_CURL_EXE)
add_subdirectory(src)
endif()
if(BUILD_CURL_TESTS)
add_subdirectory(tests)
endif()
# This needs to be run very last so other parts of the scripts can take advantage of this.
if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
endif()
# Installation.
# First, install generated curlbuild.h
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/curl/curlbuild.h"
DESTINATION include/curl )
# Next, install other headers excluding curlbuild.h
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl"
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN "curlbuild.h" EXCLUDE)

57
iis/winbuild/Makefile.win Normal file
View File

@@ -0,0 +1,57 @@
###########################################################################
### You Will need to modify the following variables for your system
###########################################################################
###########################################################################
# Path to Apache httpd installation
BASE = %APACHE%
# Paths to required libraries
PCRE = %PCRE%
CURL = %CURL%
# Linking libraries
LIBS = $(BASE)\lib\libapr-1.lib \
$(BASE)\lib\libaprutil-1.lib \
$(PCRE)\pcre.lib \
$(CURL)\libcurl_imp.lib \
wsock32.lib
###########################################################################
###########################################################################
CC = cL
MT = mt
DEFS = /nologo /O2 /W3 -DWIN32 -DWINNT -Dinline=APR_INLINE -D_CONSOLE -D$(VERSION)
EXE = mlogc.exe
INCLUDES = -I. -I..\apache2 \
-I$(PCRE)\include -I$(PCRE) \
-I$(CURL)\include -I$(CURL) \
-I$(BASE)\include
CFLAGS= -MT $(INCLUDES) $(DEFS)
LDFLAGS =
OBJS = mlogc.obj
all: $(EXE)
.c.obj:
$(CC) $(CFLAGS) -c $< -Fo$@
.cpp.obj:
$(CC) $(CFLAGS) -c $< -Fo$@
$(EXE): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) /link /NODEFAULTLIB:MSVCRT.lib /subsystem:console
install: $(EXE)
copy $(EXE) $(BASE)\bin
clean:
del $(OBJS) $(EXE) *.dll *.lib *.pdb *.idb *.ilk *.exp *.res *.rc *.bin *.manifest

View File

@@ -0,0 +1,224 @@
@call :GetWindowsSdkDir
@call :GetVSInstallDir
@call :GetVCInstallDir
@call :GetFSharpInstallDir
@if "%1"=="32bit" (
@call :GetFrameworkDir32
@call :GetFrameworkVer32
)
@if "%2"=="64bit" (
@call :GetFrameworkDir64
@call :GetFrameworkVer64
)
@SET Framework35Version=v3.5
@goto end
@REM -----------------------------------------------------------------------
:GetWindowsSdkDir
@set WindowsSdkDir=
@call :GetWindowsSdkDirHelper HKLM > nul 2>&1
@if errorlevel 1 call :GetWindowsSdkDirHelper HKCU > nul 2>&1
@if errorlevel 1 set WindowsSdkDir=%VCINSTALLDIR%\PlatformSDK\
@exit /B 0
:GetWindowsSdkDirHelper
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" /v "InstallationFolder"') DO (
@if "%%i"=="InstallationFolder" (
@SET "WindowsSdkDir=%%k"
)
)
@if "%WindowsSdkDir%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:GetVSInstallDir
@set VSINSTALLDIR=
@call :GetVSInstallDirHelper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSInstallDirHelper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetVSInstallDirHelper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSInstallDirHelper64 HKCU > nul 2>&1
@exit /B 0
:GetVSInstallDirHelper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VSINSTALLDIR=%%k"
)
)
@if "%VSINSTALLDIR%"=="" exit /B 1
@exit /B 0
:GetVSInstallDirHelper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VSINSTALLDIR=%%k"
)
)
@if "%VSINSTALLDIR%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:GetVCInstallDir
@set VCINSTALLDIR=
@call :GetVCInstallDirHelper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetVCInstallDirHelper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetVCInstallDirHelper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetVCInstallDirHelper64 HKCU > nul 2>&1
@exit /B 0
:GetVCInstallDirHelper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VCINSTALLDIR=%%k"
)
)
@if "%VCINSTALLDIR%"=="" exit /B 1
@exit /B 0
:GetVCInstallDirHelper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VCINSTALLDIR=%%k"
)
)
@if "%VCINSTALLDIR%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:GetFSharpInstallDir
@set FSHARPINSTALLDIR=
@call :GetFSharpInstallDirHelper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetFSharpInstallDirHelper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetFSharpInstallDirHelper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetFSharpInstallDirHelper64 HKCU > nul 2>&1
@exit /B 0
:GetFSharpInstallDirHelper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\F#" /v "ProductDir"') DO (
@if "%%i"=="ProductDir" (
@SET "FSHARPINSTALLDIR=%%k"
)
)
@if "%FSHARPINSTALLDIR%"=="" exit /B 1
@exit /B 0
:GetFSharpInstallDirHelper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\F#" /v "ProductDir"') DO (
@if "%%i"=="ProductDir" (
@SET "FSHARPINSTALLDIR=%%k"
)
)
@if "%FSHARPINSTALLDIR%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:GetFrameworkDir32
@set FrameworkDir32=
@call :GetFrameworkDir32Helper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkDir32Helper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetFrameworkDir32Helper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkDir32Helper64 HKCU > nul 2>&1
@exit /B 0
:GetFrameworkDir32Helper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir32"') DO (
@if "%%i"=="FrameworkDir32" (
@SET "FrameworkDIR32=%%k"
)
)
@if "%FrameworkDir32%"=="" exit /B 1
@exit /B 0
:GetFrameworkDir32Helper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir32"') DO (
@if "%%i"=="FrameworkDir32" (
@SET "FrameworkDIR32=%%k"
)
)
@if "%FrameworkDIR32%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:GetFrameworkDir64
@set FrameworkDir64=
@call :GetFrameworkDir64Helper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkDir64Helper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetFrameworkDir64Helper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkDir64Helper64 HKCU > nul 2>&1
@exit /B 0
:GetFrameworkDir64Helper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir64"') DO (
@if "%%i"=="FrameworkDir64" (
@SET "FrameworkDIR64=%%k"
)
)
@if "%FrameworkDIR64%"=="" exit /B 1
@exit /B 0
:GetFrameworkDir64Helper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir64"') DO (
@if "%%i"=="FrameworkDir64" (
@SET "FrameworkDIR64=%%k"
)
)
@if "%FrameworkDIR64%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:GetFrameworkVer32
@set FrameworkVer32=
@call :GetFrameworkVer32Helper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkVer32Helper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetFrameworkVer32Helper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkVer32Helper64 HKCU > nul 2>&1
@exit /B 0
:GetFrameworkVer32Helper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer32"') DO (
@if "%%i"=="FrameworkVer32" (
@SET "FrameworkVersion32=%%k"
)
)
@if "%FrameworkVersion32%"=="" exit /B 1
@exit /B 0
:GetFrameworkVer32Helper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer32"') DO (
@if "%%i"=="FrameworkVer32" (
@SET "FrameworkVersion32=%%k"
)
)
@if "%FrameworkVersion32%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:GetFrameworkVer64
@set FrameworkVer64=
@call :GetFrameworkVer64Helper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkVer64Helper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetFrameworkVer64Helper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetFrameworkVer64Helper64 HKCU > nul 2>&1
@exit /B 0
:GetFrameworkVer64Helper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer64"') DO (
@if "%%i"=="FrameworkVer64" (
@SET "FrameworkVersion64=%%k"
)
)
@if "%FrameworkVersion64%"=="" exit /B 1
@exit /B 0
:GetFrameworkVer64Helper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer64"') DO (
@if "%%i"=="FrameworkVer64" (
@SET "FrameworkVersion64=%%k"
)
)
@if "%FrameworkVersion64%"=="" exit /B 1
@exit /B 0
@REM -----------------------------------------------------------------------
:end

1779
iis/winbuild/apr.mak Normal file

File diff suppressed because it is too large Load Diff

1472
iis/winbuild/aprutil.mak Normal file

File diff suppressed because it is too large Load Diff

11
iis/winbuild/build.bat Normal file
View File

@@ -0,0 +1,11 @@
c:
call build_apache.bat
call build_pcre.bat
call build_zlib.bat
call build_libxml2.bat
call build_lua.bat
call build_curl.bat
call build_module.bat
cd %WORK%

5
iis/winbuild/build32.bat Normal file
View File

@@ -0,0 +1,5 @@
SET APACHE24_ZIP=httpd-2.4.3-win32.zip
mkdir %DROP%
call vsvars32.bat
call init.bat
call build.bat

6
iis/winbuild/build64.bat Normal file
View File

@@ -0,0 +1,6 @@
SET APACHE24_ZIP=httpd-2.4.3-win64.zip
mkdir %DROP%
call vcvars64.bat
call init.bat
SET CL=/D "WIN64" /D "_WIN64"
call build.bat

View File

@@ -0,0 +1,40 @@
cd %WORK%
rmdir /s /q %APACHE%
rmdir /s /q %HTTPD%
IF NOT DEFINED BUILD_APACHE GOTO USE_APACHE_24
7z.exe x %HTTPD%-win32-src.zip
fart.exe -r -i -C %WORK%\%HTTPD%\*.mak \x2Fmachine:x86 " "
fart.exe -r -i -C %WORK%\%HTTPD%\*.mk.win \x2Fmachine:x86 " "
copy /y %WORK%\libhttpd.mak %WORK%\%HTTPD%
copy /y %WORK%\mod_ssl.mak %WORK%\%HTTPD%\modules\ssl
copy /y %WORK%\apr.mak %WORK%\%HTTPD%\srclib\apr
copy /y %WORK%\libapr.mak %WORK%\%HTTPD%\srclib\apr
copy /y %WORK%\aprutil.mak %WORK%\%HTTPD%\srclib\apr-util
copy /y %WORK%\libaprutil.mak %WORK%\%HTTPD%\srclib\apr-util
copy /y %WORK%\dftables.mak %WORK%\%HTTPD%\srclib\pcre
copy /y %WORK%\pcre.mak %WORK%\%HTTPD%\srclib\pcre
cd %HTTPD%
nmake -f Makefile.win installr
IF NOT DEFINED FULLBUILD pause
GOTO END
:USE_APACHE_24
set APACHE=%WORK%\Apache24
del /q /f --*.*
del /q /f readme.txt
rmdir /s /q %APACHE%
7z.exe x %APACHE24_ZIP%
7z.exe x %HTTPD%.zip
:END
copy /y %APACHE%\bin\libapr-1.dll %DROP%
copy /y %APACHE%\bin\libapr-1.pdb %DROP%
copy /y %APACHE%\lib\libapr-1.lib %DROP%
copy /y %APACHE%\bin\libapriconv-1.dll %DROP%
copy /y %APACHE%\bin\libapriconv-1.pdb %DROP%
copy /y %APACHE%\lib\libapriconv-1.lib %DROP%
copy /y %APACHE%\bin\libaprutil-1.dll %DROP%
copy /y %APACHE%\bin\libaprutil-1.pdb %DROP%
copy /y %APACHE%\lib\libaprutil-1.lib %DROP%
SET HTTPD_BUILD=%WORK%\%HTTPD%
cd %WORK%

View File

@@ -0,0 +1,14 @@
cd %WORK%
rmdir /s /q %CURL%
7z.exe x %CURL%.zip
copy /y CMakeLists.txt %CURL%
CD %CURL%
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True
%WORK%\fart.exe -r -C %WORK%\%CURL%\include\curl\curlbuild.h LLU ULL
NMAKE
IF NOT DEFINED FULLBUILD pause
cd %WORK%
copy /y %WORK%\%CURL%\libcurl.dll %DROP%
copy /y %WORK%\%CURL%\libcurl.pdb %DROP%
copy /y %WORK%\%CURL%\libcurl_imp.lib %DROP%

View File

@@ -0,0 +1,12 @@
cd %WORK%
rmdir /s /q %LIBXML2%
7z.exe x %LIBXML2%.zip
fart.exe -r -i -C %WORK%\%LIBXML2%\win32\*.* \x2Fopt:nowin98 " "
cd %LIBXML2%\win32
CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes
NMAKE -f Makefile.msvc
IF NOT DEFINED FULLBUILD pause
cd %WORK%
copy /y %WORK%\%LIBXML2%\win32\bin.msvc\libxml2.dll %DROP%
copy /y %WORK%\%LIBXML2%\win32\bin.msvc\libxml2.lib %DROP%

View File

@@ -0,0 +1,14 @@
cd %WORK%
rmdir /s /q %LUA%
7z.exe x %LUA%.zip
CD %LUA%\src
CL /Ox /arch:SSE2 /GF /GL /Gy /FD /EHsc /MD /Zi /TC /wd4005 /D "_MBCS" /D "LUA_CORE" /D "LUA_BUILD_AS_DLL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_WIN32" /D "_WINDLL" /c *.c
DEL lua.obj luac.obj
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
IF EXIST lua5.1.dll.manifest MT -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
IF NOT DEFINED FULLBUILD pause
cd %WORK%
copy /y %WORK%\%LUA%\src\lua5.1.dll %DROP%
copy /y %WORK%\%LUA%\src\lua5.1.pdb %DROP%
copy /y %WORK%\%LUA%\src\lua5.1.lib %DROP%

View File

@@ -0,0 +1,16 @@
cd %WORK%
CD mod_security\apache2
del *.obj *.dll *.lib
NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
cd ..\mlogc
copy /y %WORK%\Makefile.win .
nmake -f Makefile.win clean
nmake -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% CURL=%WORK%\%CURL% VERSION=VERSION_IIS
cd ..\iis
nmake -f Makefile.win clean
NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
cd %WORK%
copy /y %WORK%\mod_security\mlogc\mlogc.exe %DROP%
copy /y %WORK%\mod_security\iis\modsecurityiis.dll %DROP%
copy /y %WORK%\mod_security\iis\modsecurityiis.pdb %DROP%

View File

@@ -0,0 +1,12 @@
cd %WORK%
rmdir /s /q %PCRE%
7z.exe x %PCRE%.zip
cd %PCRE%
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True
NMAKE
IF NOT DEFINED FULLBUILD pause
cd %WORK%
copy /y %WORK%\%PCRE%\pcre.dll %DROP%
copy /y %WORK%\%PCRE%\pcre.pdb %DROP%
copy /y %WORK%\%PCRE%\pcre.lib %DROP%

View File

@@ -0,0 +1,13 @@
cd %WORK%
rmdir /s /q %ZLIB%
7z.exe x %ZLIB%.zip
cd %ZLIB%
nmake -f win32\Makefile.msc
SET INCLUDE=%INCLUDE%;%WORK%\%ZLIB%
SET LIB=%LIB%;%WORK%\%ZLIB%
IF NOT DEFINED FULLBUILD pause
cd %WORK%
copy /y %WORK%\%ZLIB%\zlib1.dll %DROP%
copy /y %WORK%\%ZLIB%\zlib1.pdb %DROP%
copy /y %WORK%\%ZLIB%\zdll.lib %DROP%

View File

@@ -0,0 +1,7 @@
set FULLBUILD=1
set DROP=c:\drop\amd64
cmd.exe /c build64.bat
set DROP=c:\drop\x86
cmd.exe /c build32.bat

238
iis/winbuild/dftables.mak Normal file
View File

@@ -0,0 +1,238 @@
# Microsoft Developer Studio Generated NMAKE File, Based on dftables.dsp
!IF "$(CFG)" == ""
CFG=dftables - Win32 Debug
!MESSAGE No configuration specified. Defaulting to dftables - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "dftables - Win32 Release" && "$(CFG)" != "dftables - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "dftables.mak" CFG="dftables - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "dftables - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "dftables - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "dftables - Win32 Release"
OUTDIR=.
INTDIR=.\Release
# Begin Custom Macros
OutDir=.
# End Custom Macros
ALL : "$(OUTDIR)\dftables.exe"
CLEAN :
-@erase "$(INTDIR)\dftables.idb"
-@erase "$(INTDIR)\dftables.obj"
-@erase "$(OUTDIR)\dftables.exe"
"$(INTDIR)" :
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /O2 /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\dftables" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dftables.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\Release\dftables.pdb" /out:"$(OUTDIR)\dftables.exe" /opt:ref
LINK32_OBJS= \
"$(INTDIR)\dftables.obj"
"$(OUTDIR)\dftables.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "dftables - Win32 Debug"
OUTDIR=.
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.
# End Custom Macros
ALL : ".\pcre.h" ".\config.h" "$(OUTDIR)\dftables.exe"
CLEAN :
-@erase "$(INTDIR)\dftables.idb"
-@erase "$(INTDIR)\dftables.obj"
-@erase "$(OUTDIR)\Debug\dftables.pdb"
-@erase "$(OUTDIR)\dftables.exe"
-@erase ".\config.h"
-@erase ".\pcre.h"
"$(INTDIR)" :
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /D "_WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\dftables" /FD /EHsc /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dftables.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\Debug\dftables.pdb" /debug /out:"$(OUTDIR)\dftables.exe"
LINK32_OBJS= \
"$(INTDIR)\dftables.obj"
"$(OUTDIR)\dftables.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("dftables.dep")
!INCLUDE "dftables.dep"
!ELSE
!MESSAGE Warning: cannot find "dftables.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "dftables - Win32 Release" || "$(CFG)" == "dftables - Win32 Debug"
SOURCE=.\dftables.c
"$(INTDIR)\dftables.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
SOURCE=.\config.hw
!IF "$(CFG)" == "dftables - Win32 Release"
InputPath=.\config.hw
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile27.bat
@echo off
type .\config.hw > .\config.h
<<
!ELSEIF "$(CFG)" == "dftables - Win32 Debug"
InputPath=.\config.hw
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile28.bat
@echo off
type .\config.hw > .\config.h
<<
!ENDIF
SOURCE=.\maketables.c
SOURCE=.\pcre.hw
!IF "$(CFG)" == "dftables - Win32 Release"
InputPath=.\pcre.hw
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile29.bat
@echo off
type .\pcre.hw > .\pcre.h
<<
!ELSEIF "$(CFG)" == "dftables - Win32 Debug"
InputPath=.\pcre.hw
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile30.bat
@echo off
type .\pcre.hw > .\pcre.h
<<
!ENDIF
!ENDIF

BIN
iis/winbuild/fart.exe Normal file

Binary file not shown.

44
iis/winbuild/howto.txt Normal file
View File

@@ -0,0 +1,44 @@
WARNING!
Building ModSecurityIIS on Windows is a relatively complicated process. Understanding it requires advanced knowledge of Windows and Unix environments.
Using the same versions of libraries as listed below is strongly recommended.
--------------------------------------
Tested on:
Windows 7 x64
Vistual Studio 2010 Ultimate SP1
IIS enabled/installed
cmake 2.8.7
curl 7.24.0
apache 2.2.22 or apache 2.4.3
libxml2 2.7.7
lua 5.1.5
pcre 8.30
zlib 1.2.7
7-Zip
--------------------------------------
1. Create working directory c:\work and drop directory c:\drop
2. Sync SVN ModSecurity branch to c:\work\mod_security
3. Copy files from c:\work\mod_security\iis\winbuild to c:\work
4. Download and install cmake (unpack to c:\work\cmake-2.8.7-win32-x86)
5. Download and install 7-Zip
6. Adjust paths in c:\work\init.bat accordingly if needed
7. Download curl, apache, libxml2, lua, pcre and zlib, place them in zip files in c:\work
curl-7.24.0.zip
httpd-2.2.22-win32-src.zip or (httpd-2.4.3.zip (source) and httpd-2.4.3-win32.zip + httpd-2.4.3-win64.zip (binaries))
libxml2-2.7.7.zip
lua-5.1.5.zip
pcre-8.30.zip
zlib-1.2.7.zip
Modify c:\work\build.bat accordingly (if other versions were used)
8. Open cmd.exe window, go to c:\work and run buildall.bat
9. When done, the binaries, lib and pdb files should appear under c:\drop\x86 (32-bit) and c:\drop\amd64 (64-bit)
10. Open the VS ModSecurity IIS installer project
11. Copy new binaries to the installer's x86 and amd64 directories
12. Build installer from within VS

13
iis/winbuild/init.bat Normal file
View File

@@ -0,0 +1,13 @@
set PATH=%PATH%;c:\work\cmake-2.8.7-win32-x86\bin;"c:\program files\7-zip"
rem set BUILD_APACHE=YES
set HTTPD=httpd-2.2.22
IF NOT DEFINED BUILD_APACHE SET HTTPD=httpd-2.4.3
set WORK=c:\work
set APACHE=c:\Apache22
set PCRE=pcre-8.30
set ZLIB=zlib-1.2.7
set LIBXML2=libxml2-2.7.7
set LUA=lua-5.1.5
set CURL=curl-7.24.0

1917
iis/winbuild/libapr.mak Normal file

File diff suppressed because it is too large Load Diff

1465
iis/winbuild/libaprutil.mak Normal file

File diff suppressed because it is too large Load Diff

1052
iis/winbuild/libhttpd.mak Normal file

File diff suppressed because it is too large Load Diff

733
iis/winbuild/mod_ssl.mak Normal file
View File

@@ -0,0 +1,733 @@
# Microsoft Developer Studio Generated NMAKE File, Based on mod_ssl.dsp
!IF "$(CFG)" == ""
CFG=mod_ssl - Win32 Release
!MESSAGE No configuration specified. Defaulting to mod_ssl - Win32 Release.
!ENDIF
!IF "$(CFG)" != "mod_ssl - Win32 Release" && "$(CFG)" != "mod_ssl - Win32 Debug" && "$(CFG)" != "mod_ssl - Win32 Lexical"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mod_ssl.mak" CFG="mod_ssl - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mod_ssl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "mod_ssl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "mod_ssl - Win32 Lexical" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "mod_ssl - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
!ELSE
ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\mod_ssl.obj"
-@erase "$(INTDIR)\mod_ssl.res"
-@erase "$(INTDIR)\mod_ssl_src.idb"
-@erase "$(INTDIR)\mod_ssl_src.pdb"
-@erase "$(INTDIR)\ssl_engine_config.obj"
-@erase "$(INTDIR)\ssl_engine_dh.obj"
-@erase "$(INTDIR)\ssl_engine_init.obj"
-@erase "$(INTDIR)\ssl_engine_io.obj"
-@erase "$(INTDIR)\ssl_engine_kernel.obj"
-@erase "$(INTDIR)\ssl_engine_log.obj"
-@erase "$(INTDIR)\ssl_engine_mutex.obj"
-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
-@erase "$(INTDIR)\ssl_engine_rand.obj"
-@erase "$(INTDIR)\ssl_engine_vars.obj"
-@erase "$(INTDIR)\ssl_expr.obj"
-@erase "$(INTDIR)\ssl_expr_eval.obj"
-@erase "$(INTDIR)\ssl_expr_parse.obj"
-@erase "$(INTDIR)\ssl_expr_scan.obj"
-@erase "$(INTDIR)\ssl_scache.obj"
-@erase "$(INTDIR)\ssl_scache_dbm.obj"
-@erase "$(INTDIR)\ssl_scache_dc.obj"
-@erase "$(INTDIR)\ssl_scache_shmcb.obj"
-@erase "$(INTDIR)\ssl_util.obj"
-@erase "$(INTDIR)\ssl_util_ssl.obj"
-@erase "$(OUTDIR)\mod_ssl.exp"
-@erase "$(OUTDIR)\mod_ssl.lib"
-@erase "$(OUTDIR)\mod_ssl.pdb"
-@erase "$(OUTDIR)\mod_ssl.so"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so /opt:ref
LINK32_OBJS= \
"$(INTDIR)\mod_ssl.obj" \
"$(INTDIR)\ssl_engine_config.obj" \
"$(INTDIR)\ssl_engine_dh.obj" \
"$(INTDIR)\ssl_engine_init.obj" \
"$(INTDIR)\ssl_engine_io.obj" \
"$(INTDIR)\ssl_engine_kernel.obj" \
"$(INTDIR)\ssl_engine_log.obj" \
"$(INTDIR)\ssl_engine_mutex.obj" \
"$(INTDIR)\ssl_engine_pphrase.obj" \
"$(INTDIR)\ssl_engine_rand.obj" \
"$(INTDIR)\ssl_engine_vars.obj" \
"$(INTDIR)\ssl_expr.obj" \
"$(INTDIR)\ssl_expr_eval.obj" \
"$(INTDIR)\ssl_expr_parse.obj" \
"$(INTDIR)\ssl_expr_scan.obj" \
"$(INTDIR)\ssl_scache.obj" \
"$(INTDIR)\ssl_scache_dbm.obj" \
"$(INTDIR)\ssl_scache_shmcb.obj" \
"$(INTDIR)\ssl_scache_dc.obj" \
"$(INTDIR)\ssl_util.obj" \
"$(INTDIR)\ssl_util_ssl.obj" \
"$(INTDIR)\mod_ssl.res" \
"..\..\srclib\apr\Release\libapr-1.lib" \
"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
"..\..\Release\libhttpd.lib"
"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
TargetPath=.\Release\mod_ssl.so
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
if exist .\Release\mod_ssl.so.manifest mt.exe -manifest .\Release\mod_ssl.so.manifest -outputresource:.\Release\mod_ssl.so;2
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
!ELSE
ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\mod_ssl.obj"
-@erase "$(INTDIR)\mod_ssl.res"
-@erase "$(INTDIR)\mod_ssl_src.idb"
-@erase "$(INTDIR)\mod_ssl_src.pdb"
-@erase "$(INTDIR)\ssl_engine_config.obj"
-@erase "$(INTDIR)\ssl_engine_dh.obj"
-@erase "$(INTDIR)\ssl_engine_init.obj"
-@erase "$(INTDIR)\ssl_engine_io.obj"
-@erase "$(INTDIR)\ssl_engine_kernel.obj"
-@erase "$(INTDIR)\ssl_engine_log.obj"
-@erase "$(INTDIR)\ssl_engine_mutex.obj"
-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
-@erase "$(INTDIR)\ssl_engine_rand.obj"
-@erase "$(INTDIR)\ssl_engine_vars.obj"
-@erase "$(INTDIR)\ssl_expr.obj"
-@erase "$(INTDIR)\ssl_expr_eval.obj"
-@erase "$(INTDIR)\ssl_expr_parse.obj"
-@erase "$(INTDIR)\ssl_expr_scan.obj"
-@erase "$(INTDIR)\ssl_scache.obj"
-@erase "$(INTDIR)\ssl_scache_dbm.obj"
-@erase "$(INTDIR)\ssl_scache_dc.obj"
-@erase "$(INTDIR)\ssl_scache_shmcb.obj"
-@erase "$(INTDIR)\ssl_util.obj"
-@erase "$(INTDIR)\ssl_util_ssl.obj"
-@erase "$(OUTDIR)\mod_ssl.exp"
-@erase "$(OUTDIR)\mod_ssl.lib"
-@erase "$(OUTDIR)\mod_ssl.pdb"
-@erase "$(OUTDIR)\mod_ssl.so"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /EHsc /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll.dbg" /libpath:"../../srclib/openssl/out32.dbg" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so
LINK32_OBJS= \
"$(INTDIR)\mod_ssl.obj" \
"$(INTDIR)\ssl_engine_config.obj" \
"$(INTDIR)\ssl_engine_dh.obj" \
"$(INTDIR)\ssl_engine_init.obj" \
"$(INTDIR)\ssl_engine_io.obj" \
"$(INTDIR)\ssl_engine_kernel.obj" \
"$(INTDIR)\ssl_engine_log.obj" \
"$(INTDIR)\ssl_engine_mutex.obj" \
"$(INTDIR)\ssl_engine_pphrase.obj" \
"$(INTDIR)\ssl_engine_rand.obj" \
"$(INTDIR)\ssl_engine_vars.obj" \
"$(INTDIR)\ssl_expr.obj" \
"$(INTDIR)\ssl_expr_eval.obj" \
"$(INTDIR)\ssl_expr_parse.obj" \
"$(INTDIR)\ssl_expr_scan.obj" \
"$(INTDIR)\ssl_scache.obj" \
"$(INTDIR)\ssl_scache_dbm.obj" \
"$(INTDIR)\ssl_scache_shmcb.obj" \
"$(INTDIR)\ssl_scache_dc.obj" \
"$(INTDIR)\ssl_util.obj" \
"$(INTDIR)\ssl_util_ssl.obj" \
"$(INTDIR)\mod_ssl.res" \
"..\..\srclib\apr\Debug\libapr-1.lib" \
"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
"..\..\Debug\libhttpd.lib"
"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
TargetPath=.\Debug\mod_ssl.so
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
if exist .\Debug\mod_ssl.so.manifest mt.exe -manifest .\Debug\mod_ssl.so.manifest -outputresource:.\Debug\mod_ssl.so;2
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
OUTDIR=.\Release
INTDIR=.\Release
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : ".\ssl_expr_parse.h" ".\ssl_expr_parse.c" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
!ELSE
ALL : ".\ssl_expr_parse.h" ".\ssl_expr_parse.c" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\mod_ssl.obj"
-@erase "$(INTDIR)\mod_ssl.res"
-@erase "$(INTDIR)\mod_ssl_src.idb"
-@erase "$(INTDIR)\mod_ssl_src.pdb"
-@erase "$(INTDIR)\ssl_engine_config.obj"
-@erase "$(INTDIR)\ssl_engine_dh.obj"
-@erase "$(INTDIR)\ssl_engine_init.obj"
-@erase "$(INTDIR)\ssl_engine_io.obj"
-@erase "$(INTDIR)\ssl_engine_kernel.obj"
-@erase "$(INTDIR)\ssl_engine_log.obj"
-@erase "$(INTDIR)\ssl_engine_mutex.obj"
-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
-@erase "$(INTDIR)\ssl_engine_rand.obj"
-@erase "$(INTDIR)\ssl_engine_vars.obj"
-@erase "$(INTDIR)\ssl_expr.obj"
-@erase "$(INTDIR)\ssl_expr_eval.obj"
-@erase "$(INTDIR)\ssl_expr_parse.obj"
-@erase "$(INTDIR)\ssl_expr_scan.obj"
-@erase "$(INTDIR)\ssl_scache.obj"
-@erase "$(INTDIR)\ssl_scache_dbm.obj"
-@erase "$(INTDIR)\ssl_scache_dc.obj"
-@erase "$(INTDIR)\ssl_scache_shmcb.obj"
-@erase "$(INTDIR)\ssl_util.obj"
-@erase "$(INTDIR)\ssl_util_ssl.obj"
-@erase "$(OUTDIR)\mod_ssl.exp"
-@erase "$(OUTDIR)\mod_ssl.lib"
-@erase "$(OUTDIR)\mod_ssl.pdb"
-@erase "$(OUTDIR)\mod_ssl.so"
-@erase "ssl_expr_parse.c"
-@erase "ssl_expr_parse.h"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so /opt:ref
LINK32_OBJS= \
"$(INTDIR)\mod_ssl.obj" \
"$(INTDIR)\ssl_engine_config.obj" \
"$(INTDIR)\ssl_engine_dh.obj" \
"$(INTDIR)\ssl_engine_init.obj" \
"$(INTDIR)\ssl_engine_io.obj" \
"$(INTDIR)\ssl_engine_kernel.obj" \
"$(INTDIR)\ssl_engine_log.obj" \
"$(INTDIR)\ssl_engine_mutex.obj" \
"$(INTDIR)\ssl_engine_pphrase.obj" \
"$(INTDIR)\ssl_engine_rand.obj" \
"$(INTDIR)\ssl_engine_vars.obj" \
"$(INTDIR)\ssl_expr.obj" \
"$(INTDIR)\ssl_expr_eval.obj" \
"$(INTDIR)\ssl_expr_parse.obj" \
"$(INTDIR)\ssl_expr_scan.obj" \
"$(INTDIR)\ssl_scache.obj" \
"$(INTDIR)\ssl_scache_dbm.obj" \
"$(INTDIR)\ssl_scache_shmcb.obj" \
"$(INTDIR)\ssl_scache_dc.obj" \
"$(INTDIR)\ssl_util.obj" \
"$(INTDIR)\ssl_util_ssl.obj" \
"$(INTDIR)\mod_ssl.res"
"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
TargetPath=.\Release\mod_ssl.so
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
if exist .\Release\mod_ssl.so.manifest mt.exe -manifest .\Release\mod_ssl.so.manifest -outputresource:.\Release\mod_ssl.so;2
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("mod_ssl.dep")
!INCLUDE "mod_ssl.dep"
!ELSE
!MESSAGE Warning: cannot find "mod_ssl.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "mod_ssl - Win32 Release" || "$(CFG)" == "mod_ssl - Win32 Debug" || "$(CFG)" == "mod_ssl - Win32 Lexical"
SOURCE=.\mod_ssl.c
"$(INTDIR)\mod_ssl.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_config.c
"$(INTDIR)\ssl_engine_config.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_dh.c
"$(INTDIR)\ssl_engine_dh.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_init.c
"$(INTDIR)\ssl_engine_init.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_io.c
"$(INTDIR)\ssl_engine_io.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_kernel.c
"$(INTDIR)\ssl_engine_kernel.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_log.c
"$(INTDIR)\ssl_engine_log.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_mutex.c
"$(INTDIR)\ssl_engine_mutex.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_pphrase.c
"$(INTDIR)\ssl_engine_pphrase.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_rand.c
"$(INTDIR)\ssl_engine_rand.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_engine_vars.c
"$(INTDIR)\ssl_engine_vars.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_expr.c
"$(INTDIR)\ssl_expr.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_expr_eval.c
"$(INTDIR)\ssl_expr_eval.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_expr_parse.c
"$(INTDIR)\ssl_expr_parse.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_expr_scan.c
"$(INTDIR)\ssl_expr_scan.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_scache.c
"$(INTDIR)\ssl_scache.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_scache_dbm.c
"$(INTDIR)\ssl_scache_dbm.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_scache_dc.c
"$(INTDIR)\ssl_scache_dc.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_scache_shmcb.c
"$(INTDIR)\ssl_scache_shmcb.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_util.c
"$(INTDIR)\ssl_util.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_util_ssl.c
"$(INTDIR)\ssl_util_ssl.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\ssl_expr_parse.y
!IF "$(CFG)" == "mod_ssl - Win32 Release"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
InputPath=.\ssl_expr_parse.y
".\ssl_expr_parse.c" ".\ssl_expr_parse.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile77.bat
@echo off
bison -y -d ssl_expr_parse.y
sed -e "s;yy;ssl_expr_yy;g" -e "/#if defined(c_plusplus) || defined(__cplusplus)/,/#endif/d" <y.tab.c >ssl_expr_parse.c
del y.tab.c
sed -e "s;yy;ssl_expr_yy;g" <y.tab.h >ssl_expr_parse.h
del y.tab.h
<<
!ENDIF
SOURCE=.\ssl_expr_scan.l
!IF "$(CFG)" == "mod_ssl - Win32 Release"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
InputPath=.\ssl_expr_scan.l
".\ssl_expr_scan.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile78.bat
@echo off
flex -Pssl_expr_yy -s -B ssl_expr_scan.l
sed -e "/$$Header:/d" <lex.ssl_expr_yy.c >ssl_expr_scan.c
del lex.ssl_expr_yy.c
<<
!ENDIF
!IF "$(CFG)" == "mod_ssl - Win32 Release"
"libapr - Win32 Release" :
cd ".\..\..\srclib\apr"
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release"
cd "..\..\modules\ssl"
"libapr - Win32 ReleaseCLEAN" :
cd ".\..\..\srclib\apr"
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN
cd "..\..\modules\ssl"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
"libapr - Win32 Debug" :
cd ".\..\..\srclib\apr"
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug"
cd "..\..\modules\ssl"
"libapr - Win32 DebugCLEAN" :
cd ".\..\..\srclib\apr"
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\modules\ssl"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
!ENDIF
!IF "$(CFG)" == "mod_ssl - Win32 Release"
"libaprutil - Win32 Release" :
cd ".\..\..\srclib\apr-util"
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release"
cd "..\..\modules\ssl"
"libaprutil - Win32 ReleaseCLEAN" :
cd ".\..\..\srclib\apr-util"
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN
cd "..\..\modules\ssl"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
"libaprutil - Win32 Debug" :
cd ".\..\..\srclib\apr-util"
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug"
cd "..\..\modules\ssl"
"libaprutil - Win32 DebugCLEAN" :
cd ".\..\..\srclib\apr-util"
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\modules\ssl"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
!ENDIF
!IF "$(CFG)" == "mod_ssl - Win32 Release"
"libhttpd - Win32 Release" :
cd ".\..\.."
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release"
cd ".\modules\ssl"
"libhttpd - Win32 ReleaseCLEAN" :
cd ".\..\.."
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN
cd ".\modules\ssl"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
"libhttpd - Win32 Debug" :
cd ".\..\.."
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug"
cd ".\modules\ssl"
"libhttpd - Win32 DebugCLEAN" :
cd ".\..\.."
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN
cd ".\modules\ssl"
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
!ENDIF
SOURCE=..\..\build\win32\httpd.rc
!IF "$(CFG)" == "mod_ssl - Win32 Release"
"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i ".\..\..\build\win32" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i ".\..\..\build\win32" /d "_DEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i ".\..\..\build\win32" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
!ENDIF
!ENDIF

340
iis/winbuild/pcre.mak Normal file
View File

@@ -0,0 +1,340 @@
# Microsoft Developer Studio Generated NMAKE File, Based on pcre.dsp
!IF "$(CFG)" == ""
CFG=pcre - Win32 Debug
!MESSAGE No configuration specified. Defaulting to pcre - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "pcre - Win32 Release" && "$(CFG)" != "pcre - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "pcre.mak" CFG="pcre - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "pcre - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "pcre - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "pcre - Win32 Release"
OUTDIR=.\LibR
INTDIR=.\LibR
# Begin Custom Macros
OutDir=.\LibR
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "$(OUTDIR)\pcre.lib"
!ELSE
ALL : "dftables - Win32 Release" "$(OUTDIR)\pcre.lib"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"dftables - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\get.obj"
-@erase "$(INTDIR)\maketables.obj"
-@erase "$(INTDIR)\pcre.obj"
-@erase "$(INTDIR)\pcre_src.idb"
-@erase "$(INTDIR)\pcre_src.pdb"
-@erase "$(INTDIR)\study.obj"
-@erase "$(OUTDIR)\pcre.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /D "_WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PCRE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\pcre_src" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\pcre.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\pcre.lib"
LIB32_OBJS= \
"$(INTDIR)\get.obj" \
"$(INTDIR)\maketables.obj" \
"$(INTDIR)\pcre.obj" \
"$(INTDIR)\study.obj"
"$(OUTDIR)\pcre.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
OUTDIR=.\LibD
INTDIR=.\LibD
# Begin Custom Macros
OutDir=.\LibD
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : ".\pcre.h" ".\config.h" ".\chartables.c" "$(OUTDIR)\pcre.lib"
!ELSE
ALL : "dftables - Win32 Debug" ".\pcre.h" ".\config.h" ".\chartables.c" "$(OUTDIR)\pcre.lib"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"dftables - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\get.obj"
-@erase "$(INTDIR)\maketables.obj"
-@erase "$(INTDIR)\pcre.obj"
-@erase "$(INTDIR)\pcre_src.idb"
-@erase "$(INTDIR)\pcre_src.pdb"
-@erase "$(INTDIR)\study.obj"
-@erase "$(OUTDIR)\pcre.lib"
-@erase ".\chartables.c"
-@erase ".\config.h"
-@erase ".\pcre.h"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /D "_WIN32" /D "_DEBUG" /D "_WINDOWS" /D "PCRE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\pcre_src" /FD /EHsc /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\pcre.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\pcre.lib"
LIB32_OBJS= \
"$(INTDIR)\get.obj" \
"$(INTDIR)\maketables.obj" \
"$(INTDIR)\pcre.obj" \
"$(INTDIR)\study.obj"
"$(OUTDIR)\pcre.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("pcre.dep")
!INCLUDE "pcre.dep"
!ELSE
!MESSAGE Warning: cannot find "pcre.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "pcre - Win32 Release" || "$(CFG)" == "pcre - Win32 Debug"
SOURCE=.\dftables.exe
!IF "$(CFG)" == "pcre - Win32 Release"
InputPath=.\dftables.exe
".\chartables.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile79.bat
@echo off
.\dftables.exe chartables.c
<<
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
InputPath=.\dftables.exe
".\chartables.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile80.bat
@echo off
.\dftables.exe chartables.c
<<
!ENDIF
SOURCE=.\get.c
"$(INTDIR)\get.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
SOURCE=.\maketables.c
"$(INTDIR)\maketables.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
SOURCE=.\pcre.c
"$(INTDIR)\pcre.obj" : $(SOURCE) "$(INTDIR)" ".\chartables.c" ".\config.h" ".\pcre.h"
SOURCE=.\study.c
"$(INTDIR)\study.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
SOURCE=.\config.hw
!IF "$(CFG)" == "pcre - Win32 Release"
InputPath=.\config.hw
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile81.bat
@echo off
type .\config.hw > .\config.h
<<
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
InputPath=.\config.hw
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile82.bat
@echo off
type .\config.hw > .\config.h
<<
!ENDIF
SOURCE=.\pcre.hw
!IF "$(CFG)" == "pcre - Win32 Release"
InputPath=.\pcre.hw
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile83.bat
@echo off
type .\pcre.hw > .\pcre.h
<<
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
InputPath=.\pcre.hw
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile84.bat
@echo off
type .\pcre.hw > .\pcre.h
<<
!ENDIF
!IF "$(CFG)" == "pcre - Win32 Release"
"dftables - Win32 Release" :
cd "."
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Release"
cd "."
"dftables - Win32 ReleaseCLEAN" :
cd "."
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Release" RECURSE=1 CLEAN
cd "."
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
"dftables - Win32 Debug" :
cd "."
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Debug"
cd "."
"dftables - Win32 DebugCLEAN" :
cd "."
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Debug" RECURSE=1 CLEAN
cd "."
!ENDIF
!ENDIF

113
iis/winbuild/vcvars64.bat Normal file
View File

@@ -0,0 +1,113 @@
@echo Setting environment for using Microsoft Visual Studio 2010 x64 tools.
@call :GetVSCommonToolsDir
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" No32bit 64bit
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR
@if "%FrameworkDir64%"=="" goto error_no_FrameworkDIR64
@if "%FrameworkVersion64%"=="" goto error_no_FrameworkVer64
@if "%Framework35Version%"=="" goto error_no_Framework35Version
@set FrameworkDir=%FrameworkDir64%
@set FrameworkVersion=%FrameworkVersion64%
@if not "%WindowsSdkDir%" == "" (
@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools\x64;%WindowsSdkDir%bin\x64;%WindowsSdkDir%bin;%PATH%"
@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
@set "LIB=%WindowsSdkDir%lib\x64;%LIB%"
)
@rem PATH
@rem ----
@if exist "%VSINSTALLDIR%Team Tools\Performance Tools\x64" (
@set "PATH=%VSINSTALLDIR%Team Tools\Performance Tools\x64;%VSINSTALLDIR%Team Tools\Performance Tools;%PATH%"
)
@if exist "%ProgramFiles%\HTML Help Workshop" set PATH=%ProgramFiles%\HTML Help Workshop;%PATH%
@if exist "%ProgramFiles(x86)%\HTML Help Workshop" set PATH=%ProgramFiles(x86)%\HTML Help Workshop;%PATH%
@set PATH=%VSINSTALLDIR%Common7\Tools;%PATH%
@set PATH=%VSINSTALLDIR%Common7\IDE;%PATH%
@set PATH=%VCINSTALLDIR%VCPackages;%PATH%
@set PATH=%FrameworkDir%\%Framework35Version%;%PATH%
@set PATH=%FrameworkDir%\%FrameworkVersion%;%PATH%
@set PATH=%VCINSTALLDIR%BIN\amd64;%PATH%
@rem INCLUDE
@rem -------
@if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%
@set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
@rem LIB
@rem ---
@if exist "%VCINSTALLDIR%ATLMFC\LIB\amd64" set LIB=%VCINSTALLDIR%ATLMFC\LIB\amd64;%LIB%
@set LIB=%VCINSTALLDIR%LIB\amd64;%LIB%
@rem LIBPATH
@rem -------
@if exist "%VCINSTALLDIR%ATLMFC\LIB\amd64" set LIBPATH=%VCINSTALLDIR%ATLMFC\LIB\amd64;%LIBPATH%
@set LIBPATH=%VCINSTALLDIR%LIB\amd64;%LIBPATH%
@set LIBPATH=%FrameworkDir%\%Framework35Version%;%LIBPATH%
@set LIBPATH=%FrameworkDir%\%FrameworkVersion%;%LIBPATH%
@set Platform=X64
@set CommandPromptType=Native
@goto end
@REM -----------------------------------------------------------------------
:GetVSCommonToolsDir
@set VS100COMNTOOLS=
@call :GetVSCommonToolsDirHelper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKCU > nul 2>&1
@exit /B 0
:GetVSCommonToolsDirHelper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VS100COMNTOOLS=%%k"
)
)
@if "%VS100COMNTOOLS%"=="" exit /B 1
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
@exit /B 0
:GetVSCommonToolsDirHelper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VS100COMNTOOLS=%%k"
)
)
@if "%VS100COMNTOOLS%"=="" exit /B 1
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
@exit /B 0
@REM -----------------------------------------------------------------------
:error_no_VS100COMNTOOLSDIR
@echo ERROR: Cannot determine the location of the VS Common Tools folder.
@goto end
:error_no_VSINSTALLDIR
@echo ERROR: Cannot determine the location of the VS installation.
@goto end
:error_no_VCINSTALLDIR
@echo ERROR: Cannot determine the location of the VC installation.
@goto end
:error_no_FrameworkDIR64
@echo ERROR: Cannot determine the location of the .NET Framework 64bit installation.
@goto end
:error_no_FrameworkVer64
@echo ERROR: Cannot determine the version of the .NET Framework 64bit installation.
@goto end
:error_no_Framework35Version
@echo ERROR: Cannot determine the .NET Framework 3.5 version.
@goto end
:end

118
iis/winbuild/vsvars32.bat Normal file
View File

@@ -0,0 +1,118 @@
@echo Setting environment for using Microsoft Visual Studio 2010 x86 tools.
@call :GetVSCommonToolsDir
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
@if "%FrameworkDir32%"=="" goto error_no_FrameworkDIR32
@if "%FrameworkVersion32%"=="" goto error_no_FrameworkVer32
@if "%Framework35Version%"=="" goto error_no_Framework35Version
@set FrameworkDir=%FrameworkDir32%
@set FrameworkVersion=%FrameworkVersion32%
@if not "%WindowsSdkDir%" == "" (
@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools;%WindowsSdkDir%bin;%PATH%"
@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
@set "LIB=%WindowsSdkDir%lib;%LIB%"
)
@rem
@rem Root of Visual Studio IDE installed files.
@rem
@set DevEnvDir=%VSINSTALLDIR%Common7\IDE\
@rem PATH
@rem ----
@if exist "%VSINSTALLDIR%Team Tools\Performance Tools" (
@set "PATH=%VSINSTALLDIR%Team Tools\Performance Tools;%PATH%"
)
@if exist "%ProgramFiles%\HTML Help Workshop" set PATH=%ProgramFiles%\HTML Help Workshop;%PATH%
@if exist "%ProgramFiles(x86)%\HTML Help Workshop" set PATH=%ProgramFiles(x86)%\HTML Help Workshop;%PATH%
@if exist "%VCINSTALLDIR%VCPackages" set PATH=%VCINSTALLDIR%VCPackages;%PATH%
@set PATH=%FrameworkDir%%Framework35Version%;%PATH%
@set PATH=%FrameworkDir%%FrameworkVersion%;%PATH%
@set PATH=%VSINSTALLDIR%Common7\Tools;%PATH%
@if exist "%VCINSTALLDIR%BIN" set PATH=%VCINSTALLDIR%BIN;%PATH%
@set PATH=%DevEnvDir%;%PATH%
@if exist "%VSINSTALLDIR%VSTSDB\Deploy" (
@set "PATH=%VSINSTALLDIR%VSTSDB\Deploy;%PATH%"
)
@if not "%FSHARPINSTALLDIR%" == "" (
@set "PATH=%FSHARPINSTALLDIR%;%PATH%"
)
@rem INCLUDE
@rem -------
@if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%
@if exist "%VCINSTALLDIR%INCLUDE" set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
@rem LIB
@rem ---
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIB=%VCINSTALLDIR%ATLMFC\LIB;%LIB%
@if exist "%VCINSTALLDIR%LIB" set LIB=%VCINSTALLDIR%LIB;%LIB%
@rem LIBPATH
@rem -------
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIBPATH=%VCINSTALLDIR%ATLMFC\LIB;%LIBPATH%
@if exist "%VCINSTALLDIR%LIB" set LIBPATH=%VCINSTALLDIR%LIB;%LIBPATH%
@set LIBPATH=%FrameworkDir%%Framework35Version%;%LIBPATH%
@set LIBPATH=%FrameworkDir%%FrameworkVersion%;%LIBPATH%
@goto end
@REM -----------------------------------------------------------------------
:GetVSCommonToolsDir
@set VS100COMNTOOLS=
@call :GetVSCommonToolsDirHelper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKCU > nul 2>&1
@exit /B 0
:GetVSCommonToolsDirHelper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VS100COMNTOOLS=%%k"
)
)
@if "%VS100COMNTOOLS%"=="" exit /B 1
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
@exit /B 0
:GetVSCommonToolsDirHelper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VS100COMNTOOLS=%%k"
)
)
@if "%VS100COMNTOOLS%"=="" exit /B 1
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
@exit /B 0
@REM -----------------------------------------------------------------------
:error_no_VS100COMNTOOLSDIR
@echo ERROR: Cannot determine the location of the VS Common Tools folder.
@goto end
:error_no_VSINSTALLDIR
@echo ERROR: Cannot determine the location of the VS installation.
@goto end
:error_no_FrameworkDIR32
@echo ERROR: Cannot determine the location of the .NET Framework 32bit installation.
@goto end
:error_no_FrameworkVer32
@echo ERROR: Cannot determine the version of the .NET Framework 32bit installation.
@goto end
:error_no_Framework35Version
@echo ERROR: Cannot determine the .NET Framework 3.5 version.
@goto end
:end

View File

@@ -4,17 +4,17 @@
###########################################################################
# Path to Apache httpd installation
BASE = C:\Apache2
BASE = %APACHE%
# Paths to required libraries
PCRE = C:\work\pcre-7.0-lib
CURL = C:\work\libcurl-7.19.3-win32-ssl-msvc
PCRE = %PCRE%
CURL = %CURL%
# Linking libraries
LIBS = $(BASE)\lib\libapr-1.lib \
$(BASE)\lib\libaprutil-1.lib \
$(PCRE)\lib\pcre.lib \
$(CURL)\lib\Release\curllib.lib \
$(PCRE)\pcre.lib \
$(CURL)\libcurl_imp.lib \
wsock32.lib
###########################################################################
@@ -24,11 +24,11 @@ CC = cL
MT = mt
DEFS = /nologo /O2 /W3 -DWIN32 -DWINNT -Dinline=APR_INLINE -D_CONSOLE
DEFS = /nologo /O2 /W3 -DWIN32 -DWINNT -Dinline=APR_INLINE -D_CONSOLE -D$(VERSION)
EXE = mlogc.exe
INCLUDES = -I. -I.. \
INCLUDES = -I. -I..\apache2 \
-I$(PCRE)\include -I$(PCRE) \
-I$(CURL)\include -I$(CURL) \
-I$(BASE)\include

15
nginx/TODO Normal file
View File

@@ -0,0 +1,15 @@
Modsecurity NGINX TODO
* Code Cleanup
* Create a method for action DROP as in Apache
* Add CRS Support
* Specific NGINX config file
* Separate nginx/ IIS/ apache/ and generic/ folders
* Source code documentation (insert doxygen headers)
* Create better build infrastructure with support for tests and automated regression

6
nginx/modsecurity/config Normal file
View File

@@ -0,0 +1,6 @@
ngx_addon_name=ngx_http_modsecurity_module
HTTP_MODULES="$HTTP_MODULES ngx_http_modsecurity_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_modsecurity_module.c"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS"
CORE_LIBS="$CORE_LIBS $ngx_addon_dir/../../standalone/.libs/standalone.a -lapr-1 -laprutil-1 -lxml2 -lm"
CORE_INCS="$CORE_INCS /usr/include/apache2 /usr/include/apr-1.0 $ngx_addon_dir/../../standalone $ngx_addon_dir/../../apache2 /usr/include/libxml2"

View File

@@ -0,0 +1,438 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#include <nginx.h>
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <ngx_event.h>
#include <ngx_http_core_module.h>
#include <ctype.h>
#include <sys/times.h>
#undef CR
#undef LF
#undef CRLF
#include "api.h"
extern ngx_module_t ngx_http_modsecurity_module;
typedef struct {
ngx_flag_t enabled;
char *config_path;
directory_config *config;
} ngx_http_modsecurity_loc_conf_t;
typedef struct {
conn_rec *connection;
} ngx_http_modsecurity_ctx_t;
/*
** Module's registred function/handlers.
*/
static ngx_int_t ngx_http_modsecurity_handler(ngx_http_request_t *r);
static ngx_int_t ngx_http_modsecurity_init(ngx_conf_t *cf);
static ngx_int_t ngx_http_modsecurity_init_process(ngx_cycle_t *cycle);
static void ngx_http_modsecurity_exit_process(ngx_cycle_t *cycle);
static void *ngx_http_modsecurity_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_modsecurity_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child);
//static ngx_int_t ngx_http_read_request_body(ngx_http_request_t *req, ngx_http_client_body_handler_pt handler);
static char *ngx_http_modsecurity_set_config(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
/* command handled by the module */
static ngx_command_t ngx_http_modsecurity_commands[] = {
{ ngx_string("ModSecurityConfig"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
#ifdef zzz_
ngx_http_modsecurity_set_config,
NGX_HTTP_LOC_CONF_OFFSET,
0,
#else
ngx_conf_set_str_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_modsecurity_loc_conf_t, config_path),
#endif
NULL },
{ ngx_string("ModSecurityEnabled"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF
|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
ngx_conf_set_flag_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_modsecurity_loc_conf_t, enabled),
NULL },
ngx_null_command
};
/*
** handlers for configuration phases of the module
*/
static ngx_http_module_t ngx_http_modsecurity_module_ctx = {
NULL, /* preconfiguration */
ngx_http_modsecurity_init, /* postconfiguration */
NULL, /* create main configuration */
NULL, /* init main configuration */
NULL, /* create server configuration */
NULL, /* merge server configuration */
ngx_http_modsecurity_create_loc_conf, /* create location configuration */
ngx_http_modsecurity_merge_loc_conf /* merge location configuration */
};
ngx_module_t ngx_http_modsecurity_module = {
NGX_MODULE_V1,
&ngx_http_modsecurity_module_ctx, /* module context */
ngx_http_modsecurity_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
NULL, /* init master */
NULL, /* init module */
ngx_http_modsecurity_init_process, /* init process */
NULL, /* init thread */
NULL, /* exit thread */
ngx_http_modsecurity_exit_process, /* exit process */
NULL, /* exit master */
NGX_MODULE_V1_PADDING
};
/* create loc conf struct */
static void *
ngx_http_modsecurity_create_loc_conf(ngx_conf_t *cf)
{
ngx_http_modsecurity_loc_conf_t *conf;
conf = (ngx_http_modsecurity_loc_conf_t *) ngx_pcalloc(cf->pool, sizeof(ngx_http_modsecurity_loc_conf_t));
if (conf == NULL)
return NULL;
conf->enabled = NGX_CONF_UNSET;
conf->config_path = NULL;
conf->config = NULL;
return conf;
}
/* merge loc conf */
static char *
ngx_http_modsecurity_merge_loc_conf(ngx_conf_t *cf, void *parent,
void *child)
{
ngx_http_modsecurity_loc_conf_t *prev = parent;
ngx_http_modsecurity_loc_conf_t *conf = child;
ngx_conf_merge_value(conf->enabled, prev->enabled, 0);
if (conf->config == NULL) {
conf->config = prev->config;
}
if (conf->config_path == NULL) {
conf->config_path = prev->config_path;
}
// ngx_conf_log_error(NGX_LOG_DEBUG_HTTP, cf, 0,
// "merging loc conf: %s", conf->config_path);
return NGX_CONF_OK;
}
void
modsecLog(void *obj, int level, char *str)
{
if (obj != NULL)
ngx_log_error(NGX_LOG_INFO, (ngx_log_t *)obj, 0, "%s", str);
}
/*
** This function sets up handlers for PRE_ACCESS_PHASE,
*/
static ngx_int_t
ngx_http_modsecurity_init(ngx_conf_t *cf)
{
ngx_http_handler_pt *h;
ngx_http_core_main_conf_t *cmcf;
cmcf = (ngx_http_core_main_conf_t *) ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
if (cmcf == NULL) {
return NGX_ERROR;
}
/* Register for pre access phase */
h = ngx_array_push(&cmcf->phases[NGX_HTTP_PRE_ACCESS_PHASE].handlers);
if (h == NULL) {
return NGX_ERROR;
}
*h = ngx_http_modsecurity_handler;
return NGX_OK;
}
static ngx_int_t
ngx_http_modsecurity_init_process(ngx_cycle_t *cycle)
{
cycle->log->log_level = NGX_LOG_INFO;
modsecSetLogHook(cycle->log, modsecLog);
modsecInit();
modsecStartConfig();
modsecFinalizeConfig();
modsecInitProcess();
return NGX_OK;
}
static void
ngx_http_modsecurity_exit_process(ngx_cycle_t *cycle)
{
// we are exiting process anyway and if the request was not finished properly
// the pool cleanup function for ModSecurity might break the termination process
//
//modsecTerminate();
}
/* This is a temporary hack to make PCRE work with ModSecurity
** nginx hijacks pcre_malloc and pcre_free, so we have to re-hijack them
*/
extern apr_pool_t *pool;
void *
modsec_pcre_malloc(size_t size)
{
return apr_palloc(pool, size);
}
void
modsec_pcre_free(void *ptr)
{
}
char *
ConvertNgxStringToUTF8(ngx_str_t str, apr_pool_t *pool)
{
char *t = (char *) apr_palloc(pool, str.len + 1);
ngx_memcpy(t, str.data, str.len);
t[str.len] = 0;
return t;
}
/*
** Create payload handler for calling request body function
*/
void
ngx_http_dummy_payload_handler(ngx_http_request_t *req)
{
ngx_http_finalize_request(req, NGX_DONE);
}
/*
* XXX: needs rewrite and testing
** If method is POST or PUT, read request body and put in req->request_body->bufs
*/
#ifdef zz
static ngx_int_t
ngx_http_read_request_body(ngx_http_request_t *req,
ngx_http_client_body_handler_pt handler)
{
// If has body request treat it
ngx_int_t rc = 0;
if (req->method == NGX_HTTP_POST || req->method==NGX_HTTP_PUT) {
//calling request body function
rc = ngx_http_read_client_request_body(req, ngx_http_dummy_payload_handler);
}
//If some error, returns rc
if (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE) {
return rc;
}
//Has the end of request body?
if (rc == NGX_AGAIN) {
return NGX_DONE;
}
return NGX_DECLINED;
}
#endif
/*
** [ENTRY POINT] does : this function called by nginx from the request handler
*/
static ngx_int_t
ngx_http_modsecurity_handler(ngx_http_request_t *req)
{
ngx_http_modsecurity_loc_conf_t *cf;
ngx_http_modsecurity_ctx_t *ctx;
request_rec *r;
ngx_list_part_t *part;
ngx_table_elt_t *h;
ngx_uint_t i;
int status;
conn_rec *connection;
const char *msg;
/* Process only main request */
if (req != req->main || req->internal) {
return NGX_DECLINED;
}
cf = ngx_http_get_module_loc_conf(req, ngx_http_modsecurity_module);
if (!cf) {
return NGX_ERROR;
}
if (!cf->enabled) {
return NGX_DECLINED;
}
/* XXX: temporary hack, nginx uses pcre as well and hijacks these two */
pcre_malloc = modsec_pcre_malloc;
pcre_free = modsec_pcre_free;
ctx = ngx_http_get_module_ctx(req, ngx_http_modsecurity_module);
if (ctx == NULL) {
ctx = (ngx_http_modsecurity_ctx_t *) ngx_pcalloc(req->pool, sizeof(ngx_http_modsecurity_ctx_t));
if (ctx == NULL) {
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "ModSecurity: ctx memory allocation error");
return NGX_ERROR;
}
ngx_http_set_ctx(req, ctx, ngx_http_modsecurity_module);
}
if (cf->config == NULL) {
cf->config = modsecGetDefaultConfig();
msg = modsecProcessConfig(cf->config, cf->config_path);
if (msg != NULL) {
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "ModSecurity: modsecProcessConfig() %s", msg);
return NGX_ERROR;
}
}
if (req->connection->requests == 0 || ctx->connection == NULL) {
ctx->connection = modsecNewConnection();
modsecProcessConnection(ctx->connection);
}
r = modsecNewRequest(ctx->connection, cf->config);
r->request_time = apr_time_now();
r->method = ConvertNgxStringToUTF8(req->method_name, r->pool);
r->path_info = ConvertNgxStringToUTF8(req->unparsed_uri, r->pool);
r->unparsed_uri = ConvertNgxStringToUTF8(req->unparsed_uri, r->pool);
r->uri = r->unparsed_uri;
r->the_request = ConvertNgxStringToUTF8(req->request_line, r->pool);
r->args = ConvertNgxStringToUTF8(req->args, r->pool);
r->filename = r->path_info;
r->parsed_uri.scheme = "http";
r->parsed_uri.path = r->path_info;
r->parsed_uri.is_initialized = 1;
r->parsed_uri.port = 80;
r->parsed_uri.port_str = "80";
r->parsed_uri.query = r->args;
r->parsed_uri.dns_looked_up = 0;
r->parsed_uri.dns_resolved = 0;
r->parsed_uri.password = NULL;
r->parsed_uri.user = NULL;
r->parsed_uri.fragment = ConvertNgxStringToUTF8(req->exten, r->pool);
part = &req->headers_in.headers.part;
h = part->elts;
for (i = 0; ; i++) {
if (i >= part->nelts) {
if (part->next == NULL)
break;
part = part->next;
h = part->elts;
i = 0;
}
apr_table_setn(r->headers_in, ConvertNgxStringToUTF8(h[i].key, r->pool),
ConvertNgxStringToUTF8(h[i].value, r->pool));
}
apr_table_setn(r->subprocess_env, "UNIQUE_ID", "12345");
/*
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "ModSecurity: %s", r->uri);
*/
/* XXX: need correct request body handler */
/*
ngx_http_read_request_body(req, ngx_http_dummy_payload_handler);
if (req->headers_in.content_length) {
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "request body: %s", req->request_body->bufs);
} else {
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "request body: ");
}
*/
status = modsecProcessRequest(r);
modsecFinishRequest(r);
if (status != DECLINED) {
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "ModSecurity: status: %d", status);
/* XXX: not implemented in standalone */
/*
ngx_http_clear_accept_ranges(req);
ngx_http_clear_last_modified(req);
ngx_http_clear_content_length(req);
return NGX_HTTP_INTERNAL_SERVER_ERROR;
*/
return NGX_DECLINED;
}
return NGX_DECLINED;
}
static char *
ngx_http_modsecurity_set_config(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
ngx_http_modsecurity_loc_conf_t *ucf = conf;
ngx_str_t *value;
value = cf->args->elts;
if (cf->args->nelts == 0 || value[1].len == 0) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"ModSecurity: config path required");
return NGX_CONF_ERROR;
}
/* not sure if we have to copy it in a buffed or use directly */
/* XXX: need to check if path is absolute or relative and exists */
ucf->config_path = (char *) ngx_pcalloc(cf->pool, value[1].len + 1);
if (ucf->config_path == NULL) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"ModSecurity: config path memory allocation error");
return NGX_CONF_ERROR;
}
ngx_memcpy(ucf->config_path, value[1].data, value[1].len);
return NGX_CONF_OK;
}

81
standalone/Makefile.am Normal file
View File

@@ -0,0 +1,81 @@
pkglibdir = $(prefix)/lib
pkglib_LTLIBRARIES = standalone.la
#include_HEADERS = re.h modsecurity.h msc_logging.h msc_multipart.h \
# msc_parsers.h msc_pcre.h msc_util.h msc_xml.h \
# persist_dbm.h apache2.h msc_geo.h acmp.h utf8tables.h \
# msc_lua.h msc_release.h
standalone_la_SOURCES = ../apache2/mod_security2.c \
../apache2/apache2_config.c ../apache2/apache2_io.c ../apache2/apache2_util.c \
../apache2/re.c ../apache2/re_operators.c ../apache2/re_actions.c ../apache2/re_tfns.c \
../apache2/re_variables.c ../apache2/msc_logging.c ../apache2/msc_xml.c \
../apache2/msc_multipart.c ../apache2/modsecurity.c ../apache2/msc_parsers.c \
../apache2/msc_util.c ../apache2/msc_pcre.c ../apache2/persist_dbm.c ../apache2/msc_reqbody.c \
../apache2/msc_geo.c ../apache2/msc_gsb.c ../apache2/msc_unicode.c \
../apache2/acmp.c ../apache2/msc_lua.c ../apache2/msc_release.c \
../apache2/msc_crypt.c ../apache2/msc_tree.c \
api.c buckets.c \
config.c filters.c \
hooks.c \
regex.c server.c
standalone_la_CFLAGS = @APXS_CFLAGS@ @APR_CFLAGS@ @APU_CFLAGS@ \
@PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @LUA_CFLAGS@ @MODSEC_EXTRA_CFLAGS@ @CURL_CFLAGS@ -DVERSION_NGINX
standalone_la_CPPFLAGS = @APR_CPPFLAGS@ @PCRE_CPPFLAGS@ @LIBXML2_CPPFLAGS@
standalone_la_LIBADD = @APR_LDADD@ @APU_LDADD@ @PCRE_LDADD@ @LIBXML2_LDADD@ @LUA_LDADD@
if AIX
standalone_la_LDFLAGS = -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
if HPUX
standalone_la_LDFLAGS = -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
if MACOSX
standalone_la_LDFLAGS = -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
if SOLARIS
standalone_la_LDFLAGS = -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
if LINUX
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
if FREEBSD
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
if OPENBSD
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
if NETBSD
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
endif
install-exec-hook: $(pkglib_LTLIBRARIES)
@echo "Removing unused static libraries..."; \
for m in $(pkglib_LTLIBRARIES); do \
base=`echo $$m | sed 's/\..*//'`; \
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(APXS_MODULES); \
done

933
standalone/Makefile.in Normal file
View File

@@ -0,0 +1,933 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = standalone
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/build/find_apr.m4 \
$(top_srcdir)/build/find_apu.m4 \
$(top_srcdir)/build/find_curl.m4 \
$(top_srcdir)/build/find_lua.m4 \
$(top_srcdir)/build/find_pcre.m4 \
$(top_srcdir)/build/find_xml.m4 $(top_srcdir)/build/libtool.m4 \
$(top_srcdir)/build/ltoptions.m4 \
$(top_srcdir)/build/ltsugar.m4 \
$(top_srcdir)/build/ltversion.m4 \
$(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/apache2/modsecurity_config_auto.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pkglibdir)"
LTLIBRARIES = $(pkglib_LTLIBRARIES)
standalone_la_DEPENDENCIES =
am_standalone_la_OBJECTS = standalone_la-mod_security2.lo \
standalone_la-apache2_config.lo standalone_la-apache2_io.lo \
standalone_la-apache2_util.lo standalone_la-re.lo \
standalone_la-re_operators.lo standalone_la-re_actions.lo \
standalone_la-re_tfns.lo standalone_la-re_variables.lo \
standalone_la-msc_logging.lo standalone_la-msc_xml.lo \
standalone_la-msc_multipart.lo standalone_la-modsecurity.lo \
standalone_la-msc_parsers.lo standalone_la-msc_util.lo \
standalone_la-msc_pcre.lo standalone_la-persist_dbm.lo \
standalone_la-msc_reqbody.lo standalone_la-msc_geo.lo \
standalone_la-msc_gsb.lo standalone_la-msc_unicode.lo \
standalone_la-acmp.lo standalone_la-msc_lua.lo \
standalone_la-msc_release.lo standalone_la-msc_crypt.lo \
standalone_la-msc_tree.lo standalone_la-api.lo \
standalone_la-buckets.lo standalone_la-config.lo \
standalone_la-filters.lo standalone_la-hooks.lo \
standalone_la-regex.lo standalone_la-server.lo
standalone_la_OBJECTS = $(am_standalone_la_OBJECTS)
standalone_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(standalone_la_CFLAGS) \
$(CFLAGS) $(standalone_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/apache2
depcomp = $(SHELL) $(top_srcdir)/build/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(standalone_la_SOURCES)
DIST_SOURCES = $(standalone_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibdir = $(prefix)/lib
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
APR_CFLAGS = @APR_CFLAGS@
APR_CONFIG = @APR_CONFIG@
APR_CPPFLAGS = @APR_CPPFLAGS@
APR_LDADD = @APR_LDADD@
APR_LDFLAGS = @APR_LDFLAGS@
APR_VERSION = @APR_VERSION@
APU_CFLAGS = @APU_CFLAGS@
APU_CONFIG = @APU_CONFIG@
APU_LDADD = @APU_LDADD@
APU_LDFLAGS = @APU_LDFLAGS@
APU_VERSION = @APU_VERSION@
APXS = @APXS@
APXS_BINDIR = @APXS_BINDIR@
APXS_CC = @APXS_CC@
APXS_CFLAGS = @APXS_CFLAGS@
APXS_EXTRA_CFLAGS = @APXS_EXTRA_CFLAGS@
APXS_HTTPD = @APXS_HTTPD@
APXS_INCLUDEDIR = @APXS_INCLUDEDIR@
APXS_INCLUDES = @APXS_INCLUDES@
APXS_LDFLAGS = @APXS_LDFLAGS@
APXS_LIBDIR = @APXS_LIBDIR@
APXS_LIBEXECDIR = @APXS_LIBEXECDIR@
APXS_LIBS = @APXS_LIBS@
APXS_LIBTOOL = @APXS_LIBTOOL@
APXS_MODULES = @APXS_MODULES@
APXS_PROGNAME = @APXS_PROGNAME@
APXS_SBINDIR = @APXS_SBINDIR@
APXS_WRAPPER = @APXS_WRAPPER@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURL_CFLAGS = @CURL_CFLAGS@
CURL_CONFIG = @CURL_CONFIG@
CURL_CPPFLAGS = @CURL_CPPFLAGS@
CURL_LDADD = @CURL_LDADD@
CURL_LDFLAGS = @CURL_LDFLAGS@
CURL_USES_GNUTLS = @CURL_USES_GNUTLS@
CURL_VERSION = @CURL_VERSION@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENV_CMD = @ENV_CMD@
EXEEXT = @EXEEXT@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_CONFIG = @LIBXML2_CONFIG@
LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@
LIBXML2_LDADD = @LIBXML2_LDADD@
LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@
LIBXML2_VERSION = @LIBXML2_VERSION@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LUA_CFLAGS = @LUA_CFLAGS@
LUA_LDADD = @LUA_LDADD@
LUA_LDFLAGS = @LUA_LDFLAGS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MODSEC_APXS_EXTRA_CFLAGS = @MODSEC_APXS_EXTRA_CFLAGS@
MODSEC_EXTRA_CFLAGS = @MODSEC_EXTRA_CFLAGS@
MSC_BASE_DIR = @MSC_BASE_DIR@
MSC_PKGBASE_DIR = @MSC_PKGBASE_DIR@
MSC_REGRESSION_CONF_DIR = @MSC_REGRESSION_CONF_DIR@
MSC_REGRESSION_DIR = @MSC_REGRESSION_DIR@
MSC_REGRESSION_DOCROOT_DIR = @MSC_REGRESSION_DOCROOT_DIR@
MSC_REGRESSION_LOGS_DIR = @MSC_REGRESSION_LOGS_DIR@
MSC_REGRESSION_SERVERROOT_DIR = @MSC_REGRESSION_SERVERROOT_DIR@
MSC_TEST_DIR = @MSC_TEST_DIR@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCRE_CFLAGS = @PCRE_CFLAGS@
PCRE_CONFIG = @PCRE_CONFIG@
PCRE_CPPFLAGS = @PCRE_CPPFLAGS@
PCRE_LDADD = @PCRE_LDADD@
PCRE_LDFLAGS = @PCRE_LDFLAGS@
PCRE_VERSION = @PCRE_VERSION@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TOPLEVEL_SUBDIRS = @TOPLEVEL_SUBDIRS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkglib_LTLIBRARIES = standalone.la
#include_HEADERS = re.h modsecurity.h msc_logging.h msc_multipart.h \
# msc_parsers.h msc_pcre.h msc_util.h msc_xml.h \
# persist_dbm.h apache2.h msc_geo.h acmp.h utf8tables.h \
# msc_lua.h msc_release.h
standalone_la_SOURCES = ../apache2/mod_security2.c \
../apache2/apache2_config.c ../apache2/apache2_io.c ../apache2/apache2_util.c \
../apache2/re.c ../apache2/re_operators.c ../apache2/re_actions.c ../apache2/re_tfns.c \
../apache2/re_variables.c ../apache2/msc_logging.c ../apache2/msc_xml.c \
../apache2/msc_multipart.c ../apache2/modsecurity.c ../apache2/msc_parsers.c \
../apache2/msc_util.c ../apache2/msc_pcre.c ../apache2/persist_dbm.c ../apache2/msc_reqbody.c \
../apache2/msc_geo.c ../apache2/msc_gsb.c ../apache2/msc_unicode.c \
../apache2/acmp.c ../apache2/msc_lua.c ../apache2/msc_release.c \
../apache2/msc_crypt.c ../apache2/msc_tree.c \
api.c buckets.c \
config.c filters.c \
hooks.c \
regex.c server.c
standalone_la_CFLAGS = @APXS_CFLAGS@ @APR_CFLAGS@ @APU_CFLAGS@ \
@PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @LUA_CFLAGS@ @MODSEC_EXTRA_CFLAGS@ @CURL_CFLAGS@ -DVERSION_NGINX
standalone_la_CPPFLAGS = @APR_CPPFLAGS@ @PCRE_CPPFLAGS@ @LIBXML2_CPPFLAGS@
standalone_la_LIBADD = @APR_LDADD@ @APU_LDADD@ @PCRE_LDADD@ @LIBXML2_LDADD@ @LUA_LDADD@
@AIX_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
@AIX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@AIX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
@FREEBSD_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@FREEBSD_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@FREEBSD_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
@HPUX_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
@HPUX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@HPUX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
@LINUX_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@LINUX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@LINUX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
@MACOSX_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
@MACOSX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@MACOSX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
@NETBSD_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@NETBSD_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@NETBSD_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
@OPENBSD_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
@OPENBSD_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@OPENBSD_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
@SOLARIS_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
@SOLARIS_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
@SOLARIS_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign standalone/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign standalone/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
}
uninstall-pkglibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
done
clean-pkglibLTLIBRARIES:
-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
standalone.la: $(standalone_la_OBJECTS) $(standalone_la_DEPENDENCIES)
$(standalone_la_LINK) -rpath $(pkglibdir) $(standalone_la_OBJECTS) $(standalone_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-acmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-apache2_config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-apache2_io.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-apache2_util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-api.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-buckets.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-filters.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-hooks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-mod_security2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-modsecurity.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_crypt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_geo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_gsb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_logging.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_lua.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_multipart.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_parsers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_pcre.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_release.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_reqbody.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_tree.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_unicode.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_xml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-persist_dbm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_actions.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_operators.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_tfns.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_variables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-regex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-server.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
standalone_la-mod_security2.lo: ../apache2/mod_security2.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-mod_security2.lo -MD -MP -MF $(DEPDIR)/standalone_la-mod_security2.Tpo -c -o standalone_la-mod_security2.lo `test -f '../apache2/mod_security2.c' || echo '$(srcdir)/'`../apache2/mod_security2.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-mod_security2.Tpo $(DEPDIR)/standalone_la-mod_security2.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/mod_security2.c' object='standalone_la-mod_security2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-mod_security2.lo `test -f '../apache2/mod_security2.c' || echo '$(srcdir)/'`../apache2/mod_security2.c
standalone_la-apache2_config.lo: ../apache2/apache2_config.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-apache2_config.lo -MD -MP -MF $(DEPDIR)/standalone_la-apache2_config.Tpo -c -o standalone_la-apache2_config.lo `test -f '../apache2/apache2_config.c' || echo '$(srcdir)/'`../apache2/apache2_config.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-apache2_config.Tpo $(DEPDIR)/standalone_la-apache2_config.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/apache2_config.c' object='standalone_la-apache2_config.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-apache2_config.lo `test -f '../apache2/apache2_config.c' || echo '$(srcdir)/'`../apache2/apache2_config.c
standalone_la-apache2_io.lo: ../apache2/apache2_io.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-apache2_io.lo -MD -MP -MF $(DEPDIR)/standalone_la-apache2_io.Tpo -c -o standalone_la-apache2_io.lo `test -f '../apache2/apache2_io.c' || echo '$(srcdir)/'`../apache2/apache2_io.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-apache2_io.Tpo $(DEPDIR)/standalone_la-apache2_io.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/apache2_io.c' object='standalone_la-apache2_io.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-apache2_io.lo `test -f '../apache2/apache2_io.c' || echo '$(srcdir)/'`../apache2/apache2_io.c
standalone_la-apache2_util.lo: ../apache2/apache2_util.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-apache2_util.lo -MD -MP -MF $(DEPDIR)/standalone_la-apache2_util.Tpo -c -o standalone_la-apache2_util.lo `test -f '../apache2/apache2_util.c' || echo '$(srcdir)/'`../apache2/apache2_util.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-apache2_util.Tpo $(DEPDIR)/standalone_la-apache2_util.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/apache2_util.c' object='standalone_la-apache2_util.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-apache2_util.lo `test -f '../apache2/apache2_util.c' || echo '$(srcdir)/'`../apache2/apache2_util.c
standalone_la-re.lo: ../apache2/re.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re.lo -MD -MP -MF $(DEPDIR)/standalone_la-re.Tpo -c -o standalone_la-re.lo `test -f '../apache2/re.c' || echo '$(srcdir)/'`../apache2/re.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re.Tpo $(DEPDIR)/standalone_la-re.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re.c' object='standalone_la-re.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re.lo `test -f '../apache2/re.c' || echo '$(srcdir)/'`../apache2/re.c
standalone_la-re_operators.lo: ../apache2/re_operators.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_operators.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_operators.Tpo -c -o standalone_la-re_operators.lo `test -f '../apache2/re_operators.c' || echo '$(srcdir)/'`../apache2/re_operators.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_operators.Tpo $(DEPDIR)/standalone_la-re_operators.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_operators.c' object='standalone_la-re_operators.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_operators.lo `test -f '../apache2/re_operators.c' || echo '$(srcdir)/'`../apache2/re_operators.c
standalone_la-re_actions.lo: ../apache2/re_actions.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_actions.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_actions.Tpo -c -o standalone_la-re_actions.lo `test -f '../apache2/re_actions.c' || echo '$(srcdir)/'`../apache2/re_actions.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_actions.Tpo $(DEPDIR)/standalone_la-re_actions.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_actions.c' object='standalone_la-re_actions.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_actions.lo `test -f '../apache2/re_actions.c' || echo '$(srcdir)/'`../apache2/re_actions.c
standalone_la-re_tfns.lo: ../apache2/re_tfns.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_tfns.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_tfns.Tpo -c -o standalone_la-re_tfns.lo `test -f '../apache2/re_tfns.c' || echo '$(srcdir)/'`../apache2/re_tfns.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_tfns.Tpo $(DEPDIR)/standalone_la-re_tfns.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_tfns.c' object='standalone_la-re_tfns.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_tfns.lo `test -f '../apache2/re_tfns.c' || echo '$(srcdir)/'`../apache2/re_tfns.c
standalone_la-re_variables.lo: ../apache2/re_variables.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_variables.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_variables.Tpo -c -o standalone_la-re_variables.lo `test -f '../apache2/re_variables.c' || echo '$(srcdir)/'`../apache2/re_variables.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_variables.Tpo $(DEPDIR)/standalone_la-re_variables.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_variables.c' object='standalone_la-re_variables.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_variables.lo `test -f '../apache2/re_variables.c' || echo '$(srcdir)/'`../apache2/re_variables.c
standalone_la-msc_logging.lo: ../apache2/msc_logging.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_logging.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_logging.Tpo -c -o standalone_la-msc_logging.lo `test -f '../apache2/msc_logging.c' || echo '$(srcdir)/'`../apache2/msc_logging.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_logging.Tpo $(DEPDIR)/standalone_la-msc_logging.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_logging.c' object='standalone_la-msc_logging.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_logging.lo `test -f '../apache2/msc_logging.c' || echo '$(srcdir)/'`../apache2/msc_logging.c
standalone_la-msc_xml.lo: ../apache2/msc_xml.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_xml.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_xml.Tpo -c -o standalone_la-msc_xml.lo `test -f '../apache2/msc_xml.c' || echo '$(srcdir)/'`../apache2/msc_xml.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_xml.Tpo $(DEPDIR)/standalone_la-msc_xml.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_xml.c' object='standalone_la-msc_xml.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_xml.lo `test -f '../apache2/msc_xml.c' || echo '$(srcdir)/'`../apache2/msc_xml.c
standalone_la-msc_multipart.lo: ../apache2/msc_multipart.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_multipart.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_multipart.Tpo -c -o standalone_la-msc_multipart.lo `test -f '../apache2/msc_multipart.c' || echo '$(srcdir)/'`../apache2/msc_multipart.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_multipart.Tpo $(DEPDIR)/standalone_la-msc_multipart.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_multipart.c' object='standalone_la-msc_multipart.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_multipart.lo `test -f '../apache2/msc_multipart.c' || echo '$(srcdir)/'`../apache2/msc_multipart.c
standalone_la-modsecurity.lo: ../apache2/modsecurity.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-modsecurity.lo -MD -MP -MF $(DEPDIR)/standalone_la-modsecurity.Tpo -c -o standalone_la-modsecurity.lo `test -f '../apache2/modsecurity.c' || echo '$(srcdir)/'`../apache2/modsecurity.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-modsecurity.Tpo $(DEPDIR)/standalone_la-modsecurity.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/modsecurity.c' object='standalone_la-modsecurity.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-modsecurity.lo `test -f '../apache2/modsecurity.c' || echo '$(srcdir)/'`../apache2/modsecurity.c
standalone_la-msc_parsers.lo: ../apache2/msc_parsers.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_parsers.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_parsers.Tpo -c -o standalone_la-msc_parsers.lo `test -f '../apache2/msc_parsers.c' || echo '$(srcdir)/'`../apache2/msc_parsers.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_parsers.Tpo $(DEPDIR)/standalone_la-msc_parsers.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_parsers.c' object='standalone_la-msc_parsers.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_parsers.lo `test -f '../apache2/msc_parsers.c' || echo '$(srcdir)/'`../apache2/msc_parsers.c
standalone_la-msc_util.lo: ../apache2/msc_util.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_util.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_util.Tpo -c -o standalone_la-msc_util.lo `test -f '../apache2/msc_util.c' || echo '$(srcdir)/'`../apache2/msc_util.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_util.Tpo $(DEPDIR)/standalone_la-msc_util.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_util.c' object='standalone_la-msc_util.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_util.lo `test -f '../apache2/msc_util.c' || echo '$(srcdir)/'`../apache2/msc_util.c
standalone_la-msc_pcre.lo: ../apache2/msc_pcre.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_pcre.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_pcre.Tpo -c -o standalone_la-msc_pcre.lo `test -f '../apache2/msc_pcre.c' || echo '$(srcdir)/'`../apache2/msc_pcre.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_pcre.Tpo $(DEPDIR)/standalone_la-msc_pcre.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_pcre.c' object='standalone_la-msc_pcre.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_pcre.lo `test -f '../apache2/msc_pcre.c' || echo '$(srcdir)/'`../apache2/msc_pcre.c
standalone_la-persist_dbm.lo: ../apache2/persist_dbm.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-persist_dbm.lo -MD -MP -MF $(DEPDIR)/standalone_la-persist_dbm.Tpo -c -o standalone_la-persist_dbm.lo `test -f '../apache2/persist_dbm.c' || echo '$(srcdir)/'`../apache2/persist_dbm.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-persist_dbm.Tpo $(DEPDIR)/standalone_la-persist_dbm.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/persist_dbm.c' object='standalone_la-persist_dbm.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-persist_dbm.lo `test -f '../apache2/persist_dbm.c' || echo '$(srcdir)/'`../apache2/persist_dbm.c
standalone_la-msc_reqbody.lo: ../apache2/msc_reqbody.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_reqbody.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_reqbody.Tpo -c -o standalone_la-msc_reqbody.lo `test -f '../apache2/msc_reqbody.c' || echo '$(srcdir)/'`../apache2/msc_reqbody.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_reqbody.Tpo $(DEPDIR)/standalone_la-msc_reqbody.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_reqbody.c' object='standalone_la-msc_reqbody.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_reqbody.lo `test -f '../apache2/msc_reqbody.c' || echo '$(srcdir)/'`../apache2/msc_reqbody.c
standalone_la-msc_geo.lo: ../apache2/msc_geo.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_geo.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_geo.Tpo -c -o standalone_la-msc_geo.lo `test -f '../apache2/msc_geo.c' || echo '$(srcdir)/'`../apache2/msc_geo.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_geo.Tpo $(DEPDIR)/standalone_la-msc_geo.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_geo.c' object='standalone_la-msc_geo.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_geo.lo `test -f '../apache2/msc_geo.c' || echo '$(srcdir)/'`../apache2/msc_geo.c
standalone_la-msc_gsb.lo: ../apache2/msc_gsb.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_gsb.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_gsb.Tpo -c -o standalone_la-msc_gsb.lo `test -f '../apache2/msc_gsb.c' || echo '$(srcdir)/'`../apache2/msc_gsb.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_gsb.Tpo $(DEPDIR)/standalone_la-msc_gsb.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_gsb.c' object='standalone_la-msc_gsb.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_gsb.lo `test -f '../apache2/msc_gsb.c' || echo '$(srcdir)/'`../apache2/msc_gsb.c
standalone_la-msc_unicode.lo: ../apache2/msc_unicode.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_unicode.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_unicode.Tpo -c -o standalone_la-msc_unicode.lo `test -f '../apache2/msc_unicode.c' || echo '$(srcdir)/'`../apache2/msc_unicode.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_unicode.Tpo $(DEPDIR)/standalone_la-msc_unicode.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_unicode.c' object='standalone_la-msc_unicode.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_unicode.lo `test -f '../apache2/msc_unicode.c' || echo '$(srcdir)/'`../apache2/msc_unicode.c
standalone_la-acmp.lo: ../apache2/acmp.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-acmp.lo -MD -MP -MF $(DEPDIR)/standalone_la-acmp.Tpo -c -o standalone_la-acmp.lo `test -f '../apache2/acmp.c' || echo '$(srcdir)/'`../apache2/acmp.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-acmp.Tpo $(DEPDIR)/standalone_la-acmp.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/acmp.c' object='standalone_la-acmp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-acmp.lo `test -f '../apache2/acmp.c' || echo '$(srcdir)/'`../apache2/acmp.c
standalone_la-msc_lua.lo: ../apache2/msc_lua.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_lua.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_lua.Tpo -c -o standalone_la-msc_lua.lo `test -f '../apache2/msc_lua.c' || echo '$(srcdir)/'`../apache2/msc_lua.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_lua.Tpo $(DEPDIR)/standalone_la-msc_lua.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_lua.c' object='standalone_la-msc_lua.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_lua.lo `test -f '../apache2/msc_lua.c' || echo '$(srcdir)/'`../apache2/msc_lua.c
standalone_la-msc_release.lo: ../apache2/msc_release.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_release.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_release.Tpo -c -o standalone_la-msc_release.lo `test -f '../apache2/msc_release.c' || echo '$(srcdir)/'`../apache2/msc_release.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_release.Tpo $(DEPDIR)/standalone_la-msc_release.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_release.c' object='standalone_la-msc_release.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_release.lo `test -f '../apache2/msc_release.c' || echo '$(srcdir)/'`../apache2/msc_release.c
standalone_la-msc_crypt.lo: ../apache2/msc_crypt.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_crypt.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_crypt.Tpo -c -o standalone_la-msc_crypt.lo `test -f '../apache2/msc_crypt.c' || echo '$(srcdir)/'`../apache2/msc_crypt.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_crypt.Tpo $(DEPDIR)/standalone_la-msc_crypt.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_crypt.c' object='standalone_la-msc_crypt.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_crypt.lo `test -f '../apache2/msc_crypt.c' || echo '$(srcdir)/'`../apache2/msc_crypt.c
standalone_la-msc_tree.lo: ../apache2/msc_tree.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_tree.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_tree.Tpo -c -o standalone_la-msc_tree.lo `test -f '../apache2/msc_tree.c' || echo '$(srcdir)/'`../apache2/msc_tree.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_tree.Tpo $(DEPDIR)/standalone_la-msc_tree.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_tree.c' object='standalone_la-msc_tree.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_tree.lo `test -f '../apache2/msc_tree.c' || echo '$(srcdir)/'`../apache2/msc_tree.c
standalone_la-api.lo: api.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-api.lo -MD -MP -MF $(DEPDIR)/standalone_la-api.Tpo -c -o standalone_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-api.Tpo $(DEPDIR)/standalone_la-api.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='api.c' object='standalone_la-api.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
standalone_la-buckets.lo: buckets.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-buckets.lo -MD -MP -MF $(DEPDIR)/standalone_la-buckets.Tpo -c -o standalone_la-buckets.lo `test -f 'buckets.c' || echo '$(srcdir)/'`buckets.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-buckets.Tpo $(DEPDIR)/standalone_la-buckets.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buckets.c' object='standalone_la-buckets.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-buckets.lo `test -f 'buckets.c' || echo '$(srcdir)/'`buckets.c
standalone_la-config.lo: config.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-config.lo -MD -MP -MF $(DEPDIR)/standalone_la-config.Tpo -c -o standalone_la-config.lo `test -f 'config.c' || echo '$(srcdir)/'`config.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-config.Tpo $(DEPDIR)/standalone_la-config.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='standalone_la-config.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-config.lo `test -f 'config.c' || echo '$(srcdir)/'`config.c
standalone_la-filters.lo: filters.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-filters.lo -MD -MP -MF $(DEPDIR)/standalone_la-filters.Tpo -c -o standalone_la-filters.lo `test -f 'filters.c' || echo '$(srcdir)/'`filters.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-filters.Tpo $(DEPDIR)/standalone_la-filters.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filters.c' object='standalone_la-filters.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-filters.lo `test -f 'filters.c' || echo '$(srcdir)/'`filters.c
standalone_la-hooks.lo: hooks.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-hooks.lo -MD -MP -MF $(DEPDIR)/standalone_la-hooks.Tpo -c -o standalone_la-hooks.lo `test -f 'hooks.c' || echo '$(srcdir)/'`hooks.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-hooks.Tpo $(DEPDIR)/standalone_la-hooks.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hooks.c' object='standalone_la-hooks.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-hooks.lo `test -f 'hooks.c' || echo '$(srcdir)/'`hooks.c
standalone_la-regex.lo: regex.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-regex.lo -MD -MP -MF $(DEPDIR)/standalone_la-regex.Tpo -c -o standalone_la-regex.lo `test -f 'regex.c' || echo '$(srcdir)/'`regex.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-regex.Tpo $(DEPDIR)/standalone_la-regex.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='regex.c' object='standalone_la-regex.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-regex.lo `test -f 'regex.c' || echo '$(srcdir)/'`regex.c
standalone_la-server.lo: server.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-server.lo -MD -MP -MF $(DEPDIR)/standalone_la-server.Tpo -c -o standalone_la-server.lo `test -f 'server.c' || echo '$(srcdir)/'`server.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-server.Tpo $(DEPDIR)/standalone_la-server.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='server.c' object='standalone_la-server.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-server.lo `test -f 'server.c' || echo '$(srcdir)/'`server.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(pkglibdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-pkglibLTLIBRARIES
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-pkglibLTLIBRARIES
.MAKE: install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-exec-hook \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am \
install-pkglibLTLIBRARIES install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-pkglibLTLIBRARIES
install-exec-hook: $(pkglib_LTLIBRARIES)
@echo "Removing unused static libraries..."; \
for m in $(pkglib_LTLIBRARIES); do \
base=`echo $$m | sed 's/\..*//'`; \
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(APXS_MODULES); \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

519
standalone/api.c Normal file
View File

@@ -0,0 +1,519 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#include <limits.h>
#include <stdio.h>
#include "http_core.h"
#include "http_request.h"
#include "modsecurity.h"
#include "apache2.h"
#include "http_main.h"
#include "http_connection.h"
#include "apr_optional.h"
#include "mod_log_config.h"
#include "msc_logging.h"
#include "msc_util.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "apr_version.h"
#include "apr_lib.h"
#include "ap_config.h"
#include "http_config.h"
extern void *modsecLogObj;
extern void (*modsecLogHook)(void *obj, int level, char *str);
apr_status_t (*modsecReadBody)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos);
apr_status_t (*modsecReadResponse)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos);
apr_status_t (*modsecWriteBody)(request_rec *r, char *buf, unsigned int length);
apr_status_t (*modsecWriteResponse)(request_rec *r, char *buf, unsigned int length);
extern const char *process_command_config(server_rec *s,
void *mconfig,
apr_pool_t *p,
apr_pool_t *ptemp,
const char *filename);
#define DECLARE_EXTERNAL_HOOK(ns,link,ret,name,args) \
extern ns##_HOOK_##name##_t *hookfn_##name;
#define DECLARE_HOOK(ret,name,args) \
DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp))
DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s))
DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
DECLARE_HOOK(int,process_connection,(conn_rec *c))
DECLARE_HOOK(int,post_read_request,(request_rec *r))
DECLARE_HOOK(int,fixups,(request_rec *r))
DECLARE_HOOK(void, error_log, (const char *file, int line, int level,
apr_status_t status, const server_rec *s,
const request_rec *r, apr_pool_t *pool,
const char *errstr))
DECLARE_HOOK(int,log_transaction,(request_rec *r))
DECLARE_HOOK(void,insert_filter,(request_rec *r))
DECLARE_HOOK(void,insert_error_filter,(request_rec *r))
char *sa_name = "standalone";
server_rec *server;
apr_pool_t *pool = NULL;
apr_status_t ap_http_in_filter(ap_filter_t *f, apr_bucket_brigade *b,
ap_input_mode_t mode, apr_read_type_e block,
apr_off_t readbytes);
apr_status_t ap_http_out_filter(ap_filter_t *f, apr_bucket_brigade *b);
server_rec *modsecInit() {
apr_initialize();
apr_pool_create(&pool, NULL);
apr_hook_global_pool = pool;
server = apr_palloc(pool, sizeof(server_rec));
server->addrs = apr_palloc(pool, sizeof(server_addr_rec));
server->addrs->host_addr = apr_palloc(pool, sizeof(apr_sockaddr_t));
server->addrs->host_addr->addr_str_len = 16;
server->addrs->host_addr->family = AF_INET;
server->addrs->host_addr->hostname = sa_name;
#ifdef WIN32
server->addrs->host_addr->ipaddr_len = sizeof(IN_ADDR);
#else
server->addrs->host_addr->ipaddr_len = sizeof(struct in_addr);
#endif
server->addrs->host_addr->ipaddr_ptr = &server->addrs->host_addr->sa.sin.sin_addr;
server->addrs->host_addr->pool = pool;
server->addrs->host_addr->port = 80;
#ifdef WIN32
server->addrs->host_addr->sa.sin.sin_addr.S_un.S_addr = 0x0100007f;
#else
server->addrs->host_addr->sa.sin.sin_addr.s_addr = 0x0100007f;
#endif
server->addrs->host_addr->sa.sin.sin_family = AF_INET;
server->addrs->host_addr->sa.sin.sin_port = 80;
server->addrs->host_addr->salen = sizeof(server->addrs->host_addr->sa);
server->addrs->host_addr->servname = sa_name;
server->addrs->host_port = 80;
server->error_fname = "error.log";
server->error_log = NULL;
server->limit_req_fields = 1024;
server->limit_req_fieldsize = 1024;
server->limit_req_line = 1024;
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
server->loglevel = APLOG_DEBUG;
#endif
server->lookup_defaults = NULL;
server->module_config = NULL;
server->names = NULL;
#ifdef WIN32
server->path = "c:\\inetpub\\wwwroot";
#else
server->path = "/var/www";
#endif
server->pathlen = strlen(server->path);
server->port = 80;
server->process = apr_palloc(pool, sizeof(process_rec));
server->process->argc = 1;
server->process->argv = &sa_name;
server->process->pconf = pool;
server->process->pool = pool;
server->process->short_name = sa_name;
server->server_admin = sa_name;
server->server_hostname = sa_name;
server->server_scheme = "";
server->timeout = 60 * 1000000;// 60 seconds
server->wild_names = NULL;
ap_server_config_defines = apr_array_make(pool, 1, sizeof(char *));
// here we should add scoreboard handling for multiple processes and threads
//
ap_scoreboard_image = (scoreboard *)apr_palloc(pool, sizeof(scoreboard));
memset(ap_scoreboard_image, 0, sizeof(scoreboard));
// ----------
security2_module.module_index = 0;
security2_module.register_hooks(pool);
ap_register_input_filter("HTTP_IN", ap_http_in_filter, NULL, AP_FTYPE_RESOURCE);
ap_register_output_filter("HTTP_OUT", ap_http_out_filter, NULL, AP_FTYPE_CONTENT_SET);
return server;
}
apr_status_t ap_http_in_filter(ap_filter_t *f, apr_bucket_brigade *b,
ap_input_mode_t mode, apr_read_type_e block,
apr_off_t readbytes) {
char *tmp = NULL;
apr_bucket *e = NULL;
unsigned int readcnt = 0;
int is_eos = 0;
if(modsecReadBody == NULL)
return AP_NOBODY_READ;
tmp = (char *)apr_palloc(f->r->pool, readbytes);
modsecReadBody(f->r, tmp, readbytes, &readcnt, &is_eos);
e = apr_bucket_pool_create(tmp, readcnt, f->r->pool, f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(b, e);
if(is_eos) {
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(b, e);
}
return APR_SUCCESS;
}
apr_status_t ap_http_out_filter(ap_filter_t *f, apr_bucket_brigade *b) {
modsec_rec *msr = (modsec_rec *)f->ctx;
apr_status_t rc;
// is there a way to tell whether the response body was modified or not?
//
if((msr->txcfg->content_injection_enabled || msr->content_prepend_len != 0 || msr->content_append_len != 0)
&& modsecWriteResponse != NULL && msr->txcfg->resbody_access) {
char *data = NULL;
apr_size_t length;
rc = apr_brigade_pflatten(msr->of_brigade, &data, &length, msr->mp);
if (rc != APR_SUCCESS) {
msr_log(msr, 1, "Output filter: Failed to flatten brigade (%d): %s", rc,
get_apr_error(msr->mp, rc));
return -1;
}
modsecWriteResponse(msr->r, data, msr->stream_output_length);
}
return APR_SUCCESS;
}
void modsecTerminate() {
apr_terminate();
}
void modsecStartConfig() {
apr_pool_t *ptemp = NULL;
apr_pool_create(&ptemp, pool);
hookfn_pre_config(pool, pool, ptemp);
apr_pool_destroy(ptemp);
}
directory_config *modsecGetDefaultConfig() {
return (directory_config *)security2_module.create_dir_config(pool, NULL);
}
const char *modsecProcessConfig(directory_config *config, const char *dir) {
apr_pool_t *ptemp = NULL;
const char *err;
apr_pool_create(&ptemp, pool);
err = process_command_config(server, config, pool, ptemp, dir);
apr_pool_destroy(ptemp);
return err;
}
void modsecFinalizeConfig() {
apr_pool_t *ptemp = NULL;
apr_pool_create(&ptemp, pool);
hookfn_post_config(pool, pool, ptemp, server);
hookfn_post_config(pool, pool, ptemp, server);
apr_pool_destroy(ptemp);
}
void modsecInitProcess() {
hookfn_child_init(pool, server);
}
conn_rec *modsecNewConnection() {
conn_rec *c;
apr_pool_t *pc = NULL;
apr_pool_create(&pc, pool);
c = apr_palloc(pc, sizeof(conn_rec));
c->base_server = server;
c->id = 1;
c->local_addr = server->addrs->host_addr;
c->local_host = sa_name;
c->local_ip = "127.0.0.1";
c->pool = pc;
c->remote_host = sa_name;
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
c->remote_ip = "127.0.0.1";
c->remote_addr = server->addrs->host_addr;
#else
c->client_ip = "127.0.0.1";
c->client_addr = server->addrs->host_addr;
#endif
c->input_filters = NULL;
c->output_filters = NULL;
c->bucket_alloc = apr_bucket_alloc_create(pc);
return c;
}
void modsecProcessConnection(conn_rec *c) {
hookfn_process_connection(c);
}
request_rec *modsecNewRequest(conn_rec *connection, directory_config *config) {
request_rec *r;
apr_pool_t *pr = NULL;
apr_pool_create(&pr, connection->pool);
r = apr_palloc(pr, sizeof(request_rec));
r->connection = connection;
r->server = server;
r->pool = pr;
r->main = NULL;
r->next = NULL;
r->notes = apr_table_make(pr, 10);
r->per_dir_config = apr_palloc(pr, sizeof(void *));
((void **)r->per_dir_config)[0] = config;
r->prev = NULL;
r->subprocess_env = apr_table_make(pr, 10);
apr_table_setn(r->subprocess_env, "UNIQUE_ID", "unique_id");
r->user = NULL;
r->headers_in = apr_table_make(pr, 10);
r->headers_out = apr_table_make(pr, 10);
r->err_headers_out = apr_table_make(pr, 10);
//apr_table_setn(r->headers_in, "Host", "www.google.com");
//apr_table_setn(r->headers_in, "", "");
r->the_request = "GET /../../index.html HTTP/1.1";
r->method = "GET";
r->method_number = M_GET;
r->protocol = "HTTP/1.1";
r->uri = "http://www.google.com/../../index.html";
r->args = "";
r->filename = "/../../index.html";
r->handler = "IIS";
r->parsed_uri.scheme = "http";
r->parsed_uri.path = "/../../index.html";
r->parsed_uri.hostname = "www.google.com";
r->parsed_uri.is_initialized = 1;
r->parsed_uri.port = 1234;
r->parsed_uri.port_str = "1234";
r->parsed_uri.query = "";
r->parsed_uri.dns_looked_up = 0;
r->parsed_uri.dns_resolved = 0;
r->parsed_uri.password = NULL;
r->parsed_uri.user = NULL;
r->parsed_uri.fragment = "";
r->input_filters = NULL;
r->output_filters = NULL;
return r;
}
static modsec_rec *retrieve_msr(request_rec *r) {
modsec_rec *msr = NULL;
request_rec *rx = NULL;
/* Look in the current request first. */
msr = (modsec_rec *)apr_table_get(r->notes, NOTE_MSR);
if (msr != NULL) {
msr->r = r;
return msr;
}
/* If this is a subrequest then look in the main request. */
if (r->main != NULL) {
msr = (modsec_rec *)apr_table_get(r->main->notes, NOTE_MSR);
if (msr != NULL) {
msr->r = r;
return msr;
}
}
/* If the request was redirected then look in the previous requests. */
rx = r->prev;
while(rx != NULL) {
msr = (modsec_rec *)apr_table_get(rx->notes, NOTE_MSR);
if (msr != NULL) {
msr->r = r;
return msr;
}
rx = rx->prev;
}
return NULL;
}
int modsecProcessRequest(request_rec *r) {
int status = DECLINED;
modsec_rec *msr = NULL;
ap_filter_t *f = ap_add_input_filter("HTTP_IN", NULL, r, r->connection);
status = hookfn_post_read_request(r);
status = hookfn_fixups(r);
ap_remove_input_filter(f);
hookfn_insert_filter(r);
/* Find the transaction context first. */
msr = retrieve_msr(r);
if (msr == NULL)
return status;
if(msr->stream_input_data != NULL && modsecWriteBody != NULL)
{
// target is responsible for copying the data into correctly managed buffer
//
modsecWriteBody(r, msr->stream_input_data, msr->stream_input_length);
free(msr->stream_input_data);
msr->stream_input_data = NULL;
}
// leftover code possibly for future use
//
//if(r->input_filters != NULL && r->input_filters->frec->filter_init_func != NULL)
//r->input_filters->frec->filter_init_func(r->input_filters);
//if(r->input_filters != NULL && r->input_filters->frec->filter_func.in_func != NULL)
//r->input_filters->frec->filter_func.in_func(r->input_filters, NULL, 0, 0, 0);
return status;
}
int modsecProcessResponse(request_rec *r) {
int status = DECLINED;
if(r->output_filters != NULL) {
modsec_rec *msr = (modsec_rec *)r->output_filters->ctx;
char buf[8192];
char *tmp = NULL;
apr_bucket *e = NULL;
unsigned int readcnt = 0;
int is_eos = 0;
ap_filter_t *f = NULL;
apr_bucket_brigade *bb = NULL;
if (msr == NULL) {
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server,
"ModSecurity: Internal Error: msr is null in output filter.");
ap_remove_output_filter(r->output_filters);
return send_error_bucket(msr, r->output_filters, HTTP_INTERNAL_SERVER_ERROR);
}
bb = apr_brigade_create(msr->mp, r->connection->bucket_alloc);
if (bb == NULL) {
msr_log(msr, 1, "Process response: Failed to create brigade.");
return -1;
}
msr->r = r;
if(modsecReadResponse == NULL)
return AP_NOBODY_WROTE;
f = ap_add_output_filter("HTTP_OUT", msr, r, r->connection);
while(!is_eos) {
modsecReadResponse(r, buf, 8192, &readcnt, &is_eos);
if(readcnt > 0) {
tmp = (char *)apr_palloc(r->pool, readcnt);
memcpy(tmp, buf, readcnt);
e = apr_bucket_pool_create(tmp, readcnt, r->pool, r->connection->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
}
if(is_eos) {
e = apr_bucket_eos_create(r->connection->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
}
}
status = ap_pass_brigade(r->output_filters, bb);
ap_remove_output_filter(f);
}
return status;
}
int modsecFinishRequest(request_rec *r) {
// run output filter
//if(r->output_filters != NULL && r->output_filters->frec->filter_init_func != NULL)
//r->output_filters->frec->filter_init_func(r->output_filters);
hookfn_log_transaction(r);
// make sure you cleanup before calling apr_terminate()
// otherwise double-free might occur, because of the request body pool cleanup function
//
apr_pool_destroy(r->connection->pool);
return DECLINED;
}
void modsecSetLogHook(void *obj, void (*hook)(void *obj, int level, char *str)) {
modsecLogObj = obj;
modsecLogHook = hook;
}
void modsecSetReadBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)) {
modsecReadBody = func;
}
void modsecSetReadResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)) {
modsecReadResponse = func;
}
void modsecSetWriteBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length)) {
modsecWriteBody = func;
}
void modsecSetWriteResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length)) {
modsecWriteResponse = func;
}

76
standalone/api.h Normal file
View File

@@ -0,0 +1,76 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#pragma once
#include <limits.h>
#include "http_core.h"
#include "http_request.h"
#include "modsecurity.h"
#include "apache2.h"
#include "http_main.h"
#include "http_connection.h"
#include "apr_optional.h"
#include "mod_log_config.h"
#include "msc_logging.h"
#include "msc_util.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "apr_version.h"
#include "apr_lib.h"
#include "ap_config.h"
#include "http_config.h"
#ifdef __cplusplus
extern "C"
{
#endif
server_rec *modsecInit();
void modsecTerminate();
void modsecStartConfig();
directory_config *modsecGetDefaultConfig();
const char *modsecProcessConfig(directory_config *config, const char *dir);
void modsecFinalizeConfig();
void modsecInitProcess();
conn_rec *modsecNewConnection();
void modsecProcessConnection(conn_rec *c);
request_rec *modsecNewRequest(conn_rec *connection, directory_config *config);
int modsecProcessRequest(request_rec *r);
int modsecProcessResponse(request_rec *r);
int modsecFinishRequest(request_rec *r);
void modsecSetLogHook(void *obj, void (*hook)(void *obj, int level, char *str));
void modsecSetReadBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos));
void modsecSetReadResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos));
void modsecSetWriteBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length));
void modsecSetWriteResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length));
#ifdef __cplusplus
}
#endif

184
standalone/buckets.c Normal file
View File

@@ -0,0 +1,184 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#include <limits.h>
#include "http_core.h"
#include "http_request.h"
#include "modsecurity.h"
#include "apache2.h"
#include "http_main.h"
#include "http_connection.h"
#include "apr_optional.h"
#include "mod_log_config.h"
#include "msc_logging.h"
#include "msc_util.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "apr_version.h"
#include "apr_lib.h"
#include "ap_config.h"
#include "http_config.h"
#include "apr_buckets.h"
AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *next,
apr_bucket_brigade *bb,
ap_input_mode_t mode,
apr_read_type_e block,
apr_off_t readbytes)
{
if (next) {
return next->frec->filter_func.in_func(next, bb, mode, block,
readbytes);
}
return AP_NOBODY_READ;
}
AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *next,
apr_bucket_brigade *bb)
{
if (next) {
apr_bucket *e;
if ((e = APR_BRIGADE_LAST(bb)) && APR_BUCKET_IS_EOS(e) && next->r) {
/* This is only safe because HTTP_HEADER filter is always in
* the filter stack. This ensures that there is ALWAYS a
* request-based filter that we can attach this to. If the
* HTTP_FILTER is removed, and another filter is not put in its
* place, then handlers like mod_cgi, which attach their own
* EOS bucket to the brigade will be broken, because we will
* get two EOS buckets on the same request.
*/
next->r->eos_sent = 1;
/* remember the eos for internal redirects, too */
if (next->r->prev) {
request_rec *prev = next->r->prev;
while (prev) {
prev->eos_sent = 1;
prev = prev->prev;
}
}
}
return next->frec->filter_func.out_func(next, bb);
}
return AP_NOBODY_WROTE;
}
AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f,
apr_bucket_brigade **saveto,
apr_bucket_brigade **b, apr_pool_t *p)
{
apr_bucket *e;
apr_status_t rv, srv = APR_SUCCESS;
/* If have never stored any data in the filter, then we had better
* create an empty bucket brigade so that we can concat.
*/
if (!(*saveto)) {
*saveto = apr_brigade_create(p, f->c->bucket_alloc);
}
for (e = APR_BRIGADE_FIRST(*b);
e != APR_BRIGADE_SENTINEL(*b);
e = APR_BUCKET_NEXT(e))
{
rv = apr_bucket_setaside(e, p);
/* If the bucket type does not implement setaside, then
* (hopefully) morph it into a bucket type which does, and set
* *that* aside... */
if (rv == APR_ENOTIMPL) {
const char *s;
apr_size_t n;
rv = apr_bucket_read(e, &s, &n, APR_BLOCK_READ);
if (rv == APR_SUCCESS) {
rv = apr_bucket_setaside(e, p);
}
}
if (rv != APR_SUCCESS) {
srv = rv;
/* Return an error but still save the brigade if
* ->setaside() is really not implemented. */
if (rv != APR_ENOTIMPL) {
return rv;
}
}
}
APR_BRIGADE_CONCAT(*saveto, *b);
return srv;
}
static apr_status_t error_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
*str = "Unknown error.";
*len = strlen(*str);
return APR_SUCCESS;
}
static void error_bucket_destroy(void *data)
{
ap_bucket_error *h = data;
if (apr_bucket_shared_destroy(h)) {
apr_bucket_free(h);
}
}
AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_error = {
"ERROR", 5, APR_BUCKET_METADATA,
error_bucket_destroy,
error_bucket_read,
apr_bucket_setaside_notimpl,
apr_bucket_split_notimpl,
apr_bucket_shared_copy
};
AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
const char *buf, apr_pool_t *p)
{
ap_bucket_error *h;
h = apr_bucket_alloc(sizeof(*h), b->list);
h->status = error;
h->data = (buf) ? apr_pstrdup(p, buf) : NULL;
b = apr_bucket_shared_make(b, h, 0, 0);
b->type = &ap_bucket_type_error;
return b;
}
AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf,
apr_pool_t *p,
apr_bucket_alloc_t *list)
{
apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
APR_BUCKET_INIT(b);
b->free = apr_bucket_free;
b->list = list;
return ap_bucket_error_make(b, error, buf, p);
}

782
standalone/config.c Normal file
View File

@@ -0,0 +1,782 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#include <limits.h>
#include <stdio.h>
#include "http_core.h"
#include "http_request.h"
#include "modsecurity.h"
#include "apache2.h"
#include "http_main.h"
#include "http_connection.h"
#include "apr_optional.h"
#include "mod_log_config.h"
#include "msc_logging.h"
#include "msc_util.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "apr_version.h"
#include "apr_lib.h"
#include "ap_config.h"
#include "http_config.h"
AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp)
{
#ifdef DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
"Done with config file %s", cfp->name);
#endif
return (cfp->close == NULL) ? 0 : cfp->close(cfp->param);
}
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
static apr_status_t cfg_close(void *param)
{
apr_file_t *cfp = (apr_file_t *) param;
return (apr_file_close(cfp));
}
static int cfg_getch(void *param)
{
char ch;
apr_file_t *cfp = (apr_file_t *) param;
if (apr_file_getc(&ch, cfp) == APR_SUCCESS)
return ch;
return (int)EOF;
}
static void *cfg_getstr(void *buf, size_t bufsiz, void *param)
{
apr_file_t *cfp = (apr_file_t *) param;
apr_status_t rv;
rv = apr_file_gets(buf, bufsiz, cfp);
if (rv == APR_SUCCESS) {
return buf;
}
return NULL;
}
#else
/* we can't use apr_file_* directly because of linking issues on Windows */
static apr_status_t cfg_close(void *param)
{
return apr_file_close(param);
}
static apr_status_t cfg_getch(char *ch, void *param)
{
return apr_file_getc(ch, param);
}
static apr_status_t cfg_getstr(void *buf, apr_size_t bufsiz, void *param)
{
return apr_file_gets(buf, bufsiz, param);
}
#endif
/* Read one line from open ap_configfile_t, strip LF, increase line number */
/* If custom handler does not define a getstr() function, read char by char */
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp)
{
/* If a "get string" function is defined, use it */
if (cfp->getstr != NULL) {
char *src, *dst;
char *cp;
char *cbuf = buf;
size_t cbufsize = bufsize;
while (1) {
++cfp->line_number;
if (cfp->getstr(cbuf, cbufsize, cfp->param) == NULL)
return 1;
/*
* check for line continuation,
* i.e. match [^\\]\\[\r]\n only
*/
cp = cbuf;
while (cp < cbuf+cbufsize && *cp != '\0')
cp++;
if (cp > cbuf && cp[-1] == LF) {
cp--;
if (cp > cbuf && cp[-1] == CR)
cp--;
if (cp > cbuf && cp[-1] == '\\') {
cp--;
if (!(cp > cbuf && cp[-1] == '\\')) {
/*
* line continuation requested -
* then remove backslash and continue
*/
cbufsize -= (cp-cbuf);
cbuf = cp;
continue;
}
else {
/*
* no real continuation because escaped -
* then just remove escape character
*/
for ( ; cp < cbuf+cbufsize && *cp != '\0'; cp++)
cp[0] = cp[1];
}
}
}
break;
}
/*
* Leading and trailing white space is eliminated completely
*/
src = buf;
while (apr_isspace(*src))
++src;
/* blast trailing whitespace */
dst = &src[strlen(src)];
while (--dst >= src && apr_isspace(*dst))
*dst = '\0';
/* Zap leading whitespace by shifting */
if (src != buf)
for (dst = buf; (*dst++ = *src++) != '\0'; )
;
#ifdef DEBUG_CFG_LINES
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Read config: %s", buf);
#endif
return 0;
} else {
/* No "get string" function defined; read character by character */
register int c;
register size_t i = 0;
buf[0] = '\0';
/* skip leading whitespace */
do {
c = cfp->getch(cfp->param);
} while (c == '\t' || c == ' ');
if (c == EOF)
return 1;
if(bufsize < 2) {
/* too small, assume caller is crazy */
return 1;
}
while (1) {
if ((c == '\t') || (c == ' ')) {
buf[i++] = ' ';
while ((c == '\t') || (c == ' '))
c = cfp->getch(cfp->param);
}
if (c == CR) {
/* silently ignore CR (_assume_ that a LF follows) */
c = cfp->getch(cfp->param);
}
if (c == LF) {
/* increase line number and return on LF */
++cfp->line_number;
}
if (c == EOF || c == 0x4 || c == LF || i >= (bufsize - 2)) {
/*
* check for line continuation
*/
if (i > 0 && buf[i-1] == '\\') {
i--;
if (!(i > 0 && buf[i-1] == '\\')) {
/* line is continued */
c = cfp->getch(cfp->param);
continue;
}
/* else nothing needs be done because
* then the backslash is escaped and
* we just strip to a single one
*/
}
/* blast trailing whitespace */
while (i > 0 && apr_isspace(buf[i - 1]))
--i;
buf[i] = '\0';
#ifdef DEBUG_CFG_LINES
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
"Read config: %s", buf);
#endif
return 0;
}
buf[i] = c;
++i;
c = cfp->getch(cfp->param);
}
}
}
#else
static apr_status_t ap_cfg_getline_core(char *buf, apr_size_t bufsize,
ap_configfile_t *cfp)
{
apr_status_t rc;
/* If a "get string" function is defined, use it */
if (cfp->getstr != NULL) {
char *cp;
char *cbuf = buf;
apr_size_t cbufsize = bufsize;
while (1) {
++cfp->line_number;
rc = cfp->getstr(cbuf, cbufsize, cfp->param);
if (rc == APR_EOF) {
if (cbuf != buf) {
*cbuf = '\0';
break;
}
else {
return APR_EOF;
}
}
if (rc != APR_SUCCESS) {
return rc;
}
/*
* check for line continuation,
* i.e. match [^\\]\\[\r]\n only
*/
cp = cbuf;
cp += strlen(cp);
if (cp > cbuf && cp[-1] == LF) {
cp--;
if (cp > cbuf && cp[-1] == CR)
cp--;
if (cp > cbuf && cp[-1] == '\\') {
cp--;
/*
* line continuation requested -
* then remove backslash and continue
*/
cbufsize -= (cp-cbuf);
cbuf = cp;
continue;
}
}
else if (cp - buf >= bufsize - 1) {
return APR_ENOSPC;
}
break;
}
} else {
/* No "get string" function defined; read character by character */
apr_size_t i = 0;
if (bufsize < 2) {
/* too small, assume caller is crazy */
return APR_EINVAL;
}
buf[0] = '\0';
while (1) {
char c;
rc = cfp->getch(&c, cfp->param);
if (rc == APR_EOF) {
if (i > 0)
break;
else
return APR_EOF;
}
if (rc != APR_SUCCESS)
return rc;
if (c == LF) {
++cfp->line_number;
/* check for line continuation */
if (i > 0 && buf[i-1] == '\\') {
i--;
continue;
}
else {
break;
}
}
else if (i >= bufsize - 2) {
return APR_ENOSPC;
}
buf[i] = c;
++i;
}
buf[i] = '\0';
}
return APR_SUCCESS;
}
static int cfg_trim_line(char *buf)
{
char *start, *end;
/*
* Leading and trailing white space is eliminated completely
*/
start = buf;
while (apr_isspace(*start))
++start;
/* blast trailing whitespace */
end = &start[strlen(start)];
while (--end >= start && apr_isspace(*end))
*end = '\0';
/* Zap leading whitespace by shifting */
if (start != buf)
memmove(buf, start, end - start + 2);
#ifdef DEBUG_CFG_LINES
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, APLOGNO(00555) "Read config: '%s'", buf);
#endif
return end - start + 1;
}
AP_DECLARE(apr_status_t) ap_cfg_getline(char *buf, apr_size_t bufsize,
ap_configfile_t *cfp)
{
apr_status_t rc = ap_cfg_getline_core(buf, bufsize, cfp);
if (rc == APR_SUCCESS)
cfg_trim_line(buf);
return rc;
}
#endif
static char *substring_conf(apr_pool_t *p, const char *start, int len,
char quote)
{
char *result = apr_palloc(p, len + 2);
char *resp = result;
int i;
for (i = 0; i < len; ++i) {
if (start[i] == '\\' && (start[i + 1] == '\\'
|| (quote && start[i + 1] == quote)))
*resp++ = start[++i];
else
*resp++ = start[i];
}
*resp++ = '\0';
#if RESOLVE_ENV_PER_TOKEN
return (char *)ap_resolve_env(p,result);
#else
return result;
#endif
}
AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
{
const char *str = *line, *strend;
char *res;
char quote;
while (*str && apr_isspace(*str))
++str;
if (!*str) {
*line = str;
return "";
}
if ((quote = *str) == '"' || quote == '\'') {
strend = str + 1;
while (*strend && *strend != quote) {
if (*strend == '\\' && strend[1] &&
(strend[1] == quote || strend[1] == '\\')) {
strend += 2;
}
else {
++strend;
}
}
res = substring_conf(p, str + 1, strend - str - 1, quote);
if (*strend == quote)
++strend;
}
else {
strend = str;
while (*strend && !apr_isspace(*strend))
++strend;
res = substring_conf(p, str, strend - str, 0);
}
while (*strend && apr_isspace(*strend))
++strend;
*line = strend;
return res;
}
/* Open a ap_configfile_t as FILE, return open ap_configfile_t struct pointer */
AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
apr_pool_t *p, const char *name)
{
ap_configfile_t *new_cfg;
apr_file_t *file = NULL;
apr_finfo_t finfo;
apr_status_t status;
#ifdef DEBUG
char buf[120];
#endif
if (name == NULL) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"Internal error: pcfg_openfile() called with NULL filename");
return APR_EBADF;
}
status = apr_file_open(&file, name, APR_READ | APR_BUFFERED,
APR_OS_DEFAULT, p);
#ifdef DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
"Opening config file %s (%s)",
name, (status != APR_SUCCESS) ?
apr_strerror(status, buf, sizeof(buf)) : "successful");
#endif
if (status != APR_SUCCESS)
return status;
status = apr_file_info_get(&finfo, APR_FINFO_TYPE, file);
if (status != APR_SUCCESS)
return status;
if (finfo.filetype != APR_REG &&
#if defined(WIN32) || defined(OS2) || defined(NETWARE)
strcasecmp(apr_filepath_name_get(name), "nul") != 0) {
#else
strcmp(name, "/dev/null") != 0) {
#endif /* WIN32 || OS2 */
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"Access to file %s denied by server: not a regular file",
name);
apr_file_close(file);
return APR_EBADF;
}
#ifdef WIN32
/* Some twisted character [no pun intended] at MS decided that a
* zero width joiner as the lead wide character would be ideal for
* describing Unicode text files. This was further convoluted to
* another MSism that the same character mapped into utf-8, EF BB BF
* would signify utf-8 text files.
*
* Since MS configuration files are all protecting utf-8 encoded
* Unicode path, file and resource names, we already have the correct
* WinNT encoding. But at least eat the stupid three bytes up front.
*/
{
unsigned char buf[4];
apr_size_t len = 3;
status = apr_file_read(file, buf, &len);
if ((status != APR_SUCCESS) || (len < 3)
|| memcmp(buf, "\xEF\xBB\xBF", 3) != 0) {
apr_off_t zero = 0;
apr_file_seek(file, APR_SET, &zero);
}
}
#endif
new_cfg = apr_palloc(p, sizeof(*new_cfg));
new_cfg->param = file;
new_cfg->name = apr_pstrdup(p, name);
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
new_cfg->getch = (int (*)(void *)) cfg_getch;
new_cfg->getstr = (void *(*)(void *, size_t, void *)) cfg_getstr;
new_cfg->close = (int (*)(void *)) cfg_close;
#else
new_cfg->getch = cfg_getch;
new_cfg->getstr = cfg_getstr;
new_cfg->close = cfg_close;
#endif
new_cfg->line_number = 0;
*ret_cfg = new_cfg;
return APR_SUCCESS;
}
AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name,
const command_rec *cmds)
{
while (cmds->name) {
if (!strcasecmp(name, cmds->name))
return cmds;
++cmds;
}
return NULL;
}
#define AP_MAX_ARGC 64
static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
void *mconfig, const char *args)
{
char *w, *w2, *w3;
const char *errmsg = NULL;
if ((parms->override & cmd->req_override) == 0)
return apr_pstrcat(parms->pool, cmd->name, " not allowed here", NULL);
parms->info = cmd->cmd_data;
parms->cmd = cmd;
switch (cmd->args_how) {
case RAW_ARGS:
#ifdef RESOLVE_ENV_PER_TOKEN
args = ap_resolve_env(parms->pool,args);
#endif
return cmd->AP_RAW_ARGS(parms, mconfig, args);
case TAKE_ARGV:
{
char *argv[AP_MAX_ARGC];
int argc = 0;
do {
w = ap_getword_conf(parms->pool, &args);
if (*w == '\0' && *args == '\0') {
break;
}
argv[argc] = w;
argc++;
} while (argc < AP_MAX_ARGC && *args != '\0');
return cmd->AP_TAKE_ARGV(parms, mconfig, argc, argv);
}
case NO_ARGS:
if (*args != 0)
return apr_pstrcat(parms->pool, cmd->name, " takes no arguments",
NULL);
return cmd->AP_NO_ARGS(parms, mconfig);
case TAKE1:
w = ap_getword_conf(parms->pool, &args);
if (*w == '\0' || *args != 0)
return apr_pstrcat(parms->pool, cmd->name, " takes one argument",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
return cmd->AP_TAKE1(parms, mconfig, w);
case TAKE2:
w = ap_getword_conf(parms->pool, &args);
w2 = ap_getword_conf(parms->pool, &args);
if (*w == '\0' || *w2 == '\0' || *args != 0)
return apr_pstrcat(parms->pool, cmd->name, " takes two arguments",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
return cmd->AP_TAKE2(parms, mconfig, w, w2);
case TAKE12:
w = ap_getword_conf(parms->pool, &args);
w2 = ap_getword_conf(parms->pool, &args);
if (*w == '\0' || *args != 0)
return apr_pstrcat(parms->pool, cmd->name, " takes 1-2 arguments",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
return cmd->AP_TAKE2(parms, mconfig, w, *w2 ? w2 : NULL);
case TAKE3:
w = ap_getword_conf(parms->pool, &args);
w2 = ap_getword_conf(parms->pool, &args);
w3 = ap_getword_conf(parms->pool, &args);
if (*w == '\0' || *w2 == '\0' || *w3 == '\0' || *args != 0)
return apr_pstrcat(parms->pool, cmd->name, " takes three arguments",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
case TAKE23:
w = ap_getword_conf(parms->pool, &args);
w2 = ap_getword_conf(parms->pool, &args);
w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
if (*w == '\0' || *w2 == '\0' || *args != 0)
return apr_pstrcat(parms->pool, cmd->name,
" takes two or three arguments",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
case TAKE123:
w = ap_getword_conf(parms->pool, &args);
w2 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
if (*w == '\0' || *args != 0)
return apr_pstrcat(parms->pool, cmd->name,
" takes one, two or three arguments",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
case TAKE13:
w = ap_getword_conf(parms->pool, &args);
w2 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
if (*w == '\0' || (w2 && *w2 && !w3) || *args != 0)
return apr_pstrcat(parms->pool, cmd->name,
" takes one or three arguments",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
case ITERATE:
while (*(w = ap_getword_conf(parms->pool, &args)) != '\0') {
errmsg = cmd->AP_TAKE1(parms, mconfig, w);
if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
return errmsg;
}
return errmsg;
case ITERATE2:
w = ap_getword_conf(parms->pool, &args);
if (*w == '\0' || *args == 0)
return apr_pstrcat(parms->pool, cmd->name,
" requires at least two arguments",
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
while (*(w2 = ap_getword_conf(parms->pool, &args)) != '\0') {
errmsg = cmd->AP_TAKE2(parms, mconfig, w, w2);
if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
return errmsg;
}
return errmsg;
case FLAG:
w = ap_getword_conf(parms->pool, &args);
if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(w, "off")))
return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
NULL);
return cmd->AP_FLAG(parms, mconfig, strcasecmp(w, "off") != 0);
default:
return apr_pstrcat(parms->pool, cmd->name,
" is improperly configured internally (server bug)",
NULL);
}
}
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
static cmd_parms default_parms =
{NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
#endif
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 3
static cmd_parms default_parms =
{NULL, 0, 0, NULL, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
#endif
const char *process_command_config(server_rec *s,
void *mconfig,
apr_pool_t *p,
apr_pool_t *ptemp,
const char *filename)
{
const char *errmsg;
cmd_parms parms;
char *l = apr_palloc (ptemp, MAX_STRING_LEN);
const char *args = l;
char *cmd_name;
const command_rec *cmd;
apr_array_header_t *arr = apr_array_make(p, 1, sizeof(char *));
apr_status_t status;
ap_directive_t *newdir;
parms = default_parms;
parms.pool = p;
parms.temp_pool = ptemp;
parms.server = s;
parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT);
parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI;
status = ap_pcfg_openfile(&parms.config_file, p, filename);
if(status != APR_SUCCESS)
{
// cannot open config file
//
}
while (!(ap_cfg_getline(l, MAX_STRING_LEN, parms.config_file))) {
if (*l == '#' || *l == '\0')
continue;
args = l;
cmd_name = ap_getword_conf(p, &args);
if (*cmd_name == '\0')
continue;
cmd = ap_find_command(cmd_name, security2_module.cmds);
if(cmd == NULL)
{
// unknown command, should error
//
printf("Unknown command: %s\n", cmd_name);
continue;
}
newdir = apr_pcalloc(p, sizeof(ap_directive_t));
newdir->filename = parms.config_file->name;
newdir->line_num = parms.config_file->line_number;
newdir->directive = cmd_name;
newdir->args = apr_pstrdup(p, args);
parms.directive = newdir;
errmsg = invoke_cmd(cmd, &parms, mconfig, args);
if(errmsg != NULL)
break;
}
ap_cfg_closefile(parms.config_file);
if (errmsg) {
char *err = (char *)apr_palloc(p, 1024);
apr_snprintf(err, 1024, "Syntax error in config file %s, line %d: %s", parms.config_file->name,
parms.config_file->line_number, errmsg);
return err;
}
return NULL;
}

248
standalone/filters.c Normal file
View File

@@ -0,0 +1,248 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#include <limits.h>
#include "http_core.h"
#include "http_request.h"
#include "modsecurity.h"
#include "apache2.h"
#include "http_main.h"
#include "http_connection.h"
#include "apr_optional.h"
#include "mod_log_config.h"
#include "msc_logging.h"
#include "msc_util.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "apr_version.h"
#include "apr_lib.h"
#include "ap_config.h"
#include "http_config.h"
#define FILTER_POOL apr_hook_global_pool
#include "apr_hooks.h"
/*
** This macro returns true/false if a given filter should be inserted BEFORE
** another filter. This will happen when one of: 1) there isn't another
** filter; 2) that filter has a higher filter type (class); 3) that filter
** corresponds to a different request.
*/
#define INSERT_BEFORE(f, before_this) ((before_this) == NULL \
|| (before_this)->frec->ftype > (f)->frec->ftype \
|| (before_this)->r != (f)->r)
apr_table_t *ms_input_filters = NULL;
apr_table_t *ms_output_filters = NULL;
void init_filter_tables()
{
if(ms_input_filters == NULL)
{
ms_input_filters = apr_table_make(FILTER_POOL, 10);
ms_output_filters = apr_table_make(FILTER_POOL, 10);
}
}
AP_DECLARE(ap_filter_rec_t *) ap_register_input_filter(const char *name,
ap_in_filter_func filter_func,
ap_init_filter_func filter_init,
ap_filter_type ftype)
{
ap_filter_rec_t *f;
init_filter_tables();
f = apr_palloc(FILTER_POOL, sizeof(ap_filter_rec_t));
f->filter_func.in_func = filter_func;
f->filter_init_func = filter_init;
f->ftype = ftype;
f->name = name;
apr_table_setn(ms_input_filters, name, (const char *)f);
return f;
}
AP_DECLARE(ap_filter_rec_t *) ap_register_output_filter(const char *name,
ap_out_filter_func filter_func,
ap_init_filter_func filter_init,
ap_filter_type ftype)
{
ap_filter_rec_t *f;
init_filter_tables();
f = apr_palloc(FILTER_POOL, sizeof(ap_filter_rec_t));
f->filter_func.out_func = filter_func;
f->filter_init_func = filter_init;
f->ftype = ftype;
f->name = name;
apr_table_setn(ms_output_filters, name, (const char *)f);
return f;
}
static ap_filter_t *add_any_filter_handle(ap_filter_rec_t *frec, void *ctx,
request_rec *r, conn_rec *c,
ap_filter_t **r_filters,
ap_filter_t **p_filters,
ap_filter_t **c_filters)
{
apr_pool_t* p = r ? r->pool : c->pool;
ap_filter_t *f = apr_palloc(p, sizeof(*f));
ap_filter_t **outf;
if (frec->ftype < AP_FTYPE_PROTOCOL) {
if (r) {
outf = r_filters;
}
else {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"a content filter was added without a request: %s", frec->name);
return NULL;
}
}
else if (frec->ftype < AP_FTYPE_CONNECTION) {
if (r) {
outf = p_filters;
}
else {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"a protocol filter was added without a request: %s", frec->name);
return NULL;
}
}
else {
outf = c_filters;
}
f->frec = frec;
f->ctx = ctx;
f->r = r;
f->c = c;
f->next = NULL;
if (INSERT_BEFORE(f, *outf)) {
f->next = *outf;
if (*outf) {
ap_filter_t *first = NULL;
if (r) {
/* If we are adding our first non-connection filter,
* Then don't try to find the right location, it is
* automatically first.
*/
if (*r_filters != *c_filters) {
first = *r_filters;
while (first && (first->next != (*outf))) {
first = first->next;
}
}
}
if (first && first != (*outf)) {
first->next = f;
}
}
*outf = f;
}
else {
ap_filter_t *fscan = *outf;
while (!INSERT_BEFORE(f, fscan->next))
fscan = fscan->next;
f->next = fscan->next;
fscan->next = f;
}
if (frec->ftype < AP_FTYPE_CONNECTION && (*r_filters == *c_filters)) {
*r_filters = *p_filters;
}
return f;
}
AP_DECLARE(ap_filter_t *) ap_add_input_filter(const char *name, void *ctx,
request_rec *r, conn_rec *c)
{
ap_filter_rec_t *f = (ap_filter_rec_t *)apr_table_get(ms_input_filters, name);
if(f == NULL)
return NULL;
return add_any_filter_handle(f, ctx, r, c,
r ? &r->input_filters : NULL,
r ? &r->proto_input_filters : NULL, &c->input_filters);
}
AP_DECLARE(ap_filter_t *) ap_add_output_filter(const char *name, void *ctx,
request_rec *r, conn_rec *c)
{
ap_filter_rec_t *f = (ap_filter_rec_t *)apr_table_get(ms_output_filters, name);
if(f == NULL)
return NULL;
return add_any_filter_handle(f, ctx, r, c,
r ? &r->output_filters : NULL,
r ? &r->proto_output_filters : NULL, &c->output_filters);
}
static void remove_any_filter(ap_filter_t *f, ap_filter_t **r_filt, ap_filter_t **p_filt,
ap_filter_t **c_filt)
{
ap_filter_t **curr = r_filt ? r_filt : c_filt;
ap_filter_t *fscan = *curr;
if (p_filt && *p_filt == f)
*p_filt = (*p_filt)->next;
if (*curr == f) {
*curr = (*curr)->next;
return;
}
while (fscan->next != f) {
if (!(fscan = fscan->next)) {
return;
}
}
fscan->next = f->next;
}
AP_DECLARE(void) ap_remove_input_filter(ap_filter_t *f)
{
remove_any_filter(f, f->r ? &f->r->input_filters : NULL,
f->r ? &f->r->proto_input_filters : NULL,
&f->c->input_filters);
}
AP_DECLARE(void) ap_remove_output_filter(ap_filter_t *f)
{
remove_any_filter(f, f->r ? &f->r->output_filters : NULL,
f->r ? &f->r->proto_output_filters : NULL,
&f->c->output_filters);
}

65
standalone/hooks.c Normal file
View File

@@ -0,0 +1,65 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#include <limits.h>
#include "http_core.h"
#include "http_request.h"
#include "modsecurity.h"
#include "apache2.h"
#include "http_main.h"
#include "http_connection.h"
#include "apr_optional.h"
#include "mod_log_config.h"
#include "msc_logging.h"
#include "msc_util.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "apr_version.h"
#include "apr_lib.h"
#include "ap_config.h"
#include "http_config.h"
#define DECLARE_EXTERNAL_HOOK(ns,link,ret,name,args) \
ns##_HOOK_##name##_t *hookfn_##name = NULL; \
link##_DECLARE(void) ns##_hook_##name(ns##_HOOK_##name##_t *pf, \
const char * const *aszPre, \
const char * const *aszSucc, int nOrder) \
{ \
hookfn_##name = pf; \
}
#define DECLARE_HOOK(ret,name,args) \
DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp))
DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s))
DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
DECLARE_HOOK(int,process_connection,(conn_rec *c))
DECLARE_HOOK(int,post_read_request,(request_rec *r))
DECLARE_HOOK(int,fixups,(request_rec *r))
DECLARE_HOOK(void, error_log, (const char *file, int line, int level,
apr_status_t status, const server_rec *s,
const request_rec *r, apr_pool_t *pool,
const char *errstr))
DECLARE_HOOK(int,log_transaction,(request_rec *r))
DECLARE_HOOK(void,insert_filter,(request_rec *r))
DECLARE_HOOK(void,insert_error_filter,(request_rec *r))

384
standalone/main.cpp Normal file
View File

@@ -0,0 +1,384 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
//#undef inline
#define inline inline
#include <stdio.h>
#include <conio.h>
#include "api.h"
char *config_file = NULL;
char *event_files[1024];
int event_file_cnt;
char *event_file = NULL;
int event_file_len = 0;
char **event_file_lines;
int event_line_cnt = 0;
int event_file_blocks[256];
#define EVENT_FILE_MAX_SIZE (16*1024*1024)
void readeventfile(char *name)
{
if(event_file == NULL)
{
event_file = (char *)malloc(EVENT_FILE_MAX_SIZE);
event_file_lines = (char **)malloc(EVENT_FILE_MAX_SIZE);
}
event_file_len = 0;
event_line_cnt = 0;
memset(event_file_blocks, -1, sizeof(int) * 256);
FILE *fr = fopen(name, "rb");
if(fr == NULL)
return;
event_file_len = fread(event_file, 1, EVENT_FILE_MAX_SIZE - 1, fr);
fclose(fr);
event_file[event_file_len] = 0;
}
void parseeventfile()
{
if(event_file_len == 0 || event_file == NULL)
return;
char *t = event_file;
char *e = event_file + event_file_len;
int nocrlf = 1;
while(t < e)
{
event_file_lines[event_line_cnt++] = t;
while(t < e && *t != 10 && *t != 13)
t++;
char ct = *t;
*t = 0;
int i = event_line_cnt - 1;
int l = strlen(event_file_lines[i]);
if(l == 14 && event_file_lines[i][0] == '-' && event_file_lines[i][1] == '-' && event_file_lines[i][l-2] == '-' && event_file_lines[i][l-1] == '-')
{
char blk = event_file_lines[i][l-3];
event_file_blocks[blk] = i;
if(blk == 'C' || blk == 'G')
{
nocrlf = 0;
}
else
{
nocrlf = 1;
}
}
*t = ct;
if(nocrlf)
while(t < e && (*t == 10 || *t == 13))
*t++ = 0;
else
while(t < e && (*t == 10 || *t == 13))
t++;
}
}
void parseargs(int argc, char *argv[])
{
int i = 1;
event_file_cnt = 0;
while(i < argc)
{
if(argv[i][0] == '-')
{
if(argv[i][1] == 'c' && i < argc - 1)
{
config_file = argv[i + 1];
i += 2;
continue;
}
i++;
continue;
}
if(event_file_cnt == 1024)
{
fprintf(stderr, "Too many input files! (limit 1024)\n");
break;
}
event_files[event_file_cnt++] = argv[i++];
}
}
void log(void *obj, int level, char *str)
{
printf("%s\n", str);
}
unsigned int bodypos = 0;
apr_status_t readbody(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)
{
int j = event_file_blocks['C'];
if(j < 0)
{
*is_eos = 1;
return APR_SUCCESS;
}
j++;
if(event_file_lines[j][0] == 0)
{
*is_eos = 1;
return APR_SUCCESS;
}
unsigned int l = strlen(event_file_lines[j]);
unsigned int size = length;
if(bodypos + size > l)
size = l - bodypos;
memcpy(buf, &event_file_lines[j][bodypos], size);
bodypos += size;
*readcnt = size;
if(bodypos == l)
{
*is_eos = 1;
}
return APR_SUCCESS;
}
unsigned int responsepos = 0;
apr_status_t readresponse(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)
{
int j = event_file_blocks['G'];
if(j < 0)
{
*is_eos = 1;
return APR_SUCCESS;
}
j++;
if(event_file_lines[j][0] == 0)
{
*is_eos = 1;
return APR_SUCCESS;
}
unsigned int l = strlen(event_file_lines[j]);
unsigned int size = length;
if(responsepos + size > l)
size = l - responsepos;
memcpy(buf, &event_file_lines[j][responsepos], size);
responsepos += size;
*readcnt = size;
if(responsepos == l)
*is_eos = 1;
return APR_SUCCESS;
}
void main(int argc, char *argv[])
{
directory_config *config;
conn_rec *c;
request_rec *r;
parseargs(argc, argv);
if(config_file == NULL || argc < 3)
{
printf("Usage:\n");
printf("standalone.exe -c <config_file> <event_file1> [<event_file2> <event_file3> ...]\n");
return;
}
modsecSetLogHook(NULL, log);
modsecSetReadBody(readbody);
modsecSetReadResponse(readresponse);
modsecInit();
modsecStartConfig();
config = modsecGetDefaultConfig();
const char * err = modsecProcessConfig(config, config_file);
if(err != NULL)
{
printf("%s\n", err);
}
modsecFinalizeConfig();
modsecInitProcess();
for(int i = 0; i < event_file_cnt; i++)
{
readeventfile(event_files[i]);
parseeventfile();
bodypos = 0;
responsepos = 0;
c = modsecNewConnection();
modsecProcessConnection(c);
r = modsecNewRequest(c, config);
int j = event_file_blocks['B'];
if(j < 0)
continue;
j++;
if(event_file_lines[j][0] == 0)
continue;
char *method = event_file_lines[j];
char *url = strchr(method, 32);
char *proto = strchr(url + 1, 32);
if(url == NULL || proto == NULL)
continue;
*url++=0;
*proto++=0;
#define SETMETHOD(m) if(strcmp(method,#m) == 0){ r->method = method; r->method_number = M_##m; }
r->method = "INVALID";
r->method_number = M_INVALID;
SETMETHOD(OPTIONS)
SETMETHOD(GET)
SETMETHOD(POST)
SETMETHOD(PUT)
SETMETHOD(DELETE)
SETMETHOD(TRACE)
SETMETHOD(CONNECT)
SETMETHOD(MOVE)
SETMETHOD(COPY)
SETMETHOD(PROPFIND)
SETMETHOD(PROPPATCH)
SETMETHOD(MKCOL)
SETMETHOD(LOCK)
SETMETHOD(UNLOCK)
r->protocol = proto;
while(event_file_lines[++j][0] != 0)
{
char *value = strchr(event_file_lines[j], ':');
if(value == NULL)
break;
*value++ = 0;
while(*value <=32 && *value != 0)
value++;
apr_table_setn(r->headers_in, event_file_lines[j], value);
}
r->content_encoding = apr_table_get(r->headers_in, "Content-Encoding");
r->content_type = apr_table_get(r->headers_in, "Content-Type");
r->hostname = apr_table_get(r->headers_in, "Host");
r->path_info = url;
char *query = strchr(url, '?');
char *rawurl = url;
if(query != NULL)
{
rawurl = (char *)apr_palloc(r->pool, strlen(url) + 1);
strcpy(rawurl, url);
*query++ = 0;
r->args = query;
}
const char *lng = apr_table_get(r->headers_in, "Content-Languages");
if(lng != NULL)
{
r->content_languages = apr_array_make(r->pool, 1, sizeof(const char *));
*(const char **)apr_array_push(r->content_languages) = lng;
}
r->request_time = apr_time_now();
r->parsed_uri.scheme = "http";
r->parsed_uri.path = r->path_info;
r->parsed_uri.hostname = (char *)r->hostname;
r->parsed_uri.is_initialized = 1;
r->parsed_uri.port = 80;
r->parsed_uri.port_str = "80";
r->parsed_uri.query = r->args;
r->parsed_uri.dns_looked_up = 0;
r->parsed_uri.dns_resolved = 0;
r->parsed_uri.password = NULL;
r->parsed_uri.user = NULL;
r->parsed_uri.fragment = NULL;
r->unparsed_uri = rawurl;
r->uri = r->unparsed_uri;
r->the_request = (char *)apr_palloc(r->pool, strlen(r->method) + 1 + strlen(r->uri) + 1 + strlen(r->protocol) + 1);
strcpy(r->the_request, r->method);
strcat(r->the_request, " ");
strcat(r->the_request, r->uri);
strcat(r->the_request, " ");
strcat(r->the_request, r->protocol);
apr_table_setn(r->subprocess_env, "UNIQUE_ID", "1");
modsecProcessRequest(r);
modsecProcessResponse(r);
modsecFinishRequest(r);
}
modsecTerminate();
getch();
}

19
standalone/modules.mk Normal file
View File

@@ -0,0 +1,19 @@
MOD_SECURITY2 = mod_security2 apache2_config apache2_io apache2_util \
re re_operators re_actions re_tfns re_variables \
msc_logging msc_xml msc_multipart modsecurity msc_parsers msc_util msc_pcre \
persist_dbm msc_reqbody pdf_protect msc_geo msc_gsb msc_unicode acmp msc_lua
H = re.h modsecurity.h msc_logging.h msc_multipart.h msc_parsers.h \
msc_pcre.h msc_util.h msc_xml.h persist_dbm.h apache2.h pdf_protect.h \
msc_geo.h msc_gsb.h msc_unicode.h acmp.h utf8tables.h msc_lua.h
${MOD_SECURITY2:=.slo}: ${H}
${MOD_SECURITY2:=.lo}: ${H}
${MOD_SECURITY2:=.o}: ${H}
mod_security2.la: ${MOD_SECURITY2:=.slo}
$(SH_LINK) -rpath $(libexecdir) -module -avoid-version ${MOD_SECURITY2:=.lo}
DISTCLEAN_TARGETS = modules.mk
shared = mod_security2.la

162
standalone/regex.c Normal file
View File

@@ -0,0 +1,162 @@
/*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*/
#include <limits.h>
#include "http_core.h"
#include "http_request.h"
#include "modsecurity.h"
#include "apache2.h"
#include "http_main.h"
#include "http_connection.h"
#include "apr_optional.h"
#include "mod_log_config.h"
#include "msc_logging.h"
#include "msc_util.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "apr_version.h"
#include "apr_lib.h"
#include "ap_config.h"
#include "http_config.h"
static apr_status_t regex_cleanup(void *preg)
{
ap_regfree((ap_regex_t *) preg);
return APR_SUCCESS;
}
AP_DECLARE(ap_regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
int cflags)
{
ap_regex_t *preg = apr_palloc(p, sizeof *preg);
if (ap_regcomp(preg, pattern, cflags)) {
return NULL;
}
apr_pool_cleanup_register(p, (void *) preg, regex_cleanup,
apr_pool_cleanup_null);
return preg;
}
AP_DECLARE(void) ap_regfree(ap_regex_t *preg)
{
(pcre_free)(preg->re_pcre);
}
AP_DECLARE(int) ap_regcomp(ap_regex_t *preg, const char *pattern, int cflags)
{
const char *errorptr;
int erroffset;
int options = 0;
int nsub = 0;
if ((cflags & AP_REG_ICASE) != 0) options |= PCRE_CASELESS;
if ((cflags & AP_REG_NEWLINE) != 0) options |= PCRE_MULTILINE;
preg->re_pcre = pcre_compile(pattern, options, &errorptr, &erroffset, NULL);
preg->re_erroffset = erroffset;
if (preg->re_pcre == NULL) return AP_REG_INVARG;
pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, &nsub);
preg->re_nsub = nsub;
return 0;
}
#ifndef POSIX_MALLOC_THRESHOLD
#define POSIX_MALLOC_THRESHOLD (10)
#endif
AP_DECLARE(int) ap_regexec(const ap_regex_t *preg, const char *string,
apr_size_t nmatch, ap_regmatch_t pmatch[],
int eflags)
{
int rc;
int options = 0;
int *ovector = NULL;
int small_ovector[POSIX_MALLOC_THRESHOLD * 3];
int allocated_ovector = 0;
if ((eflags & AP_REG_NOTBOL) != 0) options |= PCRE_NOTBOL;
if ((eflags & AP_REG_NOTEOL) != 0) options |= PCRE_NOTEOL;
((ap_regex_t *)preg)->re_erroffset = (apr_size_t)(-1); /* Only has meaning after compile */
if (nmatch > 0)
{
if (nmatch <= POSIX_MALLOC_THRESHOLD)
{
ovector = &(small_ovector[0]);
}
else
{
ovector = (int *)malloc(sizeof(int) * nmatch * 3);
if (ovector == NULL) return AP_REG_ESPACE;
allocated_ovector = 1;
}
}
rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string, (int)strlen(string),
0, options, ovector, nmatch * 3);
if (rc == 0) rc = nmatch; /* All captured slots were filled in */
if (rc >= 0)
{
apr_size_t i;
for (i = 0; i < (apr_size_t)rc; i++)
{
pmatch[i].rm_so = ovector[i*2];
pmatch[i].rm_eo = ovector[i*2+1];
}
if (allocated_ovector) free(ovector);
for (; i < nmatch; i++) pmatch[i].rm_so = pmatch[i].rm_eo = -1;
return 0;
}
else
{
if (allocated_ovector) free(ovector);
switch(rc)
{
case PCRE_ERROR_NOMATCH: return AP_REG_NOMATCH;
case PCRE_ERROR_NULL: return AP_REG_INVARG;
case PCRE_ERROR_BADOPTION: return AP_REG_INVARG;
case PCRE_ERROR_BADMAGIC: return AP_REG_INVARG;
case PCRE_ERROR_UNKNOWN_NODE: return AP_REG_ASSERT;
case PCRE_ERROR_NOMEMORY: return AP_REG_ESPACE;
#ifdef PCRE_ERROR_MATCHLIMIT
case PCRE_ERROR_MATCHLIMIT: return AP_REG_ESPACE;
#endif
#ifdef PCRE_ERROR_BADUTF8
case PCRE_ERROR_BADUTF8: return AP_REG_INVARG;
#endif
#ifdef PCRE_ERROR_BADUTF8_OFFSET
case PCRE_ERROR_BADUTF8_OFFSET: return AP_REG_INVARG;
#endif
default: return AP_REG_ASSERT;
}
}
}

1041
standalone/server.c Normal file

File diff suppressed because it is too large Load Diff

26
standalone/standalone.sln Normal file
View File

@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "standalone", "standalone.vcxproj", "{20EC871F-B6A0-4398-9B67-A33598A796E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|Win32.ActiveCfg = Debug|Win32
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|Win32.Build.0 = Debug|Win32
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|x64.ActiveCfg = Debug|x64
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|x64.Build.0 = Debug|x64
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|Win32.ActiveCfg = Release|Win32
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|Win32.Build.0 = Release|Win32
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|x64.ActiveCfg = Release|x64
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,212 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{20EC871F-B6A0-4398-9B67-A33598A796E8}</ProjectGuid>
<RootNamespace>standalone</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;c:\work\apache24\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC;VERSION_STANDALONE</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>c:\drop\x86</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>c:\drop\x86</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\apache2\acmp.c" />
<ClCompile Include="..\apache2\apache2_config.c" />
<ClCompile Include="..\apache2\apache2_io.c" />
<ClCompile Include="..\apache2\apache2_util.c" />
<ClCompile Include="..\apache2\modsecurity.c" />
<ClCompile Include="..\apache2\mod_security2.c" />
<ClCompile Include="..\apache2\msc_crypt.c" />
<ClCompile Include="..\apache2\msc_geo.c" />
<ClCompile Include="..\apache2\msc_gsb.c" />
<ClCompile Include="..\apache2\msc_logging.c" />
<ClCompile Include="..\apache2\msc_lua.c" />
<ClCompile Include="..\apache2\msc_multipart.c" />
<ClCompile Include="..\apache2\msc_parsers.c" />
<ClCompile Include="..\apache2\msc_pcre.c" />
<ClCompile Include="..\apache2\msc_release.c" />
<ClCompile Include="..\apache2\msc_reqbody.c" />
<ClCompile Include="..\apache2\msc_tree.c" />
<ClCompile Include="..\apache2\msc_unicode.c" />
<ClCompile Include="..\apache2\msc_util.c" />
<ClCompile Include="..\apache2\msc_xml.c" />
<ClCompile Include="..\apache2\persist_dbm.c" />
<ClCompile Include="..\apache2\re.c" />
<ClCompile Include="..\apache2\re_actions.c" />
<ClCompile Include="..\apache2\re_operators.c" />
<ClCompile Include="..\apache2\re_tfns.c" />
<ClCompile Include="..\apache2\re_variables.c" />
<ClCompile Include="api.c" />
<ClCompile Include="buckets.c">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
<ClCompile Include="config.c" />
<ClCompile Include="filters.c">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
<ClCompile Include="hooks.c">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
<ClCompile Include="main.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
<ClCompile Include="regex.c">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
<ClCompile Include="server.c">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\apache2\acmp.h" />
<ClInclude Include="..\apache2\apache2.h" />
<ClInclude Include="..\apache2\modsecurity.h" />
<ClInclude Include="..\apache2\modsecurity_config.h" />
<ClInclude Include="..\apache2\modsecurity_config_auto.h" />
<ClInclude Include="..\apache2\msc_crypt.h" />
<ClInclude Include="..\apache2\msc_geo.h" />
<ClInclude Include="..\apache2\msc_gsb.h" />
<ClInclude Include="..\apache2\msc_logging.h" />
<ClInclude Include="..\apache2\msc_lua.h" />
<ClInclude Include="..\apache2\msc_multipart.h" />
<ClInclude Include="..\apache2\msc_parsers.h" />
<ClInclude Include="..\apache2\msc_pcre.h" />
<ClInclude Include="..\apache2\msc_release.h" />
<ClInclude Include="..\apache2\msc_tree.h" />
<ClInclude Include="..\apache2\msc_unicode.h" />
<ClInclude Include="..\apache2\msc_util.h" />
<ClInclude Include="..\apache2\msc_xml.h" />
<ClInclude Include="..\apache2\persist_dbm.h" />
<ClInclude Include="..\apache2\re.h" />
<ClInclude Include="..\apache2\utf8tables.h" />
<ClInclude Include="api.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="ModSecurity Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="ModSecurity Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Standalone Sources">
<UniqueIdentifier>{2d4a2f57-e994-4dad-888a-e61a65029abf}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\apache2\acmp.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\apache2_config.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\apache2_io.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\apache2_util.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\mod_security2.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\modsecurity.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_geo.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_gsb.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_logging.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_lua.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_multipart.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_parsers.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_pcre.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_release.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_reqbody.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_unicode.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_util.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_xml.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\persist_dbm.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_actions.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_operators.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_tfns.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\re_variables.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="filters.c">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="hooks.c">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="buckets.c">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="regex.c">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="server.c">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="config.c">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="api.c">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>Standalone Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_crypt.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
<ClCompile Include="..\apache2\msc_tree.c">
<Filter>ModSecurity Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\apache2\acmp.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\apache2.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\modsecurity.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\modsecurity_config.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\modsecurity_config_auto.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_geo.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_gsb.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_logging.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_lua.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_multipart.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_parsers.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_pcre.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_release.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_unicode.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_util.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_xml.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\persist_dbm.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\re.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\utf8tables.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="api.h">
<Filter>Standalone Sources</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_crypt.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
<ClInclude Include="..\apache2\msc_tree.h">
<Filter>ModSecurity Headers</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>-c d:\xss.conf d:\test.dat</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand>
<LocalDebuggerAttach>false</LocalDebuggerAttach>
<LocalDebuggerDebuggerType>NativeOnly</LocalDebuggerDebuggerType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>-c d:\xss.conf d:\test.dat</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>