├── .gdbinit ├── .gitignore ├── CHANGES ├── INSTALL ├── LICENSE ├── LICENSE.GPLv2 ├── Makefile.in ├── NOTICE ├── README ├── README.md ├── acinclude.m4 ├── build ├── NWGNUenvironment.inc ├── NWGNUhead.inc ├── NWGNUmakefile ├── NWGNUscripts.inc ├── NWGNUtail.inc ├── PrintPath ├── apr_common.m4 ├── binbuild.sh ├── bsd_makefile ├── build-modules-c.awk ├── buildinfo.sh ├── config-stubs ├── config.guess ├── config.sub ├── config_vars.sh.in ├── default.pl ├── fastgen.sh ├── find_apr.m4 ├── find_apu.m4 ├── get-version.sh ├── install-bindist.sh.in ├── install.sh ├── installwinconf.awk ├── instdso.sh ├── library.mk ├── ltlib.mk ├── ltmain.sh ├── make_exports.awk ├── make_nw_export.awk ├── make_var_export.awk ├── mkconfNW.awk ├── mkdep.perl ├── mkdir.sh ├── nw_export.inc ├── nw_ver.awk ├── pkg │ ├── README │ ├── buildpkg.sh │ └── pkginfo.in ├── program.mk ├── pubgen.sh ├── rpm │ ├── htcacheclean.init │ ├── httpd.init │ ├── httpd.logrotate │ └── httpd.spec.in ├── rules.mk.in ├── special.mk ├── sysv_makefile └── win32 │ ├── apache.ico │ ├── httpd.rc │ └── win32ver.awk ├── buildconf ├── config.layout ├── configure ├── configure.in ├── data ├── GeoIsp.dat ├── GeoLiteCity.dat └── unicode.mapping ├── docs ├── conf │ ├── charset.conv │ ├── cli.conf │ ├── extra │ │ ├── httpd-autoindex.conf.in │ │ ├── httpd-dav.conf.in │ │ ├── httpd-default.conf.in │ │ ├── httpd-info.conf.in │ │ ├── httpd-languages.conf.in │ │ ├── httpd-manual.conf.in │ │ ├── httpd-mpm.conf.in │ │ ├── httpd-multilang-errordoc.conf.in │ │ ├── httpd-ssl.conf.in │ │ ├── httpd-userdir.conf.in │ │ └── httpd-vhosts.conf.in │ ├── httpd.conf.in │ ├── magic │ └── mime.types ├── docroot │ └── index.html └── doxygen.conf ├── emacs-style ├── include ├── .indent.pro ├── ap_compat.h ├── ap_config.h ├── ap_config_auto.h.in ├── ap_config_layout.h.in ├── ap_listen.h ├── ap_mmn.h ├── ap_mpm.h ├── ap_provider.h ├── ap_regex.h ├── ap_regkey.h ├── ap_release.h ├── bitmap.h ├── cli_common.h ├── convert_rule.h ├── engine_config.h ├── http_config.h ├── http_connection.h ├── http_core.h ├── http_log.h ├── http_main.h ├── http_protocol.h ├── http_request.h ├── http_vhost.h ├── httpd.h ├── mod_log_config.h ├── mod_ssl.h ├── mod_status.h ├── mpm_common.h ├── scoreboard.h ├── util_cfgtree.h ├── util_charset.h ├── util_ebcdic.h ├── util_filter.h ├── util_ip.h ├── util_ldap.h ├── util_md5.h ├── util_script.h ├── util_time.h └── util_xml.h ├── modules ├── Makefile.in ├── NWGNUmakefile ├── README ├── aaa │ ├── .indent.pro │ ├── Makefile.in │ ├── config.m4 │ ├── mod_auth.h │ └── mod_authz_host.c ├── cache │ ├── .indent.pro │ ├── Makefile.in │ ├── cache_cache.c │ ├── cache_cache.h │ ├── cache_hash.c │ ├── cache_hash.h │ ├── cache_pqueue.c │ ├── cache_pqueue.h │ ├── cache_storage.c │ ├── cache_util.c │ ├── config.m4 │ ├── mod_cache.c │ ├── mod_cache.h │ ├── mod_cache.imp │ ├── mod_disk_cache.c │ ├── mod_disk_cache.h │ ├── mod_file_cache.c │ └── mod_mem_cache.c ├── config5.m4 ├── filters │ ├── .indent.pro │ ├── Makefile.in │ ├── config.m4 │ ├── mod_deflate.c │ └── mod_include.h ├── http │ ├── .indent.pro │ ├── Makefile.in │ ├── byterange_filter.c │ ├── chunk_filter.c │ ├── config2.m4 │ ├── http_core.c │ ├── http_etag.c │ ├── http_filters.c │ ├── http_protocol.c │ ├── http_request.c │ ├── mod_core.h │ ├── mod_mime.c │ ├── mod_mime.dep │ ├── mod_mime.dsp │ ├── mod_mime.exp │ └── mod_mime.mak ├── mappers │ ├── .indent.pro │ ├── Makefile.in │ ├── config9.m4 │ ├── mod_so.c │ └── mod_so.h ├── metadata │ ├── Makefile.in │ ├── config.m4 │ └── mod_unique_id.c ├── offline │ ├── Makefile.in │ ├── mod_offline.c │ ├── mod_offline.h │ └── offline_public.h.in ├── proxy │ ├── .indent.pro │ ├── CHANGES │ ├── Makefile.in │ ├── config.m4 │ ├── mod_proxy.c │ ├── mod_proxy.h │ ├── mod_proxy_balancer.c │ ├── mod_proxy_http.c │ └── proxy_util.c └── security │ ├── Makefile.in │ ├── acmp.c │ ├── acmp.h │ ├── apache2.h │ ├── apache2_config.c │ ├── apache2_io.c │ ├── apache2_util.c │ ├── bwlist_common.c │ ├── bwlist_common.h │ ├── ip_bwlist.c │ ├── ip_bwlist.h │ ├── mod_security2.c │ ├── modsecurity.c │ ├── modsecurity.h │ ├── modsecurity_config.h │ ├── modsecurity_config_auto.h.in │ ├── msc_build_version.sh │ ├── msc_cookie_key.c │ ├── msc_cookie_key.h │ ├── msc_cookie_signature.c │ ├── msc_cookie_signature.h │ ├── msc_geo.c │ ├── msc_geo.h │ ├── msc_gsb.c │ ├── msc_gsb.h │ ├── msc_logging.c │ ├── msc_logging.h │ ├── msc_logging_bak.c │ ├── msc_lua.c │ ├── msc_lua.h │ ├── msc_multipart.c │ ├── msc_multipart.h │ ├── msc_parsers.c │ ├── msc_parsers.h │ ├── msc_pcre.c │ ├── msc_pcre.h │ ├── msc_release.c │ ├── msc_release.h │ ├── msc_reqbody.c │ ├── msc_ssl.c │ ├── msc_ssl.h │ ├── msc_unicode.c │ ├── msc_unicode.h │ ├── msc_util.c │ ├── msc_util.h │ ├── msc_xml.c │ ├── msc_xml.h │ ├── persist_dbm.c │ ├── persist_dbm.h │ ├── re.c │ ├── re.h │ ├── re_actions.c │ ├── re_operators.c │ ├── re_tfns.c │ ├── re_variables.c │ ├── security_public.h │ ├── security_public.h.in │ ├── url_bwlist.c │ ├── url_bwlist.h │ └── utf8tables.h ├── os ├── .indent.pro ├── Makefile.in ├── config.m4 ├── os2 │ ├── Makefile.in │ ├── config.m4 │ ├── core.mk │ ├── core_header.def │ ├── os.h │ └── util_os2.c └── unix │ ├── Makefile.in │ ├── config.m4 │ ├── os.h │ ├── unixd.c │ └── unixd.h ├── server ├── .indent.pro ├── Makefile.in ├── NWGNUmakefile ├── buildmark.c ├── cli │ ├── Makefile.in │ └── linux │ │ ├── Makefile.in │ │ ├── bridge-proxy-mode.cli │ │ ├── cc-mode.cli │ │ ├── cc-url.cli │ │ ├── cli_black_white_list.c │ │ ├── cli_black_white_list.h │ │ ├── cli_global.c │ │ ├── cli_interface.c │ │ ├── cli_log.c │ │ ├── cli_security_policy.h │ │ ├── cli_security_policy_interface.c │ │ ├── cli_security_policy_keyword.c │ │ ├── cli_security_policy_mode.c │ │ ├── cli_server_policy.c │ │ ├── code-injection-mode.cli │ │ ├── command-injection-mode.cli │ │ ├── configure-in.cli │ │ ├── configure-pe.cli │ │ ├── cookie-mode.cli │ │ ├── cparser_show_tree.c │ │ ├── cparser_show_tree.h │ │ ├── cparser_tree.c │ │ ├── cparser_tree.h │ │ ├── creditcard-information-mode.cli │ │ ├── csrf-attack-mode.cli │ │ ├── file-download-mode.cli │ │ ├── file-upload-mode.cli │ │ ├── idcard-information-mode.cli │ │ ├── ip-black-list.cli │ │ ├── ip-white-list.cli │ │ ├── keyword-filter-mode.cli │ │ ├── mk_parser.py │ │ ├── mk_parser_show.py │ │ ├── offline-mode.cli │ │ ├── pe_cli.c │ │ ├── pe_cli.h │ │ ├── protocol-param-mode.cli │ │ ├── request-method-mode.cli │ │ ├── reverse-proxy-mode.cli │ │ ├── root-configure.cli │ │ ├── route-proxy-mode.cli │ │ ├── security-policy-mode.cli │ │ ├── server-policy-advanced-mode.cli │ │ ├── server-policy-mode.cli │ │ ├── server-version-mode.cli │ │ ├── spider-scanner-attack-mode.cli │ │ ├── sql-injection-mode.cli │ │ ├── trojan-mode.cli │ │ ├── url-black-list.cli │ │ ├── url-white-list.cli │ │ ├── waf-root.cli │ │ ├── waf-show.cli │ │ ├── weak-password-mode.cli │ │ ├── weak-password-url-mode.cli │ │ └── xss-attack-mode.cli ├── cli_common.c ├── config.c ├── config.m4 ├── connection.c ├── convert │ ├── Makefile.in │ ├── bitmap.c │ ├── combind_rule.c │ ├── config.m4 │ ├── convert_add_check_value.c │ ├── convert_add_two_keyword.c │ ├── convert_black_white.c │ ├── convert_cc_protect.c │ ├── convert_code_injection.c │ ├── convert_command.c │ ├── convert_cookie.c │ ├── convert_csrf.c │ ├── convert_file_download.c │ ├── convert_file_upload.c │ ├── convert_iccard_information.c │ ├── convert_idcard_information.c │ ├── convert_init.c │ ├── convert_keyword_filter.c │ ├── convert_modify_check_value.c │ ├── convert_policy.c │ ├── convert_private.h │ ├── convert_protocol_param.c │ ├── convert_request_method.c │ ├── convert_server_version.c │ ├── convert_spider.c │ ├── convert_sql_injection.c │ ├── convert_subpolicy.c │ ├── convert_tools.c │ ├── convert_trojan.c │ ├── convert_weak_passwd.c │ └── convert_xss_attack.c ├── core.c ├── core_filters.c ├── engine_config.c ├── eoc_bucket.c ├── error_bucket.c ├── gen_test_char.c ├── gen_test_char.dep ├── gen_test_char.dsp ├── gen_test_char.mak ├── listen.c ├── log.c ├── main.c ├── mpm │ ├── MPM.NAMING │ ├── Makefile.in │ ├── config.m4 │ └── worker │ │ ├── Makefile.in │ │ ├── config5.m4 │ │ ├── fdqueue.c │ │ ├── fdqueue.h │ │ ├── mpm.h │ │ ├── mpm_default.h │ │ ├── pod.c │ │ ├── pod.h │ │ └── worker.c ├── mpm_common.c ├── protocol.c ├── provider.c ├── request.c ├── scoreboard.c ├── util.c ├── util_cfgtree.c ├── util_charset.c ├── util_debug.c ├── util_ebcdic.c ├── util_filter.c ├── util_ip.c ├── util_md5.c ├── util_pcre.c ├── util_script.c ├── util_time.c ├── util_xml.c └── vhost.c ├── srclib ├── Makefile.in └── pcre │ ├── AUTHORS │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── LICENCE │ ├── Makefile.in │ ├── NEWS │ ├── NON-UNIX-USE │ ├── NWGNUmakefile │ ├── README │ ├── RunTest.in │ ├── config.hw │ ├── config.in │ ├── configure │ ├── configure.in │ ├── dftables.c │ ├── dftables.dep │ ├── dftables.dsp │ ├── dftables.mak │ ├── dll.mk │ ├── doc │ └── README_httpd │ ├── get.c │ ├── install-sh │ ├── internal.h │ ├── libpcre.def │ ├── libpcre.pc.in │ ├── libpcreposix.def │ ├── maketables.c │ ├── makevp.bat │ ├── mkinstalldirs │ ├── pcre-config.in │ ├── pcre.c │ ├── pcre.def │ ├── pcre.dep │ ├── pcre.dsp │ ├── pcre.hw │ ├── pcre.in │ ├── pcre.mak │ ├── pcredemo.c │ ├── pcregrep.c │ ├── pcreposix.c │ ├── pcreposix.dsp │ ├── pcretest.c │ ├── perltest │ ├── perltest8 │ ├── pgrep.c │ ├── printint.c │ ├── study.c │ ├── testdata │ ├── testinput1 │ ├── testinput2 │ ├── testinput3 │ ├── testinput4 │ ├── testinput5 │ ├── testinput6 │ ├── testoutput1 │ ├── testoutput2 │ ├── testoutput3 │ ├── testoutput4 │ ├── testoutput5 │ └── testoutput6 │ ├── ucp.c │ ├── ucp.h │ ├── ucpinternal.h │ ├── ucptable.c │ └── ucptypetable.c └── support ├── Makefile.in ├── README ├── config.m4 ├── htcacheclean.c ├── interface.sh.in ├── rotatelogs.c ├── split-logfile.in └── tproxy.sh.in /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | 4 | # Libraries 5 | *.lib 6 | *.a 7 | 8 | # Shared objects (inc. Windows DLLs) 9 | *.dll 10 | *.so 11 | *.so.* 12 | *.dylib 13 | 14 | # Executables 15 | *.exe 16 | *.out 17 | *.app 18 | -------------------------------------------------------------------------------- /CHANGES: -------------------------------------------------------------------------------- 1 |  -*------ utf-8 -------*- 2 | 3 | Changes with PE 1.0.0 4 | *) Create -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | FreeWAF 2 | Copyright 2013 FreeWAF Development Team. 3 | 4 | This product includes software developed at 5 | The FreeWAF Development Team (http://www.freewaf.org/). 6 | 7 | Portions of this software were developed at the National Center 8 | for Supercomputing Applications (NCSA) at the University of 9 | Illinois at Urbana-Champaign. 10 | 11 | This software contains code derived from the RSA Data Security 12 | Inc. MD5 Message-Digest Algorithm, including various 13 | modifications by Spyglass Inc., Carnegie Mellon University, and 14 | Bell Communications Research, Inc (Bellcore). 15 | 16 | Regular expression support is provided by the PCRE library package, 17 | which is open source software, written by Philip Hazel, and copyright 18 | by the University of Cambridge, England. The original software is 19 | available from 20 | ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 21 | 22 | Lua support is provided by the Lua library package, 23 | which is open source software, copyright at Lua.org, PUC-Rio 24 | The original software is available from 25 | http://www.lua.org 26 | 27 | Curl support is provided by the curl library package, 28 | which is open source software, copyright at Daniel Stenberg. 29 | The original software is available from 30 | http://curl.haxx.se/download.html 31 | 32 | Zlib support is provided by the zlib library package, 33 | which is open source software, written by Jean-loup Gailly (compression) and Mark Adler 34 | The original software is available from 35 | http://zlib.net/ 36 | 37 | Ssl support is provided by the libssl library package, 38 | which is open source software, written by Jean-loup Gailly (compression) and Mark Adler 39 | The original software is available from 40 | http://www.openssl.org/ 41 | 42 | Xml support is provided by the libxml library package, 43 | which is open source software, copyright at Daniel Veillard 44 | The original software is available from 45 | http://www.xml.com/ 46 | 47 | Thanks authors of libgeoip and libmysqlclient. Sorry that we cannot list your names in this file, 48 | beacuse we have not found your real names. -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | -*------ utf-8 -------*- 2 | 3 | 4 | PE(Protection Engine) 5 | 6 | What is it? 7 | ----------- 8 | 9 | Protection engine is a core function of FreeWAF software. 10 | As web applications become more and more abundant, the web 11 | server with its powerful computing capacity, processing 12 | properties and the aggregates containing high value gradually 13 | become hackers' main target. Protection engine execute a 14 | series of detection to protect web servers with the 15 | HTTP/HTTPS security strategies. It can deal with all kinds 16 | of security threats in the Web application, such as SQL injection, 17 | XSS, CSRF, Cookie poisoning and more attacks, etc. 18 | 19 | 20 | The Latest Version 21 | ------------------ 22 | 23 | Details of the latest version can be found on the FreeWAF 24 | website page under . 25 | 26 | 27 | Documentation 28 | ------------- 29 | 30 | The documentation available as of the date of this release 31 | can be found at 32 | . 33 | 34 | 35 | Installation 36 | ------------ 37 | 38 | Please see the file called INSTALL. 39 | 40 | 41 | Licensing 42 | --------- 43 | 44 | Please see the file called LICENSE.GPLv2. 45 | 46 | 47 | Contacts 48 | -------- 49 | o If you want to be informed about new code releases, bug fixes, 50 | function fixes, general news and information about the FreeWAF 51 | open the . 52 | 53 | o If you have a concrete bug report for FreeWAF, please go to the 54 | FreeWAF Bug System and submit your report: 55 | 56 | 57 | o If you develop new function, the function can be submitted 58 | to the Feature Patches forum of Tickets at 59 | . The FreeWAF team will review 60 | it, in through the audit, as you will submit its to the code 61 | repository. 62 | 63 | o If you want to communicate with FreeWAF developers real-time, 64 | join the QQ group: 196138446. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | waf-pe 2 | ====== 3 | 4 | Open Source Web Application Firewall Protection Engine 5 | -------------------------------------------------------------------------------- /build/NWGNUscripts.inc: -------------------------------------------------------------------------------- 1 | # Include for creating start/stop/restart NCF scripts. 2 | 3 | instscripts:: FORCE $(INSTALLBASE)/ap2start.ncf $(INSTALLBASE)/ap2auto.ncf $(INSTALLBASE)/ap2rest.ncf $(INSTALLBASE)/ap2stop.ncf 4 | 5 | $(INSTALLBASE)/ap2start.ncf: 6 | @echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@ 7 | @echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@ 8 | @echo $(DL)# httpcloseport 80 /silent$(DL)>> $@ 9 | @echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@ 10 | @echo $(DL)load address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@ 11 | @echo $(DL)# If you have problems with 3rd-party modules try to load in OS space.$(DL)>> $@ 12 | @echo $(DL)# load SYS:/$(BASEDIR)/apache2$(DL)>> $@ 13 | @$(ECHONL)>> $@ 14 | 15 | $(INSTALLBASE)/ap2auto.ncf: 16 | @echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@ 17 | @echo $(DL)# and let automatically restart in case it crashes$(DL)>> $@ 18 | @echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@ 19 | @echo $(DL)# httpcloseport 80 /silent$(DL)>> $@ 20 | @echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@ 21 | @echo $(DL)restart address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@ 22 | @$(ECHONL)>> $@ 23 | 24 | $(INSTALLBASE)/ap2rest.ncf: 25 | @echo $(DL)# NCF to restart Apache 2.x in own address space$(DL)> $@ 26 | @echo $(DL)apache2 restart -p $(BASEDIR)$(DL)>> $@ 27 | @echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@ 28 | @echo $(DL)# apache2 restart$(DL)>> $@ 29 | @$(ECHONL)>> $@ 30 | 31 | $(INSTALLBASE)/ap2stop.ncf: 32 | @echo $(DL)# NCF to stop Apache 2.x in own address space$(DL)> $@ 33 | @echo $(DL)apache2 shutdown -p $(BASEDIR)$(DL)>> $@ 34 | @echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@ 35 | @echo $(DL)# apache2 shutdown$(DL)>> $@ 36 | @$(ECHONL)>> $@ 37 | 38 | $(INSTALLBASE)/ap2prod.ncf: 39 | @echo $(DL)# NCF to create a product record for Apache 2.x in product database$(DL)> $@ 40 | @echo $(DL)PRODSYNC DEL APACHE$(VERSION_MAJMIN)$(DL)>> $@ 41 | @echo $(DL)PRODSYNC ADD APACHE$(VERSION_MAJMIN) ProductRecord "$(VERSION_STR)" "Apache $(VERSION_STR) Webserver"$(DL)>> $@ 42 | @$(ECHONL)>> $@ 43 | 44 | -------------------------------------------------------------------------------- /build/bsd_makefile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # 19 | # The build environment was provided by Sascha Schumann. 20 | 21 | # cwd must be top_srcdir 22 | test -f build/bsd_makefile || exit 2 23 | 24 | test -f bsd_converted && exit 0 25 | 26 | tmpfile=`mktemp /tmp/bsd_makefile.XXXXXX 2>/dev/null` || tmpfile="tmp.$$" 27 | for i in build/*.mk; do 28 | sed 's/^include \(.*\)/.include "\1"/' $i >$tmpfile \ 29 | && cp $tmpfile $i 30 | done 31 | rm -f $tmpfile 32 | 33 | touch bsd_converted 34 | exit 0 35 | -------------------------------------------------------------------------------- /build/config-stubs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Find all config files (config*.m4) and map them into lines with the 5 | # form: NUM? '0' ' ' PATH 6 | # 7 | # For example: 8 | # 9 | # 50 ./modules/generators/config5.m4 10 | # 0 ./modules/aaa/config.m4 11 | # 10 ./example/config1.m4 12 | # 13 | # These lines are sorted, then the first field is removed. Thus, we 14 | # have a set of paths sorted on the config-number (if present). All 15 | # config files without a number are sorted before those with a number. 16 | # 17 | 18 | configfiles=`find . -name "config*.m4" | \ 19 | sed 's#\(.*/config\)\(.*\).m4#\20 \1\2.m4#' | \ 20 | sort | \ 21 | sed 's#.* ##'` 22 | 23 | for configfile in $configfiles; do 24 | if [ -r $configfile ]; then 25 | echo "sinclude($configfile)" 26 | fi 27 | done 28 | -------------------------------------------------------------------------------- /build/fastgen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # 19 | # The build environment was provided by Sascha Schumann. 20 | 21 | srcdir=$1 22 | shift 23 | 24 | mkdir_p=$1 25 | shift 26 | 27 | bsd_makefile=$1 28 | shift 29 | 30 | top_srcdir=`(cd $srcdir; pwd)` 31 | top_builddir=`pwd` 32 | 33 | if test "$mkdir_p" = "yes"; then 34 | mkdir_p="mkdir -p" 35 | else 36 | mkdir_p="$top_srcdir/build/mkdir.sh" 37 | fi 38 | 39 | if test "$bsd_makefile" = "yes"; then 40 | (cd $top_srcdir; ./build/bsd_makefile) 41 | 42 | for makefile in $@; do 43 | echo "creating $makefile" 44 | dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'` 45 | 46 | if test -z "$dir"; then 47 | real_srcdir=$top_srcdir 48 | real_builddir=$top_builddir 49 | dir="." 50 | else 51 | $mkdir_p "$dir/" 52 | real_srcdir=$top_srcdir/$dir 53 | real_builddir=$top_builddir/$dir 54 | fi 55 | cat - $top_srcdir/$makefile.in <$makefile 56 | top_srcdir = $top_srcdir 57 | top_builddir = $top_builddir 58 | srcdir = $real_srcdir 59 | builddir = $real_builddir 60 | VPATH = $real_srcdir 61 | EOF 62 | 63 | touch $dir/.deps 64 | done 65 | else 66 | for makefile in $@; do 67 | echo "creating $makefile" 68 | dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'` 69 | 70 | if test -z "$dir"; then 71 | real_srcdir=$top_srcdir 72 | real_builddir=$top_builddir 73 | dir="." 74 | else 75 | $mkdir_p "$dir/" 76 | real_srcdir=$top_srcdir/$dir 77 | real_builddir=$top_builddir/$dir 78 | fi 79 | cat - $top_srcdir/$makefile.in <$makefile 80 | top_srcdir = $top_srcdir 81 | top_builddir = $top_builddir 82 | srcdir = $real_srcdir 83 | builddir = $real_builddir 84 | VPATH = $real_srcdir 85 | EOF 86 | 87 | touch $dir/.deps 88 | done 89 | fi 90 | -------------------------------------------------------------------------------- /build/get-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # 19 | # extract version numbers from a header file 20 | # 21 | # USAGE: get-version.sh CMD VERSION_HEADER PREFIX 22 | # where CMD is one of: all, major, libtool 23 | # where PREFIX is the prefix to {MAJOR|MINOR|PATCH}_VERSION defines 24 | # 25 | # get-version.sh all returns a dotted version number 26 | # get-version.sh major returns just the major version number 27 | # get-version.sh libtool returns a version "libtool -version-info" format 28 | # 29 | 30 | if test $# != 3; then 31 | echo "USAGE: $0 CMD INCLUDEDIR PREFIX" 32 | echo " where CMD is one of: all, major" 33 | exit 1 34 | fi 35 | 36 | major_sed="/#define.*$3_MAJORVERSION/s/^.*\([0-9][0-9]*\).*$/\1/p" 37 | minor_sed="/#define.*$3_MINORVERSION/s/^.*\([0-9][0-9]*\).*$/\1/p" 38 | patch_sed="/#define.*$3_PATCHLEVEL/s/^[^0-9]*\([0-9][0-9a-z-]*\).*$/\1/p" 39 | mmn_sed="/#define.*$3_MAJOR/s/^[^0-9]*\([0-9][0-9]*\).*$/\1/p" 40 | major="`sed -n $major_sed $2`" 41 | minor="`sed -n $minor_sed $2`" 42 | patch="`sed -n $patch_sed $2`" 43 | mmn="`sed -n $mmn_sed $2`" 44 | 45 | if test "$1" = "all"; then 46 | echo ${major}.${minor}.${patch} 47 | elif test "$1" = "major"; then 48 | echo ${major} 49 | elif test "$1" = "mmn"; then 50 | echo ${mmn} 51 | elif test "$1" = "libtool"; then 52 | # Yes, ${minor}:${patch}:${minor} is correct due to libtool idiocy. 53 | echo ${minor}:${patch}:${minor} 54 | else 55 | echo "ERROR: unknown version CMD ($1)" 56 | exit 1 57 | fi 58 | -------------------------------------------------------------------------------- /build/library.mk: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # 17 | # The build environment was provided by Sascha Schumann. 18 | 19 | LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X) 20 | 21 | $(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES) 22 | $(LINK) -static $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD) 23 | -------------------------------------------------------------------------------- /build/ltlib.mk: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # 17 | # The build environment was provided by Sascha Schumann. 18 | 19 | TARGETS = $(LTLIBRARY_NAME) 20 | 21 | include $(top_builddir)/build/rules.mk 22 | include $(top_srcdir)/build/library.mk 23 | 24 | -------------------------------------------------------------------------------- /build/make_var_export.awk: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # 17 | # Based on apr's make_export.awk, which is 18 | # based on Ryan Bloom's make_export.pl 19 | 20 | /^#[ \t]*if(def)? (AP[RU]?_|!?defined).*/ { 21 | if (old_filename != FILENAME) { 22 | if (old_filename != "") printf("%s", line) 23 | macro_no = 0 24 | found = 0 25 | count = 0 26 | old_filename = FILENAME 27 | line = "" 28 | } 29 | macro_stack[macro_no++] = macro 30 | macro = substr($0, length($1)+2) 31 | count++ 32 | line = line "#ifdef " macro "\n" 33 | next 34 | } 35 | 36 | /^#[ \t]*endif/ { 37 | if (count > 0) { 38 | count-- 39 | line = line "#endif /* " macro " */\n" 40 | macro = macro_stack[--macro_no] 41 | } 42 | if (count == 0) { 43 | if (found != 0) { 44 | printf("%s", line) 45 | } 46 | line = "" 47 | } 48 | next 49 | } 50 | 51 | function add_symbol (sym_name) { 52 | if (count) { 53 | found++ 54 | } 55 | for (i = 0; i < count; i++) { 56 | line = line "\t" 57 | } 58 | line = line sym_name "\n" 59 | 60 | if (count == 0) { 61 | printf("%s", line) 62 | line = "" 63 | } 64 | } 65 | 66 | /^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;$/ { 67 | varname = $NF; 68 | gsub( /[*;]/, "", varname); 69 | gsub( /\[.*\]/, "", varname); 70 | add_symbol(varname); 71 | } 72 | 73 | END { 74 | printf("%s", line) 75 | } 76 | -------------------------------------------------------------------------------- /build/mkdir.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # 19 | # mkdir.sh -- make directory hierarchy 20 | # 21 | # Based on `mkinstalldirs' from Noah Friedman 22 | # as of 1994-03-25, which was placed in the Public Domain. 23 | # Cleaned up for Apache's Autoconf-style Interface (APACI) 24 | # by Ralf S. Engelschall 25 | 26 | umask 022 27 | errstatus=0 28 | for file in ${1+"$@"} ; do 29 | set fnord `echo ":$file" |\ 30 | sed -e 's/^:\//%/' -e 's/^://' -e 's/\// /g' -e 's/^%/\//'` 31 | shift 32 | pathcomp= 33 | for d in ${1+"$@"}; do 34 | pathcomp="$pathcomp$d" 35 | case "$pathcomp" in 36 | -* ) pathcomp=./$pathcomp ;; 37 | ?: ) pathcomp="$pathcomp/" 38 | continue ;; 39 | esac 40 | if test ! -d "$pathcomp"; then 41 | echo "mkdir $pathcomp" 1>&2 42 | mkdir "$pathcomp" || errstatus=$? 43 | fi 44 | pathcomp="$pathcomp/" 45 | done 46 | done 47 | exit $errstatus 48 | 49 | -------------------------------------------------------------------------------- /build/nw_export.inc: -------------------------------------------------------------------------------- 1 | /* Must include ap_config.h first so that we can redefine 2 | the standard prototypes macros after it messes with 3 | them. */ 4 | #include "ap_config.h" 5 | 6 | /* Define all of the standard prototype macros as themselves 7 | so that httpd.h will not mess with them. This allows 8 | them to pass untouched so that the AWK script can pick 9 | them out of the preprocessed result file. */ 10 | #undef AP_DECLARE 11 | #define AP_DECLARE AP_DECLARE 12 | #undef AP_CORE_DECLARE 13 | #define AP_CORE_DECLARE AP_CORE_DECLARE 14 | #undef AP_DECLARE_NONSTD 15 | #define AP_DECLARE_NONSTD AP_DECLARE_NONSTD 16 | #undef AP_CORE_DECLARE_NONSTD 17 | #define AP_CORE_DECLARE_NONSTD AP_CORE_DECLARE_NONSTD 18 | #undef AP_DECLARE_HOOK 19 | #define AP_DECLARE_HOOK AP_DECLARE_HOOK 20 | #undef AP_DECLARE_DATA 21 | #define AP_DECLARE_DATA AP_DECLARE_DATA 22 | #undef APACHE_OS_H 23 | 24 | #include "httpd.h" 25 | 26 | /* Preprocess all of the standard HTTPD headers. */ 27 | #include "ap_compat.h" 28 | #include "ap_listen.h" 29 | #include "ap_mmn.h" 30 | #include "ap_mpm.h" 31 | #include "ap_provider.h" 32 | #include "ap_release.h" 33 | #include "http_config.h" 34 | #include "http_connection.h" 35 | #include "http_core.h" 36 | #include "http_log.h" 37 | #include "http_main.h" 38 | #include "http_protocol.h" 39 | #include "http_request.h" 40 | #include "http_vhost.h" 41 | #include "mpm_common.h" 42 | #include "ap_regex.h" 43 | #include "scoreboard.h" 44 | #include "util_cfgtree.h" 45 | #include "util_charset.h" 46 | #include "util_ebcdic.h" 47 | #include "util_filter.h" 48 | /*#include "util_ldap.h"*/ 49 | #include "util_md5.h" 50 | #include "util_script.h" 51 | #include "util_time.h" 52 | #include "util_xml.h" 53 | 54 | #include "mod_core.h" 55 | #include "mod_auth.h" 56 | -------------------------------------------------------------------------------- /build/nw_ver.awk: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | BEGIN { 17 | # fetch Apache version numbers from input file and write them to STDOUT 18 | 19 | while ((getline < ARGV[1]) > 0) { 20 | if (match ($0, /^#define AP_SERVER_COPYRIGHT \\/)) { 21 | if (((getline < ARGV[1]) > 0) && (split($0, c, "\"") == 3)) { 22 | copyright_str = c[2]; 23 | } 24 | } 25 | else if (match ($0, /^#define AP_SERVER_MAJORVERSION_NUMBER /)) { 26 | ver_major = $3; 27 | } 28 | else if (match ($0, /^#define AP_SERVER_MINORVERSION_NUMBER /)) { 29 | ver_minor = $3; 30 | } 31 | else if (match ($0, /^#define AP_SERVER_PATCHLEVEL_NUMBER/)) { 32 | ver_patch = $3; 33 | } 34 | else if (match ($0, /^#define AP_SERVER_DEVBUILD_BOOLEAN/)) { 35 | ver_devbuild = $3; 36 | } 37 | } 38 | ver_nlm = ver_major "," ver_minor "," ver_patch; 39 | ver_str = ver_major "." ver_minor "." ver_patch (ver_devbuild ? "-dev" : ""); 40 | 41 | print "VERSION = " ver_nlm ""; 42 | print "VERSION_STR = " ver_str ""; 43 | print "VERSION_MAJMIN = " ver_major ver_minor ""; 44 | print "COPYRIGHT_STR = " copyright_str ""; 45 | 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /build/pkg/README: -------------------------------------------------------------------------------- 1 | The script in this directory will attempt to build a Solaris package 2 | out of a source tree for httpd. 3 | 4 | To build a package, make sure you are in the root of the source tree, 5 | and run: 6 | 7 | build/pkg/buildpkg.sh 8 | 9 | A Solaris package called httpd---local.gz will be 10 | created in the root of the source tree. 11 | 12 | By default, the script will attempt to find a system installed version of 13 | APR and APR-util v1. You may override the location of apr or apr-util like so: 14 | 15 | build/pkg/buildpkg.sh --with-apr=some/other/path --with-apr-util=some/other/path 16 | 17 | -------------------------------------------------------------------------------- /build/pkg/pkginfo.in: -------------------------------------------------------------------------------- 1 | PKG="ASFhttpd" 2 | NAME="httpd" 3 | ARCH="@target_cpu@" 4 | VERSION="@HTTPD_VERSION@" 5 | CATEGORY="application" 6 | VENDOR="Apache Software Foundation" 7 | EMAIL="dev@httpd.apache.org" 8 | PSTAMP="dev@httpd.apache.org" 9 | BASEDIR="@prefix@" 10 | CLASSES="none" 11 | 12 | -------------------------------------------------------------------------------- /build/program.mk: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # 17 | # The build environment was provided by Sascha Schumann. 18 | 19 | PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo) 20 | 21 | $(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS) 22 | $(PROGRAM_PRELINK) 23 | $(LINK) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD) 24 | -------------------------------------------------------------------------------- /build/pubgen.sh: -------------------------------------------------------------------------------- 1 | 2 | DESFILENAME=./modules/$2/$2_public.h 3 | SRCFILENAME=./modules/$2/$2_public.h.in 4 | 5 | echo "Construct $2 module public debug MACRO header file" 6 | 7 | rm -rf $DESFILENAME 8 | 9 | cat - $SRCFILENAME < $DESFILENAME 10 | EOF 11 | 12 | sed -i "/endif/i\\$(echo $1)" $DESFILENAME 13 | -------------------------------------------------------------------------------- /build/rpm/httpd.logrotate: -------------------------------------------------------------------------------- 1 | /var/log/httpd/*log { 2 | missingok 3 | notifempty 4 | sharedscripts 5 | postrotate 6 | /sbin/service httpd graceful 2> /dev/null || true 7 | endscript 8 | } 9 | -------------------------------------------------------------------------------- /build/special.mk: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # 17 | # The build environment was provided by Sascha Schumann. 18 | 19 | all: all-recursive 20 | 21 | include $(builddir)/modules.mk 22 | 23 | TARGETS = $(static) 24 | SHARED_TARGETS = $(shared) 25 | INSTALL_TARGETS = install-modules-$(INSTALL_DSO) 26 | 27 | include $(top_builddir)/build/rules.mk 28 | 29 | install-modules-yes: 30 | @$(MKINSTALLDIRS) $(DESTDIR)$(libexecdir) 31 | @list='$(shared)'; for i in $$list; do \ 32 | $(top_srcdir)/build/instdso.sh SH_LIBTOOL='$(SH_LIBTOOL)' $$i $(DESTDIR)$(libexecdir); \ 33 | done 34 | 35 | install-modules-no: 36 | 37 | -------------------------------------------------------------------------------- /build/sysv_makefile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # 19 | # The build environment was provided by Sascha Schumann. 20 | 21 | # cwd must be top_srcdir 22 | test -f build/sysv_makefile || exit 2 23 | 24 | test -f bsd_converted || exit 1 25 | 26 | tmpfile=`mktemp /tmp/sysv_makefile.XXXXXX 2>/dev/null` || tmpfile="tmp.$$" 27 | for i in build/*.mk; do 28 | sed 's/^\.include "\(.*\)"/include \1/' $i >$tmpfile \ 29 | && cp $tmpfile $i 30 | done 31 | rm -f $tmpfile 32 | 33 | rm bsd_converted 34 | exit 0 35 | -------------------------------------------------------------------------------- /build/win32/apache.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/build/win32/apache.ico -------------------------------------------------------------------------------- /data/GeoIsp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/data/GeoIsp.dat -------------------------------------------------------------------------------- /data/GeoLiteCity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/data/GeoLiteCity.dat -------------------------------------------------------------------------------- /docs/conf/charset.conv: -------------------------------------------------------------------------------- 1 | 2 | # Lang-abbv Charset Language 3 | #--------------------------------- 4 | en ISO-8859-1 English 5 | UTF-8 utf8 UTF-8 6 | Unicode ucs Unicode 7 | th Cp874 Thai 8 | ja SJIS Japanese 9 | ko Cp949 Korean 10 | zh Cp950 Chinese-Traditional 11 | zh-cn GB2312 Chinese-Simplified 12 | zh-tw Cp950 Chinese 13 | cs ISO-8859-2 Czech 14 | hu ISO-8859-2 Hungarian 15 | hr ISO-8859-2 Croation 16 | pl ISO-8859-2 Polish 17 | ro ISO-8859-2 Romanian 18 | sr ISO-8859-2 Serbian 19 | sk ISO-8859-2 Slovak 20 | sl ISO-8859-2 Slovenian 21 | sq ISO-8859-2 Albanian 22 | bg ISO-8859-5 Bulgarian 23 | be ISO-8859-5 Byelorussian 24 | mk ISO-8859-5 Macedonian 25 | ru ISO-8859-5 Russian 26 | uk ISO-8859-5 Ukrainian 27 | ca ISO-8859-1 Catalan 28 | de ISO-8859-1 German 29 | da ISO-8859-1 Danish 30 | fi ISO-8859-1 Finnish 31 | fr ISO-8859-1 French 32 | es ISO-8859-1 Spanish 33 | is ISO-8859-1 Icelandic 34 | it ISO-8859-1 Italian 35 | nl ISO-8859-1 Dutch 36 | no ISO-8859-1 Norwegian 37 | pt ISO-8859-1 Portuguese 38 | sv ISO-8859-1 Swedish 39 | af ISO-8859-1 Afrikaans 40 | eu ISO-8859-1 Basque 41 | fo ISO-8859-1 Faroese 42 | gl ISO-8859-1 Galician 43 | ga ISO-8859-1 Irish 44 | gd ISO-8859-1 Scottish 45 | mt ISO-8859-3 Maltese 46 | eo ISO-8859-3 Esperanto 47 | el ISO-8859-7 Greek 48 | tr ISO-8859-9 Turkish 49 | he ISO-8859-8 Hebrew 50 | iw ISO-8859-8 Hebrew 51 | ar ISO-8859-6 Arabic 52 | et ISO-8859-1 Estonian 53 | lv ISO-8859-2 Latvian 54 | lt ISO-8859-2 Lithuanian 55 | -------------------------------------------------------------------------------- /docs/conf/cli.conf: -------------------------------------------------------------------------------- 1 | protect-engine security-policy default 2 | sql-injection-protect action deny log enable 3 | ldap-injection-protect action deny log enable 4 | email-injection-protect action deny log enable 5 | command-injection-protect action deny log enable 6 | code-injection-protect action deny log enable 7 | null-byte-injection-protect action deny log enable 8 | xss-attack-protect action deny log enable 9 | overflow-attack-protect action deny log enable 10 | file-include-attack-protect action deny log enable 11 | misc-attack-protect action deny log enable 12 | path-traversal-attack-protect action deny log enable 13 | directory-index-protect action deny log enable 14 | spider-scanner-attack-protect action deny log enable 15 | trojan-protect action deny log enable 16 | xml-attack-protect action deny log enable 17 | weak-password-protect action deny log enable 18 | server-version-protect log enable 19 | http-status-code-protect action deny log enable 20 | server-error-information-protect action deny log enable 21 | program-code-protect action deny log enable 22 | file-download-protect action deny log enable 23 | file-upload-protect action deny log enable 24 | cookie-protect action deny log enable 25 | protocol-param-protect action deny log enable 26 | request-method-protect action deny log enable 27 | keyword-filter action deny log enable 28 | cc-protect action deny log enable 29 | commit 30 | 31 | -------------------------------------------------------------------------------- /docs/conf/extra/httpd-dav.conf.in: -------------------------------------------------------------------------------- 1 | # 2 | # Distributed authoring and versioning (WebDAV) 3 | # 4 | # Required modules: mod_dav, mod_dav_fs, mod_setenvif, mod_alias 5 | # mod_auth_digest, mod_authn_file 6 | # 7 | 8 | # The following example gives DAV write access to a directory called 9 | # "uploads" under the ServerRoot directory. 10 | # 11 | # The User/Group specified in httpd.conf needs to have write permissions 12 | # on the directory where the DavLockDB is placed and on any directory where 13 | # "Dav On" is specified. 14 | 15 | DavLockDB "@@ServerRoot@@/var/DavLock" 16 | 17 | Alias /uploads "@@ServerRoot@@/uploads" 18 | 19 | 20 | Dav On 21 | 22 | Order Allow,Deny 23 | Allow from all 24 | 25 | AuthType Digest 26 | AuthName DAV-upload 27 | 28 | # You can use the htdigest program to create the password database: 29 | # htdigest -c "@@ServerRoot@@/user.passwd" DAV-upload admin 30 | AuthUserFile "@@ServerRoot@@/user.passwd" 31 | AuthDigestProvider file 32 | 33 | # Allow universal read-access, but writes are restricted 34 | # to the admin user. 35 | 36 | require user admin 37 | 38 | 39 | 40 | # 41 | # The following directives disable redirects on non-GET requests for 42 | # a directory that does not include the trailing slash. This fixes a 43 | # problem with several clients that do not appropriately handle 44 | # redirects for folders with DAV methods. 45 | # 46 | BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully 47 | BrowserMatch "MS FrontPage" redirect-carefully 48 | BrowserMatch "^WebDrive" redirect-carefully 49 | BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully 50 | BrowserMatch "^gnome-vfs/1.0" redirect-carefully 51 | BrowserMatch "^XML Spy" redirect-carefully 52 | BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully 53 | -------------------------------------------------------------------------------- /docs/conf/extra/httpd-default.conf.in: -------------------------------------------------------------------------------- 1 | # 2 | # This configuration file reflects default settings for Apache HTTP Server. 3 | # 4 | # You may change these, but chances are that you may not need to. 5 | # 6 | 7 | # 8 | # Timeout: The number of seconds before receives and sends time out. 9 | # 10 | Timeout 300 11 | 12 | # 13 | # KeepAlive: Whether or not to allow persistent connections (more than 14 | # one request per connection). Set to "Off" to deactivate. 15 | # 16 | KeepAlive On 17 | 18 | # 19 | # MaxKeepAliveRequests: The maximum number of requests to allow 20 | # during a persistent connection. Set to 0 to allow an unlimited amount. 21 | # We recommend you leave this number high, for maximum performance. 22 | # 23 | MaxKeepAliveRequests 100 24 | 25 | # 26 | # KeepAliveTimeout: Number of seconds to wait for the next request from the 27 | # same client on the same connection. 28 | # 29 | KeepAliveTimeout 5 30 | 31 | # 32 | # UseCanonicalName: Determines how Apache constructs self-referencing 33 | # URLs and the SERVER_NAME and SERVER_PORT variables. 34 | # When set "Off", Apache will use the Hostname and Port supplied 35 | # by the client. When set "On", Apache will use the value of the 36 | # ServerName directive. 37 | # 38 | UseCanonicalName Off 39 | 40 | # 41 | # AccessFileName: The name of the file to look for in each directory 42 | # for additional configuration directives. See also the AllowOverride 43 | # directive. 44 | # 45 | AccessFileName .htaccess 46 | 47 | # 48 | # ServerTokens 49 | # This directive configures what you return as the Server HTTP response 50 | # Header. The default is 'Full' which sends information about the OS-Type 51 | # and compiled in modules. 52 | # Set to one of: Full | OS | Minor | Minimal | Major | Prod 53 | # where Full conveys the most information, and Prod the least. 54 | # 55 | ServerTokens Full 56 | 57 | # 58 | # Optionally add a line containing the server version and virtual host 59 | # name to server-generated pages (internal error documents, FTP directory 60 | # listings, mod_status and mod_info output etc., but not CGI generated 61 | # documents or custom error documents). 62 | # Set to "EMail" to also include a mailto: link to the ServerAdmin. 63 | # Set to one of: On | Off | EMail 64 | # 65 | ServerSignature On 66 | 67 | # 68 | # HostnameLookups: Log the names of clients or just their IP addresses 69 | # e.g., www.apache.org (on) or 204.62.129.132 (off). 70 | # The default is off because it'd be overall better for the net if people 71 | # had to knowingly turn this feature on, since enabling it means that 72 | # each client request will result in AT LEAST one lookup request to the 73 | # nameserver. 74 | # 75 | HostnameLookups Off 76 | -------------------------------------------------------------------------------- /docs/conf/extra/httpd-info.conf.in: -------------------------------------------------------------------------------- 1 | # 2 | # Get information about the requests being processed by the server 3 | # and the configuration of the server. 4 | # 5 | # Required modules: mod_status (for the server-status handler), 6 | # mod_info (for the server-info handler) 7 | 8 | # 9 | # Allow server status reports generated by mod_status, 10 | # with the URL of http://servername/server-status 11 | # Change the ".example.com" to match your domain to enable. 12 | 13 | 14 | SetHandler server-status 15 | Order deny,allow 16 | Deny from all 17 | Allow from .example.com 18 | 19 | 20 | # 21 | # ExtendedStatus controls whether Apache will generate "full" status 22 | # information (ExtendedStatus On) or just basic information (ExtendedStatus 23 | # Off) when the "server-status" handler is called. The default is Off. 24 | # 25 | #ExtendedStatus On 26 | 27 | # 28 | # Allow remote server configuration reports, with the URL of 29 | # http://servername/server-info (requires that mod_info.c be loaded). 30 | # Change the ".example.com" to match your domain to enable. 31 | # 32 | 33 | SetHandler server-info 34 | Order deny,allow 35 | Deny from all 36 | Allow from .example.com 37 | 38 | -------------------------------------------------------------------------------- /docs/conf/extra/httpd-manual.conf.in: -------------------------------------------------------------------------------- 1 | # 2 | # Provide access to the documentation on your server as 3 | # http://yourserver.example.com/manual/ 4 | # The documentation is always available at 5 | # http://httpd.apache.org/docs/2.2/ 6 | # 7 | # Required modules: mod_alias, mod_setenvif, mod_negotiation 8 | # 9 | 10 | AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|pt-br|ru|tr))?(/.*)?$ "@exp_manualdir@$1" 11 | 12 | 13 | Options Indexes 14 | AllowOverride None 15 | Order allow,deny 16 | Allow from all 17 | 18 | 19 | SetHandler type-map 20 | 21 | # .tr is text/troff in mime.types! 22 | 23 | ForceType text/html 24 | 25 | 26 | SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|pt-br|ru|tr)/ prefer-language=$1 27 | RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|pt-br|ru|tr)){2,}(/.*)?$ /manual/$1$2 28 | 29 | LanguagePriority en de es fr ja ko pt-br ru tr 30 | ForceLanguagePriority Prefer Fallback 31 | 32 | -------------------------------------------------------------------------------- /docs/conf/extra/httpd-multilang-errordoc.conf.in: -------------------------------------------------------------------------------- 1 | # 2 | # The configuration below implements multi-language error documents through 3 | # content-negotiation. 4 | # 5 | # Required modules: mod_alias, mod_include, mod_negotiation 6 | # 7 | # We use Alias to redirect any /error/HTTP_.html.var response to 8 | # our collection of by-error message multi-language collections. We use 9 | # includes to substitute the appropriate text. 10 | # 11 | # You can modify the messages' appearance without changing any of the 12 | # default HTTP_.html.var files by adding the line: 13 | # 14 | # Alias /error/include/ "/your/include/path/" 15 | # 16 | # which allows you to create your own set of files by starting with the 17 | # @exp_errordir@/include/ files and copying them to /your/include/path/, 18 | # even on a per-VirtualHost basis. The default include files will display 19 | # your Apache version number and your ServerAdmin email address regardless 20 | # of the setting of ServerSignature. 21 | 22 | Alias /error/ "@exp_errordir@/" 23 | 24 | 25 | AllowOverride None 26 | Options IncludesNoExec 27 | AddOutputFilter Includes html 28 | AddHandler type-map var 29 | Order allow,deny 30 | Allow from all 31 | LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr 32 | ForceLanguagePriority Prefer Fallback 33 | 34 | 35 | ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var 36 | ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var 37 | ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var 38 | ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var 39 | ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var 40 | ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var 41 | ErrorDocument 410 /error/HTTP_GONE.html.var 42 | ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var 43 | ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var 44 | ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var 45 | ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var 46 | ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var 47 | ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var 48 | ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var 49 | ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var 50 | ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var 51 | ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var 52 | 53 | -------------------------------------------------------------------------------- /docs/conf/extra/httpd-userdir.conf.in: -------------------------------------------------------------------------------- 1 | # Settings for user home directories 2 | # 3 | # Required module: mod_userdir 4 | 5 | # 6 | # UserDir: The name of the directory that is appended onto a user's home 7 | # directory if a ~user request is received. Note that you must also set 8 | # the default access control for these directories, as in the example below. 9 | # 10 | UserDir public_html 11 | 12 | # 13 | # Control access to UserDir directories. The following is an example 14 | # for a site where these directories are restricted to read-only. 15 | # 16 | 17 | AllowOverride FileInfo AuthConfig Limit Indexes 18 | Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec 19 | 20 | Order allow,deny 21 | Allow from all 22 | 23 | 24 | Order deny,allow 25 | Deny from all 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/conf/extra/httpd-vhosts.conf.in: -------------------------------------------------------------------------------- 1 | # 2 | # Virtual Hosts 3 | # 4 | # If you want to maintain multiple domains/hostnames on your 5 | # machine you can setup VirtualHost containers for them. Most configurations 6 | # use only name-based virtual hosts so the server doesn't need to worry about 7 | # IP addresses. This is indicated by the asterisks in the directives below. 8 | # 9 | # Please see the documentation at 10 | # 11 | # for further details before you try to setup virtual hosts. 12 | # 13 | # You may use the command line option '-S' to verify your virtual host 14 | # configuration. 15 | 16 | # 17 | # Use name-based virtual hosting. 18 | # 19 | NameVirtualHost *:@@Port@@ 20 | 21 | # 22 | # VirtualHost example: 23 | # Almost any Apache directive may go into a VirtualHost container. 24 | # The first VirtualHost section is used for all requests that do not 25 | # match a ServerName or ServerAlias in any block. 26 | # 27 | 28 | ServerAdmin webmaster@dummy-host.example.com 29 | DocumentRoot "@@ServerRoot@@/docs/dummy-host.example.com" 30 | ServerName dummy-host.example.com 31 | ServerAlias www.dummy-host.example.com 32 | ErrorLog "@rel_logfiledir@/dummy-host.example.com-error_log" 33 | CustomLog "@rel_logfiledir@/dummy-host.example.com-access_log" common 34 | 35 | 36 | 37 | ServerAdmin webmaster@dummy-host2.example.com 38 | DocumentRoot "@@ServerRoot@@/docs/dummy-host2.example.com" 39 | ServerName dummy-host2.example.com 40 | ErrorLog "@rel_logfiledir@/dummy-host2.example.com-error_log" 41 | CustomLog "@rel_logfiledir@/dummy-host2.example.com-access_log" common 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /docs/docroot/index.html: -------------------------------------------------------------------------------- 1 |

It works!

-------------------------------------------------------------------------------- /docs/doxygen.conf: -------------------------------------------------------------------------------- 1 | PROJECT_NAME=Apache 2 | 3 | #INPUT=srclib/apr 4 | INPUT=. 5 | RECURSIVE=YES 6 | FILE_PATTERNS=*.h 7 | 8 | OUTPUT_DIRECTORY=docs/dox 9 | 10 | ENABLE_PREPROCESSING=YES 11 | MACRO_EXPANSION=YES 12 | QUIET=YES 13 | EXPAND_ONLY_PREDEF=YES 14 | #EXPAND_AS_DEFINED= 15 | # not sure why this doesn't work as EXPAND_AS_DEFINED, it should! 16 | PREDEFINED="APR_DECLARE(x)=x" \ 17 | "APR_DECLARE_NONSTD(x)=x" \ 18 | "AP_DECLARE_HOOK(ret,name,args)=ret name args;" \ 19 | "AP_DECLARE(x)=x" \ 20 | "AP_DECLARE_NONSTD(x)=x" \ 21 | "APR_HAS_THREADS" \ 22 | "APR_HAS_MMAP" \ 23 | APR_HAS_INLINE \ 24 | APR_HAS_FLOCK_SERIALIZE \ 25 | APR_HAS_SYSVSEM_SERIALIZE \ 26 | APR_HAS_POSIXSEM_SERIALIZE \ 27 | APR_HAS_FCNTL_SERIALIZE \ 28 | APR_HAS_PROC_PTHREAD_SERIALIZE \ 29 | APR_HAS_RWLOCK_SERIALIZE \ 30 | APR_HAS_SHARED_MEMORY \ 31 | APR_HAS_SENDFILE \ 32 | APR_HAS_FORK \ 33 | APR_HAS_RANDOM \ 34 | APR_HAS_XLATE \ 35 | APR_HAS_OTHER_CHILD \ 36 | APR_HAS_DSO \ 37 | APR_HAS_SO_ACCEPTFILTER \ 38 | APR_HAS_UNICODE_FS \ 39 | APR_HAS_PROC_INVOKED \ 40 | APR_HAS_USER \ 41 | APR_HAS_LARGE_FILES \ 42 | APR_HAS_XTHREAD_FILES \ 43 | DOXYGEN= \ 44 | APU_DECLARE_DATA= \ 45 | __pre_nw__= \ 46 | "APU_DECLARE(x)=x" 47 | 48 | OPTIMIZE_OUTPUT_FOR_C=YES 49 | 50 | FULL_PATH_NAMES=YES 51 | # some autoconf guru needs to make configure set this correctly... 52 | STRIP_FROM_PATH=/var/www/lxr/source 53 | -------------------------------------------------------------------------------- /emacs-style: -------------------------------------------------------------------------------- 1 | (add-hook 'c-mode-hook 2 | (function (lambda () 3 | (c-set-offset 'inclass' ++) 4 | (c-set-offset 'defun-block-intro' ++) 5 | (c-set-offset 'statement-block-intro' ++) 6 | (c-set-offset 'substatement' ++) 7 | (c-set-offset 'brace-list-intro' ++) 8 | (c-set-offset 'statement-case-intro' ++) 9 | (c-set-offset 'inextern-lang' 0) 10 | ))) 11 | (setq c++-mode-hook c-mode-hook) 12 | (setq-default indent-tabs-mode nil) 13 | -------------------------------------------------------------------------------- /include/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /include/ap_compat.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file ap_compat.h 19 | * @brief Redefine Apache 1.3 symbols 20 | */ 21 | 22 | #ifndef AP_COMPAT_H 23 | #define AP_COMPAT_H 24 | 25 | /* redefine 1.3.x symbols to the new symbol names */ 26 | 27 | #define MODULE_VAR_EXPORT AP_MODULE_DECLARE_DATA 28 | #define ap_send_http_header(r) ; 29 | 30 | #endif /* AP_COMPAT_H */ 31 | -------------------------------------------------------------------------------- /include/ap_mpm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/include/ap_mpm.h -------------------------------------------------------------------------------- /include/bitmap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/include/bitmap.h -------------------------------------------------------------------------------- /include/cli_common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/include/cli_common.h -------------------------------------------------------------------------------- /include/convert_rule.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/include/convert_rule.h -------------------------------------------------------------------------------- /include/engine_config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/include/engine_config.h -------------------------------------------------------------------------------- /include/httpd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/include/httpd.h -------------------------------------------------------------------------------- /include/mod_ssl.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file mod_ssl.h 19 | * @brief SSL extension module for Apache 20 | * 21 | * @defgroup MOD_SSL mod_ssl 22 | * @ingroup APACHE_MODS 23 | * @{ 24 | */ 25 | 26 | #ifndef __MOD_SSL_H__ 27 | #define __MOD_SSL_H__ 28 | 29 | #include "httpd.h" 30 | #include "apr_optional.h" 31 | 32 | /** The ssl_var_lookup() optional function retrieves SSL environment 33 | * variables. */ 34 | APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup, 35 | (apr_pool_t *, server_rec *, 36 | conn_rec *, request_rec *, 37 | char *)); 38 | 39 | /** The ssl_ext_lookup() optional function retrieves the value of a SSL 40 | * certificate X.509 extension. The client certificate is used if 41 | * peer is non-zero; the server certificate is used otherwise. The 42 | * oidnum parameter specifies the numeric OID (e.g. "1.2.3.4") of the 43 | * desired extension. The string value of the extension is returned, 44 | * or NULL on error. */ 45 | APR_DECLARE_OPTIONAL_FN(const char *, ssl_ext_lookup, 46 | (apr_pool_t *p, conn_rec *c, int peer, 47 | const char *oidnum)); 48 | 49 | /** An optional function which returns non-zero if the given connection 50 | * is using SSL/TLS. */ 51 | APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *)); 52 | 53 | /** The ssl_proxy_enable() and ssl_engine_disable() optional functions 54 | * are used by mod_proxy to enable use of SSL for outgoing 55 | * connections. */ 56 | 57 | APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *)); 58 | 59 | APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *)); 60 | 61 | APR_DECLARE_OPTIONAL_FN(apr_array_header_t *, ssl_extlist_by_oid, (request_rec *r, const char *oidstr)); 62 | 63 | #endif /* __MOD_SSL_H__ */ 64 | /** @} */ 65 | -------------------------------------------------------------------------------- /include/mod_status.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file mod_status.h 19 | * @brief Status Report Extension Module to Apache 20 | * 21 | * @defgroup MOD_STATUS mod_status 22 | * @ingroup APACHE_MODS 23 | * @{ 24 | */ 25 | 26 | #ifndef MOD_STATUS_H 27 | #define MOD_STATUS_H 28 | 29 | #include "ap_config.h" 30 | #include "httpd.h" 31 | 32 | #define AP_STATUS_SHORT (0x1) /* short, non-HTML report requested */ 33 | #define AP_STATUS_NOTABLE (0x2) /* HTML report without tables */ 34 | #define AP_STATUS_EXTENDED (0x4) /* detailed report */ 35 | 36 | #if !defined(WIN32) 37 | #define STATUS_DECLARE(type) type 38 | #define STATUS_DECLARE_NONSTD(type) type 39 | #define STATUS_DECLARE_DATA 40 | #elif defined(STATUS_DECLARE_STATIC) 41 | #define STATUS_DECLARE(type) type __stdcall 42 | #define STATUS_DECLARE_NONSTD(type) type 43 | #define STATUS_DECLARE_DATA 44 | #elif defined(STATUS_DECLARE_EXPORT) 45 | #define STATUS_DECLARE(type) __declspec(dllexport) type __stdcall 46 | #define STATUS_DECLARE_NONSTD(type) __declspec(dllexport) type 47 | #define STATUS_DECLARE_DATA __declspec(dllexport) 48 | #else 49 | #define STATUS_DECLARE(type) __declspec(dllimport) type __stdcall 50 | #define STATUS_DECLARE_NONSTD(type) __declspec(dllimport) type 51 | #define STATUS_DECLARE_DATA __declspec(dllimport) 52 | #endif 53 | 54 | /* Optional hooks which can insert extra content into the mod_status 55 | * output. FLAGS will be set to the bitwise OR of any of the 56 | * AP_STATUS_* flags. 57 | * 58 | * Implementations of this hook should generate content using 59 | * functions in the ap_rputs/ap_rprintf family; each hook should 60 | * return OK or DECLINED. */ 61 | APR_DECLARE_EXTERNAL_HOOK(ap, STATUS, int, status_hook, 62 | (request_rec *r, int flags)) 63 | #endif 64 | /** @} */ 65 | -------------------------------------------------------------------------------- /include/util_charset.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file util_charset.h 19 | * @brief charset conversion 20 | * 21 | * @defgroup APACHE_CORE_CHARSET Charset Conversion 22 | * @ingroup APACHE_CORE 23 | * @{ 24 | */ 25 | 26 | #ifndef APACHE_UTIL_CHARSET_H 27 | #define APACHE_UTIL_CHARSET_H 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #include "apr.h" 34 | 35 | #if APR_CHARSET_EBCDIC 36 | 37 | #include "apr_xlate.h" 38 | 39 | /** On EBCDIC machine this is a translation handle used to translate the 40 | * headers from the local machine format to ASCII for network transmission. 41 | * On an ASCII machine this is NULL */ 42 | extern apr_xlate_t *ap_hdrs_to_ascii; 43 | /** On EBCDIC machine this is a translation handle used to translate the 44 | * headers from ASCII to the local machine format after network transmission. 45 | * On an ASCII machine this is NULL */ 46 | extern apr_xlate_t *ap_hdrs_from_ascii; 47 | 48 | #endif /* APR_CHARSET_EBCDIC */ 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif /* !APACHE_UTIL_CHARSET_H */ 55 | /** @} */ 56 | -------------------------------------------------------------------------------- /include/util_ebcdic.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file util_ebcdic.h 19 | * @brief Utilities for EBCDIC conversion 20 | * 21 | * @defgroup APACHE_CORE_EBCDIC Utilities for EBCDIC conversion 22 | * @ingroup APACHE_CORE 23 | * @{ 24 | */ 25 | 26 | #ifndef APACHE_UTIL_EBCDIC_H 27 | #define APACHE_UTIL_EBCDIC_H 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | #include "apr_xlate.h" 35 | #include "httpd.h" 36 | #include "util_charset.h" 37 | 38 | #if APR_CHARSET_EBCDIC 39 | 40 | /** 41 | * Setup all of the global translation handlers 42 | * @param pool pool to allocate out of 43 | */ 44 | apr_status_t ap_init_ebcdic(apr_pool_t *pool); 45 | 46 | /** 47 | * Convert protocol data from the implementation character 48 | * set to ASCII. 49 | * @param buffer buffer to translate 50 | * @param len number of bytes to translate 51 | */ 52 | void ap_xlate_proto_to_ascii(char *buffer, apr_size_t len); 53 | 54 | /** 55 | * Convert protocol data to the implementation character 56 | * set from ASCII. 57 | * @param buffer buffer to translate 58 | * @param len number of bytes to translate 59 | */ 60 | void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len); 61 | 62 | /** 63 | * Convert protocol data from the implementation charater 64 | * set to ASCII, then send it. 65 | * @param r the current request 66 | * @param ... the strings to write, followed by a NULL pointer 67 | */ 68 | int ap_rvputs_proto_in_ascii(request_rec *r, ...); 69 | 70 | #else /* APR_CHARSET_EBCDIC */ 71 | 72 | #define ap_xlate_proto_to_ascii(x,y) /* NOOP */ 73 | #define ap_xlate_proto_from_ascii(x,y) /* NOOP */ 74 | 75 | #define ap_rvputs_proto_in_ascii ap_rvputs 76 | 77 | #endif /* APR_CHARSET_EBCDIC */ 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | 83 | #endif /* !APACHE_UTIL_EBCDIC_H */ 84 | /** @} */ 85 | -------------------------------------------------------------------------------- /include/util_ip.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file util_ip.h 19 | * @brief Apache ip location and isp search 20 | * 21 | * @defgroup APACHE_CORE_IP search functions 22 | * @ingroup APACHE_CORE 23 | * @{ 24 | */ 25 | 26 | #ifndef APACHE_UTIL_IP_H 27 | #define APACHE_UTIL_IP_H 28 | 29 | #include "apr.h" 30 | #include "httpd.h" 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | AP_DECLARE(ip_location_t *) ap_ip_load_location(apr_pool_t *p, const char *dir_name); 37 | 38 | AP_DECLARE(void) ap_ip_unload_location(ip_location_t *location); 39 | 40 | AP_DECLARE(void) ap_ip_get_country(ip_location_t *location, char *ip, char *country, int len); 41 | 42 | AP_DECLARE(void) ap_ip_get_province(ip_location_t *location, char *ip, char *province, int len); 43 | 44 | AP_DECLARE(void) ap_ip_get_city(ip_location_t *location, char *ip, char *city, int len); 45 | 46 | AP_DECLARE(void) ap_ip_get_isp(ip_location_t *location, char *ip, char *isp, int len); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif /* !APACHE_UTIL_IP_H */ 53 | /** @} */ 54 | 55 | -------------------------------------------------------------------------------- /include/util_xml.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file util_xml.h 19 | * @brief Apache XML library 20 | * 21 | * @defgroup APACHE_CORE_XML XML Library 22 | * @ingroup APACHE_CORE 23 | * @{ 24 | */ 25 | 26 | #ifndef UTIL_XML_H 27 | #define UTIL_XML_H 28 | 29 | #include "apr_xml.h" 30 | 31 | #include "httpd.h" 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /** 38 | * Get XML post data and parse it 39 | * @param r The current request 40 | * @param pdoc The XML post data 41 | * @return HTTP status code 42 | * @deffunc int ap_xml_parse_input(request_rec *r, apr_xml_doc **pdoc) 43 | */ 44 | AP_DECLARE(int) ap_xml_parse_input(request_rec *r, apr_xml_doc **pdoc); 45 | 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* UTIL_XML_H */ 52 | /** @} */ 53 | -------------------------------------------------------------------------------- /modules/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = $(MODULE_DIRS) 3 | CLEAN_SUBDIRS = $(MODULE_CLEANDIRS) 4 | 5 | include $(top_builddir)/build/rules.mk 6 | 7 | -------------------------------------------------------------------------------- /modules/NWGNUmakefile: -------------------------------------------------------------------------------- 1 | # 2 | # Declare the sub-directories to be built here 3 | # 4 | # To build with exerimental modules set the environment 5 | # variable EXPERIMENTAL=1 6 | # To build with the mod_ssl module set the environment 7 | # variable WITH_MOD_SSL=1 8 | 9 | # If USE_STDSOCKETS is defined we allways build mod_ssl 10 | ifdef USE_STDSOCKETS 11 | WITH_MOD_SSL=1 12 | endif 13 | 14 | SUBDIRS = \ 15 | aaa \ 16 | cache \ 17 | dav/main \ 18 | dav/fs \ 19 | dav/lock \ 20 | echo \ 21 | generators \ 22 | loggers \ 23 | mappers \ 24 | metadata \ 25 | proxy \ 26 | filters \ 27 | database \ 28 | $(EOLIST) 29 | 30 | # If LDAPSDK has been defined then build the util_ldap module 31 | ifneq "$(LDAPSDK)" "" 32 | SUBDIRS += ldap \ 33 | $(EOLIST) 34 | endif 35 | 36 | # If WITH_MOD_SSL and OSSLSDK have been defined then build the mod_ssl module 37 | ifdef WITH_MOD_SSL 38 | ifneq "$(OSSLSDK)" "" 39 | SUBDIRS += ssl \ 40 | $(EOLIST) 41 | endif 42 | endif 43 | 44 | #If the mod_edir directory exists then build the mod_edir module 45 | ifeq "$(wildcard $(AP_WORK)\modules\mod_edir)" "$(AP_WORK)\modules\mod_edir" 46 | SUBDIRS += mod_edir \ 47 | $(EOLIST) 48 | endif 49 | 50 | # Allow the experimental modules to be built if EXPERIMENTAL is defined 51 | ifdef EXPERIMENTAL 52 | SUBDIRS += experimental \ 53 | $(EOLIST) 54 | endif 55 | 56 | # Allow the debug modules to be built if DEBUG is defined 57 | ifdef DEBUG 58 | SUBDIRS += debug \ 59 | $(EOLIST) 60 | endif 61 | 62 | 63 | # 64 | # Get the 'head' of the build environment. This includes default targets and 65 | # paths to tools 66 | # 67 | 68 | include $(AP_WORK)/build/NWGNUhead.inc 69 | 70 | # 71 | # build this level's files 72 | 73 | ifeq "$(wildcard NWGNUmakefile.mak)" "NWGNUmakefile.mak" 74 | include NWGNUmakefile.mak 75 | endif 76 | 77 | # 78 | # You can use this target if all that is needed is to copy files to the 79 | # installation area 80 | # 81 | install :: nlms FORCE 82 | 83 | 84 | -------------------------------------------------------------------------------- /modules/README: -------------------------------------------------------------------------------- 1 | The directory structure for this level is as follows: 2 | 3 | aaa/ 4 | This directory contains modules dealing with authorization and 5 | authentication. 6 | 7 | arch/ 8 | 9 | cache/ 10 | This directory houses modules that implement file and data caching 11 | capability. 12 | 13 | database/ 14 | The apache DBD framework manages connections to SQL backends efficiently. 15 | 16 | dav/ 17 | This directory houses modules that implement WebDAV functionality. 18 | 19 | echo/ 20 | 21 | experimental/ 22 | In this directory we've placed some modules which we think 23 | provide some pretty interesting functionality, but which 24 | are still in the early stages of development and could 25 | evolve radically in the future. This code isn't supported 26 | officially. 27 | 28 | filters/ 29 | This directory houses modules that perform general inline data filtering. 30 | 31 | generators/ 32 | This directory houses modules that perform data generation functions. 33 | 34 | http/ 35 | This directory houses modules that basic HTTP protocol implementation. 36 | 37 | loggers/ 38 | This directory houses modules that handle logging functions. 39 | 40 | mappers/ 41 | This directory houses modules that handle URL mapping and 42 | rewriting. 43 | 44 | metadata/ 45 | This directory houses modules that deal with Header metadata. 46 | 47 | proxy/ 48 | This houses the code for the proxy module for Apache. 49 | 50 | ssl/ 51 | This directory houses code for OpenSSL functionality. 52 | 53 | test/ 54 | This directory houses modules which test various components 55 | of Apache. You should not compile these into a production 56 | server. 57 | 58 | -------------------------------------------------------------------------------- /modules/aaa/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /modules/aaa/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/build/special.mk 3 | 4 | -------------------------------------------------------------------------------- /modules/aaa/config.m4: -------------------------------------------------------------------------------- 1 | dnl modules enabled in this directory by default 2 | 3 | dnl Authentication (authn), Access, and Authorization (authz) 4 | 5 | dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) 6 | 7 | APACHE_MODPATH_INIT(aaa) 8 | 9 | dnl Authentication modules; modules checking a username and password against a 10 | dnl file, database, or other similar magic. 11 | dnl 12 | APACHE_MODULE(authn_file, file-based authentication control, , , yes) 13 | APACHE_MODULE(authn_dbm, DBM-based authentication control, , , most) 14 | APACHE_MODULE(authn_anon, anonymous user authentication control, , , most) 15 | APACHE_MODULE(authn_dbd, SQL-based authentication control, , , most) 16 | 17 | dnl - and just in case all of the above punt; a default handler to 18 | dnl keep the bad guys out. 19 | APACHE_MODULE(authn_default, authentication backstopper, , , yes) 20 | 21 | dnl Provider alias module. 22 | APACHE_MODULE(authn_alias, auth provider alias, , , no) 23 | 24 | dnl Authorization modules: modules which verify a certain property such as 25 | dnl membership of a group, value of the IP address against a list of pre 26 | dnl configured directives (e.g. require, allow) or against an external file 27 | dnl or database. 28 | dnl 29 | APACHE_MODULE(authz_host, host-based authorization control, , , yes) 30 | APACHE_MODULE(authz_groupfile, 'require group' authorization control, , , yes) 31 | APACHE_MODULE(authz_user, 'require user' authorization control, , , yes) 32 | APACHE_MODULE(authz_dbm, DBM-based authorization control, , , most) 33 | APACHE_MODULE(authz_owner, 'require file-owner' authorization control, , , most) 34 | 35 | dnl LDAP authentication module. This module has both the authn and authz 36 | dnl modules in one, so as to share the LDAP server config directives. 37 | APACHE_MODULE(authnz_ldap, LDAP based authentication, , , no, [ 38 | MOD_AUTHNZ_LDAP_LDADD="`$apu_config --ldap-libs`" || MOD_AUTHNZ_LDAP_LDADD="" 39 | AC_SUBST(MOD_AUTHNZ_LDAP_LDADD) 40 | ]) 41 | 42 | dnl - and just in case all of the above punt; a default handler to 43 | dnl keep the bad guys out. 44 | APACHE_MODULE(authz_default, authorization control backstopper, , , yes) 45 | 46 | dnl these are the front-end authentication modules 47 | 48 | APACHE_MODULE(auth_basic, basic authentication, , , yes) 49 | APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , most, [ 50 | APR_CHECK_APR_DEFINE(APR_HAS_RANDOM) 51 | if test $ac_cv_define_APR_HAS_RANDOM = "no"; then 52 | echo "You need APR random support to use mod_auth_digest." 53 | echo "Look at APR configure options --with-egd and --with-devrandom." 54 | enable_auth_digest="no" 55 | fi 56 | ]) 57 | 58 | APACHE_MODPATH_FINISH 59 | -------------------------------------------------------------------------------- /modules/cache/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /modules/cache/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/build/special.mk 3 | 4 | -------------------------------------------------------------------------------- /modules/cache/config.m4: -------------------------------------------------------------------------------- 1 | dnl modules enabled in this directory by default 2 | 3 | dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) 4 | 5 | APACHE_MODPATH_INIT(cache) 6 | 7 | APACHE_MODULE(file_cache, File cache, , , no) 8 | 9 | dnl # list of object files for mod_cache 10 | cache_objs="dnl 11 | mod_cache.lo dnl 12 | cache_storage.lo dnl 13 | cache_util.lo dnl 14 | " 15 | dnl # list of object files for mod_mem_cache 16 | mem_cache_objs="dnl 17 | mod_mem_cache.lo dnl 18 | cache_cache.lo dnl 19 | cache_pqueue.lo dnl 20 | cache_hash.lo dnl 21 | " 22 | APACHE_MODULE(cache, dynamic file caching, $cache_objs, , no) 23 | APACHE_MODULE(disk_cache, disk caching module, , , no) 24 | APACHE_MODULE(mem_cache, memory caching module, $mem_cache_objs, , no) 25 | 26 | APACHE_MODPATH_FINISH 27 | -------------------------------------------------------------------------------- /modules/cache/mod_cache.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/cache/mod_cache.c -------------------------------------------------------------------------------- /modules/cache/mod_cache.imp: -------------------------------------------------------------------------------- 1 | (MODCACHE) 2 | ap_cache_get_providers, 3 | ap_cache_liststr, 4 | ap_cache_tokstr, 5 | ap_cache_hex2usec, 6 | ap_cache_usec2hex, 7 | ap_cache_cacheable_hdrs_out, 8 | ap_cache_generate_name 9 | 10 | -------------------------------------------------------------------------------- /modules/config5.m4: -------------------------------------------------------------------------------- 1 | AC_MSG_CHECKING(for extra modules) 2 | AC_ARG_WITH(module, 3 | APACHE_HELP_STRING(--with-module=module-type:module-file, 4 | Enable module-file in the modules/ directory.), 5 | [ 6 | as_save_IFS="$IFS"; IFS="," 7 | for mod in $withval 8 | do 9 | modtype=`echo $mod | sed -e's/\(.*\):.*/\1/'` 10 | pkg=`echo $mod | sed -e's/.*:\(.*\)/\1/'` 11 | modfilec=`echo $pkg | sed -e 's;^.*/;;'` 12 | modfileo=`echo $pkg | sed -e 's;^.*/;;' -e 's;\.c$;.o;'` 13 | modpath_current="modules/$modtype" 14 | if test "x$mod" != "x$modpath_current/$modfilec"; then 15 | if test ! -d "$modpath_current"; then 16 | mkdir $modpath_current 17 | echo 'include $(top_srcdir)/build/special.mk' > $modpath_current/Makefile.in 18 | fi 19 | cp $pkg $modpath_current/$modfilec 20 | fi 21 | module=`echo $pkg | sed -e 's;\(.*/\).*mod_\(.*\).c;\2;'` 22 | objects="mod_$module.lo" 23 | # The filename of a convenience library must have a "lib" prefix: 24 | libname="libmod_$module.la" 25 | BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname" 26 | if test ! -s "$modpath_current/modules.mk"; then 27 | cat >>$modpath_current/modules.mk<>$modpath_current/modules.mk.tmp<> $modpath_current/modules.mk.tmp 40 | rm $modpath_current/modules.mk 41 | mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk 42 | sed -e "s/\(static =.*\)/\1 $libname/" $modpath_current/modules.mk > $modpath_current/modules.mk.tmp 43 | rm $modpath_current/modules.mk 44 | mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk 45 | fi 46 | MODLIST="$MODLIST $module" 47 | EXTRA_MODLIST="$EXTRA_MODLIST $modtype:$modfilec" 48 | MODULE_DIRS="$MODULE_DIRS $modtype" 49 | APACHE_FAST_OUTPUT($modpath_current/Makefile) 50 | done 51 | if test ! -z "$EXTRA_MODLIST"; then 52 | AC_MSG_RESULT(added:$EXTRA_MODLIST) 53 | fi 54 | IFS="$as_save_IFS" 55 | ], 56 | [ AC_MSG_RESULT(none) 57 | ]) 58 | -------------------------------------------------------------------------------- /modules/filters/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /modules/filters/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/build/special.mk 3 | 4 | -------------------------------------------------------------------------------- /modules/filters/mod_deflate.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/filters/mod_deflate.c -------------------------------------------------------------------------------- /modules/http/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /modules/http/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/build/special.mk 3 | 4 | -------------------------------------------------------------------------------- /modules/http/config2.m4: -------------------------------------------------------------------------------- 1 | dnl modules enabled in this directory by default 2 | 3 | APACHE_MODPATH_INIT(http) 4 | 5 | http_objects="http_core.lo http_protocol.lo http_request.lo http_filters.lo chunk_filter.lo byterange_filter.lo http_etag.lo" 6 | 7 | dnl mod_http should only be built as a static module for now. 8 | dnl this will hopefully be "fixed" at some point in the future by 9 | dnl refactoring mod_http and moving some things to the core and 10 | dnl vice versa so that the core does not depend upon mod_http. 11 | if test "$enable_http" = "yes"; then 12 | enable_http="static" 13 | elif test "$enable_http" = "shared"; then 14 | AC_MSG_ERROR([mod_http can not be built as a shared DSO]) 15 | fi 16 | 17 | APACHE_MODULE(http, HTTP protocol handling, $http_objects, , static) 18 | APACHE_MODULE(mime, mapping of file-extension to MIME, , , yes) 19 | 20 | APACHE_MODPATH_FINISH 21 | -------------------------------------------------------------------------------- /modules/http/http_filters.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/http/http_filters.c -------------------------------------------------------------------------------- /modules/http/http_request.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/http/http_request.c -------------------------------------------------------------------------------- /modules/http/mod_mime.dep: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Generated Dependency File, included by mod_mime.mak 2 | 3 | ..\..\build\win32\httpd.rc : \ 4 | "..\..\include\ap_release.h"\ 5 | 6 | 7 | .\mod_mime.c : \ 8 | "..\..\include\ap_config.h"\ 9 | "..\..\include\ap_mmn.h"\ 10 | "..\..\include\ap_regex.h"\ 11 | "..\..\include\ap_release.h"\ 12 | "..\..\include\http_config.h"\ 13 | "..\..\include\http_log.h"\ 14 | "..\..\include\http_protocol.h"\ 15 | "..\..\include\http_request.h"\ 16 | "..\..\include\httpd.h"\ 17 | "..\..\include\os.h"\ 18 | "..\..\include\util_cfgtree.h"\ 19 | "..\..\include\util_filter.h"\ 20 | "..\..\srclib\apr-util\include\apr_hooks.h"\ 21 | "..\..\srclib\apr-util\include\apr_optional_hooks.h"\ 22 | "..\..\srclib\apr-util\include\apr_uri.h"\ 23 | "..\..\srclib\apr\include\apr_hash.h"\ 24 | "..\..\srclib\apr\include\apr_lib.h"\ 25 | "..\..\srclib\apr\include\apr_mmap.h"\ 26 | "..\..\srclib\apr\include\apr_poll.h"\ 27 | "..\..\srclib\apr\include\apr_portable.h"\ 28 | "..\..\srclib\apr\include\apr_strings.h"\ 29 | 30 | -------------------------------------------------------------------------------- /modules/http/mod_mime.exp: -------------------------------------------------------------------------------- 1 | mime_module 2 | -------------------------------------------------------------------------------- /modules/mappers/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /modules/mappers/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/build/special.mk 3 | 4 | -------------------------------------------------------------------------------- /modules/mappers/config9.m4: -------------------------------------------------------------------------------- 1 | dnl modules enabled in this directory by default 2 | 3 | dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) 4 | 5 | APACHE_MODPATH_INIT(mappers) 6 | 7 | APACHE_MODULE(vhost_alias, mass virtual hosting module, , , most) 8 | APACHE_MODULE(negotiation, content negotiation, , , yes) 9 | APACHE_MODULE(dir, directory request handling, , , yes) 10 | APACHE_MODULE(imagemap, server-side imagemaps, , , most) 11 | APACHE_MODULE(actions, Action triggering on requests, , , yes) 12 | APACHE_MODULE(speling, correct common URL misspellings, , , most) 13 | APACHE_MODULE(userdir, mapping of requests to user-specific directories, , , yes) 14 | APACHE_MODULE(alias, mapping of requests to different filesystem parts, , , yes) 15 | 16 | APACHE_MODULE(rewrite, rule based URL manipulation, , , most) 17 | 18 | 19 | APR_CHECK_APR_DEFINE(APR_HAS_DSO) 20 | 21 | case "x$enable_so" in 22 | "xyes") 23 | if test $ac_cv_define_APR_HAS_DSO = "no"; then 24 | AC_MSG_ERROR([mod_so has been requested but cannot be built on your system]) 25 | fi 26 | ;; 27 | "xshared") 28 | AC_MSG_ERROR([mod_so can not be built as a shared DSO]) 29 | ;; 30 | "xno") 31 | ;; 32 | "x") 33 | enable_so=$ac_cv_define_APR_HAS_DSO 34 | ;; 35 | esac 36 | 37 | dnl mod_so can only be built statically. If the user wants modules to 38 | dnl be built as DSOs by default (eg. ./configure --enable-mods-shared=most) 39 | dnl then we must override the default here. 40 | if test "x$enable_so" = "xyes"; then 41 | enable_so="static" 42 | fi 43 | 44 | if test "x$enable_so" = "xstatic"; then 45 | APR_ADDTO(HTTPD_LDFLAGS, [-export-dynamic]) 46 | INSTALL_DSO=yes 47 | else 48 | INSTALL_DSO=no 49 | fi 50 | APACHE_SUBST(INSTALL_DSO) 51 | 52 | if test "$sharedobjs" = "yes"; then 53 | if test $ac_cv_define_APR_HAS_DSO = "no"; then 54 | AC_MSG_ERROR([shared objects have been requested but cannot be built since mod_so cannot be built]) 55 | elif test $enable_so = "no"; then 56 | AC_MSG_ERROR([shared objects have been requested but cannot be built since mod_so was disabled]) 57 | fi 58 | fi 59 | 60 | APACHE_MODULE(so, DSO capability, , , $enable_so) 61 | 62 | dnl ### why save the cache? 63 | AC_CACHE_SAVE 64 | 65 | APACHE_MODPATH_FINISH 66 | -------------------------------------------------------------------------------- /modules/mappers/mod_so.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file mod_so.h 19 | * @brief Shared Object Loader Extension Module for Apache 20 | * 21 | * @defgroup MOD_SO mod_so 22 | * @ingroup APACHE_MODS 23 | * @{ 24 | */ 25 | 26 | #ifndef MOD_SO_H 27 | #define MOD_SO_H 1 28 | 29 | #include "apr_optional.h" 30 | #include "httpd.h" 31 | 32 | /* optional function declaration */ 33 | APR_DECLARE_OPTIONAL_FN(module *, ap_find_loaded_module_symbol, 34 | (server_rec *s, const char *modname)); 35 | 36 | #endif /* MOD_SO_H */ 37 | /** @} */ 38 | 39 | -------------------------------------------------------------------------------- /modules/metadata/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/build/special.mk 3 | 4 | -------------------------------------------------------------------------------- /modules/metadata/config.m4: -------------------------------------------------------------------------------- 1 | dnl modules enabled in this directory by default 2 | 3 | dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) 4 | 5 | APACHE_MODPATH_INIT(metadata) 6 | 7 | APACHE_MODULE(env, clearing/setting of ENV vars, , , yes) 8 | APACHE_MODULE(mime_magic, automagically determining MIME type) 9 | APACHE_MODULE(cern_meta, CERN-type meta files) 10 | APACHE_MODULE(expires, Expires header control, , , most) 11 | APACHE_MODULE(headers, HTTP header control, , , most) 12 | APACHE_MODULE(ident, RFC 1413 identity check, , , most) 13 | 14 | APACHE_MODULE(usertrack, user-session tracking, , , , [ 15 | AC_CHECK_HEADERS(sys/times.h) 16 | AC_CHECK_FUNCS(times) 17 | ]) 18 | 19 | APACHE_MODULE(unique_id, per-request unique ids) 20 | APACHE_MODULE(setenvif, basing ENV vars on headers, , , yes) 21 | APACHE_MODULE(version, determining httpd version in config files, , , yes) 22 | 23 | APACHE_MODPATH_FINISH 24 | -------------------------------------------------------------------------------- /modules/offline/Makefile.in: -------------------------------------------------------------------------------- 1 | # a modules Makefile has no explicit targets -- they will be defined by 2 | # whatever modules are enabled. just grab special.mk to deal with this. 3 | include $(top_srcdir)/build/special.mk 4 | -------------------------------------------------------------------------------- /modules/offline/mod_offline.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/offline/mod_offline.c -------------------------------------------------------------------------------- /modules/offline/mod_offline.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/offline/mod_offline.h -------------------------------------------------------------------------------- /modules/offline/offline_public.h.in: -------------------------------------------------------------------------------- 1 | #ifndef _OFFLINE_PUBLIC_H_ 2 | #define _OFFLINE_PUBLIC_H_ 3 | 4 | #endif -------------------------------------------------------------------------------- /modules/proxy/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tapr_bucket_brigade 12 | -Tapr_pool_t 13 | -Tap_filter_t 14 | -Tbuf_area 15 | -Tbuff_struct 16 | -Tbuffy 17 | -Tcmd_how 18 | -Tcmd_parms 19 | -Tcommand_rec 20 | -Tcommand_struct 21 | -Tconn_rec 22 | -Tcore_dir_config 23 | -Tcore_server_config 24 | -Tdir_maker_func 25 | -Tevent 26 | -Tglobals_s 27 | -Thandler_func 28 | -Thandler_rec 29 | -Tjoblist_s 30 | -Tlisten_rec 31 | -Tmerger_func 32 | -Tmode_t 33 | -Tmodule 34 | -Tmodule_struct 35 | -Tmutex 36 | -Tn_long 37 | -Tother_child_rec 38 | -Toverrides_t 39 | -Tparent_score 40 | -Tpid_t 41 | -Tpiped_log 42 | -Tpool 43 | -Trequest_rec 44 | -Trequire_line 45 | -Trlim_t 46 | -Tscoreboard 47 | -Tsemaphore 48 | -Tserver_addr_rec 49 | -Tserver_rec 50 | -Tserver_rec_chain 51 | -Tshort_score 52 | -Ttable 53 | -Ttable_entry 54 | -Tthread 55 | -Tu_wide_int 56 | -Tvtime_t 57 | -Twide_int 58 | -Tproxy_server_conf 59 | -------------------------------------------------------------------------------- /modules/proxy/Makefile.in: -------------------------------------------------------------------------------- 1 | # a modules Makefile has no explicit targets -- they will be defined by 2 | # whatever modules are enabled. just grab special.mk to deal with this. 3 | include $(top_srcdir)/build/special.mk 4 | -------------------------------------------------------------------------------- /modules/proxy/config.m4: -------------------------------------------------------------------------------- 1 | dnl modules enabled in this directory by default 2 | 3 | APACHE_MODPATH_INIT(proxy) 4 | 5 | if test "$enable_proxy" = "shared"; then 6 | proxy_mods_enable=shared 7 | elif test "$enable_proxy" = "yes"; then 8 | proxy_mods_enable=yes 9 | else 10 | proxy_mods_enable=no 11 | fi 12 | 13 | proxy_objs="mod_proxy.lo proxy_util.lo" 14 | APACHE_MODULE(proxy, Apache proxy module, $proxy_objs, , $proxy_mods_enable) 15 | 16 | proxy_connect_objs="mod_proxy_connect.lo" 17 | proxy_ftp_objs="mod_proxy_ftp.lo" 18 | proxy_http_objs="mod_proxy_http.lo" 19 | proxy_scgi_objs="mod_proxy_scgi.lo" 20 | proxy_ajp_objs="mod_proxy_ajp.lo ajp_header.lo ajp_link.lo ajp_msg.lo ajp_utils.lo" 21 | proxy_balancer_objs="mod_proxy_balancer.lo" 22 | 23 | case "$host" in 24 | *os2*) 25 | # OS/2 DLLs must resolve all symbols at build time and 26 | # these sub-modules need some from the main proxy module 27 | proxy_connect_objs="$proxy_connect_objs mod_proxy.la" 28 | proxy_ftp_objs="$proxy_ftp_objs mod_proxy.la" 29 | proxy_http_objs="$proxy_http_objs mod_proxy.la" 30 | proxy_scgi_objs="$proxy_scgi_objs mod_proxy.la" 31 | proxy_ajp_objs="$proxy_ajp_objs mod_proxy.la" 32 | proxy_balancer_objs="$proxy_balancer_objs mod_proxy.la" 33 | ;; 34 | esac 35 | 36 | APACHE_MODULE(proxy_connect, Apache proxy CONNECT module, $proxy_connect_objs, , $proxy_mods_enable) 37 | APACHE_MODULE(proxy_ftp, Apache proxy FTP module, $proxy_ftp_objs, , $proxy_mods_enable) 38 | APACHE_MODULE(proxy_http, Apache proxy HTTP module, $proxy_http_objs, , $proxy_mods_enable) 39 | APACHE_MODULE(proxy_scgi, Apache proxy SCGI module, $proxy_scgi_objs, , $proxy_mods_enable) 40 | APACHE_MODULE(proxy_ajp, Apache proxy AJP module, $proxy_ajp_objs, , $proxy_mods_enable) 41 | APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module, $proxy_balancer_objs, , $proxy_mods_enable) 42 | 43 | APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current/../generators]) 44 | 45 | APACHE_MODPATH_FINISH 46 | -------------------------------------------------------------------------------- /modules/proxy/mod_proxy.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/proxy/mod_proxy.c -------------------------------------------------------------------------------- /modules/proxy/mod_proxy_http.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/proxy/mod_proxy_http.c -------------------------------------------------------------------------------- /modules/proxy/proxy_util.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/proxy/proxy_util.c -------------------------------------------------------------------------------- /modules/security/Makefile.in: -------------------------------------------------------------------------------- 1 | # a modules Makefile has no explicit targets -- they will be defined by 2 | # whatever modules are enabled. just grab special.mk to deal with this. 3 | include $(top_srcdir)/build/special.mk 4 | all: 5 | chmod u+x msc_build_version.sh 6 | ./msc_build_version.sh msc_release.h 7 | -------------------------------------------------------------------------------- /modules/security/apache2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/apache2.h -------------------------------------------------------------------------------- /modules/security/apache2_config.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/apache2_config.c -------------------------------------------------------------------------------- /modules/security/apache2_io.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/apache2_io.c -------------------------------------------------------------------------------- /modules/security/bwlist_common.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/bwlist_common.c -------------------------------------------------------------------------------- /modules/security/bwlist_common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/bwlist_common.h -------------------------------------------------------------------------------- /modules/security/ip_bwlist.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/ip_bwlist.c -------------------------------------------------------------------------------- /modules/security/ip_bwlist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/ip_bwlist.h -------------------------------------------------------------------------------- /modules/security/mod_security2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/mod_security2.c -------------------------------------------------------------------------------- /modules/security/modsecurity.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/modsecurity.c -------------------------------------------------------------------------------- /modules/security/modsecurity.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/modsecurity.h -------------------------------------------------------------------------------- /modules/security/modsecurity_config.h: -------------------------------------------------------------------------------- 1 | /* Some APR files define PACKAGE* constants, which may conflict 2 | * so this is here to prevent that by removing them. 3 | */ 4 | 5 | /* Undefine all these so there are no conflicts */ 6 | #undef PACKAGE 7 | #undef PACKAGE_BUGREPORT 8 | #undef PACKAGE_NAME 9 | #undef PACKAGE_STRING 10 | #undef PACKAGE_TARNAME 11 | #undef PACKAGE_URL 12 | #undef PACKAGE_VERSION 13 | 14 | /* Include the real autoconf header */ 15 | #include "modsecurity_config_auto.h" 16 | 17 | /* Undefine all these (again) so there are no conflicts */ 18 | #undef PACKAGE 19 | #undef PACKAGE_BUGREPORT 20 | #undef PACKAGE_NAME 21 | #undef PACKAGE_STRING 22 | #undef PACKAGE_TARNAME 23 | #undef PACKAGE_URL 24 | #undef PACKAGE_VERSION 25 | 26 | -------------------------------------------------------------------------------- /modules/security/msc_build_version.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | TF=/tmp/$$ 3 | flag=0 4 | sed -e 's/:/ /g ' -e 's/"/ /g ' $1 > $TF 5 | for line in `cat $TF` 6 | do 7 | for fn in $line 8 | do 9 | if [ `echo $fn | grep 'MODSEC_VERSION_BUILD'` ];then 10 | flag=1 11 | else 12 | if [ $flag -eq 1 ];then 13 | NEW=$fn 14 | NEW=` (expr $( expr $NEW + 1 ) % 1000)` 15 | sed "/MODSEC_VERSION_BUILD/{ s/$fn/$NEW/; }" $1 > $TF 16 | mv $TF $1 17 | rm -f $TF 18 | exit 19 | fi 20 | fi 21 | done 22 | done 23 | 24 | rm -f $TF 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /modules/security/msc_cookie_key.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_cookie_key.c -------------------------------------------------------------------------------- /modules/security/msc_cookie_key.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_cookie_key.h -------------------------------------------------------------------------------- /modules/security/msc_cookie_signature.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_cookie_signature.c -------------------------------------------------------------------------------- /modules/security/msc_cookie_signature.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_cookie_signature.h -------------------------------------------------------------------------------- /modules/security/msc_geo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_GEO_H_ 16 | #define _MSC_GEO_H_ 17 | 18 | #define GEO_STRUCT_INFO_MAX_SIZE 20 19 | #define GEO_DB_INFO_MAX_SIZE 100 20 | #define GEO_COUNTRY_OFFSET 0xffff00 21 | #define GEO_MAX_RECORD_LEN 4 22 | #define GEO_COUNTRY_UNKNOWN "Unknown" 23 | #define GEO_CITY_UNKNOWN "Unknown" 24 | #define GEO_CITY_RECORD_LEN 50 25 | #define GEO_COUNTRY_DATABASE 1 26 | #define GEO_CITY_DATABASE_0 6 27 | #define GEO_CITY_DATABASE_1 2 28 | #define GEO_COUNTRY_LAST 250 29 | #define GEO_SEGMENT_RECORD_LENGTH 3 30 | #define GEO_STATE_BEGIN_REV0 16700000 31 | #define GEO_STATE_BEGIN_REV1 16000000 32 | #define GEO_COUNTRY_BEGIN 16776960 33 | 34 | 35 | typedef struct geo_rec geo_rec; 36 | typedef struct geo_db geo_db; 37 | 38 | #include 39 | #include "modsecurity.h" 40 | 41 | /* Structures */ 42 | 43 | struct geo_rec { 44 | const char *country_code; 45 | const char *country_code3; 46 | const char *country_name; 47 | const char *country_continent; 48 | const char *region; 49 | const char *city; 50 | const char *postal_code; 51 | float latitude; 52 | float longitude; 53 | int dma_code; 54 | int area_code; 55 | }; 56 | 57 | struct geo_db { 58 | apr_file_t *db; 59 | const char *dbfn; 60 | int dbtype; 61 | unsigned int ctry_offset; 62 | }; 63 | 64 | /* Functions */ 65 | 66 | int DSOLOCAL geo_init(directory_config *dcfg, const char *dbfn, char **error_msg); 67 | 68 | int DSOLOCAL geo_lookup(modsec_rec *msr, geo_rec *rec, const char *target, char **error_msg); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /modules/security/msc_gsb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_GSB_H_ 16 | #define _MSC_GSB_H_ 17 | 18 | typedef struct gsb_db gsb_db; 19 | 20 | #include 21 | #include "modsecurity.h" 22 | #include "apr_hash.h" 23 | 24 | struct gsb_db { 25 | apr_file_t *db; 26 | const char *dbfn; 27 | apr_hash_t *gsb_table; 28 | }; 29 | 30 | int DSOLOCAL gsb_db_init(directory_config *dcfg, const char *dbfn, char **error_msg); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /modules/security/msc_logging.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_logging.c -------------------------------------------------------------------------------- /modules/security/msc_logging.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | #ifndef _MSC_LOGGING_H_ 15 | #define _MSC_LOGGING_H_ 16 | 17 | #define AUDITLOG_OFF 0 18 | #define AUDITLOG_ON 1 19 | #define ACCESSLOG_OFF 0 20 | #define ACCESSLOG_ON 1 21 | 22 | #define AUDITLOG_RELEVANT 2 23 | 24 | #define AUDITLOG_SERIAL 0 25 | #define AUDITLOG_CONCURRENT 1 26 | 27 | #define AUDITLOG_PART_FIRST 'A' 28 | #define AUDITLOG_PART_HEADER 'A' 29 | #define AUDITLOG_PART_REQUEST_HEADERS 'B' 30 | #define AUDITLOG_PART_REQUEST_BODY 'C' 31 | #define AUDITLOG_PART_RESPONSE_HEADERS 'D' 32 | #define AUDITLOG_PART_RESPONSE_BODY 'E' 33 | #define AUDITLOG_PART_A_RESPONSE_HEADERS 'F' 34 | #define AUDITLOG_PART_A_RESPONSE_BODY 'G' 35 | #define AUDITLOG_PART_TRAILER 'H' 36 | #define AUDITLOG_PART_FAKE_REQUEST_BODY 'I' 37 | #define AUDITLOG_PART_UPLOADS 'J' 38 | #define AUDITLOG_PART_MATCHEDRULES 'K' 39 | #define AUDITLOG_PART_LAST 'K' 40 | #define AUDITLOG_PART_ENDMARKER 'Z' 41 | 42 | #include "modsecurity.h" 43 | #include "apr_pools.h" 44 | 45 | void DSOLOCAL attack_log_process(modsec_rec *msr); 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /modules/security/msc_lua.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #if defined(WITH_LUA) 16 | 17 | #ifndef _MSC_LUA_H_ 18 | #define _MSC_LUA_H_ 19 | 20 | typedef struct msc_script msc_script; 21 | typedef struct msc_script_part msc_script_part; 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "apr_general.h" 28 | #include "apr_tables.h" 29 | #include "modsecurity.h" 30 | 31 | struct msc_script { 32 | const char *name; 33 | apr_array_header_t *parts; 34 | }; 35 | 36 | struct msc_script_part { 37 | const void *data; 38 | size_t len; 39 | }; 40 | 41 | char DSOLOCAL *lua_compile(msc_script **script, const char *filename, apr_pool_t *pool); 42 | 43 | int DSOLOCAL lua_execute(msc_script *script, char *param, modsec_rec *msr, msre_rule *rule, char **error_msg); 44 | 45 | apr_status_t DSOLOCAL msre_action_setvar_execute(modsec_rec *r, apr_pool_t *, msre_rule *, char *, char *); 46 | 47 | #endif 48 | 49 | #endif /* WITH_LUA */ 50 | -------------------------------------------------------------------------------- /modules/security/msc_multipart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_multipart.c -------------------------------------------------------------------------------- /modules/security/msc_parsers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_PARSERS_H_ 16 | #define _MSC_PARSERS_H_ 17 | 18 | #include "modsecurity.h" 19 | 20 | int DSOLOCAL parse_cookies_v0(modsec_rec *msr, char *_cookie_header, apr_table_t *cookies); 21 | 22 | int parse_cookies_v1(modsec_rec *msr, char *_cookie_header, apr_table_t *cookies); 23 | 24 | int parse_cookie_name(modsec_rec *msr, const char *_cookienames, apr_table_t *cookiename_tb); 25 | 26 | char *generate_a_setcookiestr(modsec_rec *msr, apr_table_t *cookies_tb); 27 | 28 | char *parse_uri(apr_pool_t *pool, const char *uri); 29 | 30 | char *parse_request_line(apr_pool_t *pool, const char *request_line); 31 | 32 | int DSOLOCAL parse_arguments(modsec_rec *msr, const char *s, apr_size_t inputlength, 33 | int argument_separator, const char *origin, apr_table_t *arguments, int *invalid_count); 34 | 35 | void DSOLOCAL add_argument(modsec_rec *msr, apr_table_t *arguments, msc_arg *arg); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /modules/security/msc_pcre.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_PCRE_H_ 16 | #define _MSC_PCRE_H_ 17 | 18 | typedef struct msc_regex_t msc_regex_t; 19 | 20 | #include "pcre.h" 21 | 22 | #ifndef PCRE_ERROR_MATCHLIMIT 23 | /* Define for compile, but not valid in this version of PCRE. */ 24 | #define PCRE_ERROR_MATCHLIMIT (-8) 25 | #endif /* PCRE_ERROR_MATCHLIMIT */ 26 | 27 | #ifndef PCRE_ERROR_RECURSIONLIMIT 28 | /* Define for compile, but not valid in this version of PCRE. */ 29 | #define PCRE_ERROR_RECURSIONLIMIT (-21) 30 | #endif /* PCRE_ERROR_RECURSIONLIMIT */ 31 | 32 | #include "apr_general.h" 33 | #include "modsecurity.h" 34 | 35 | struct msc_regex_t { 36 | void *re; 37 | void *pe; 38 | const char *pattern; 39 | }; 40 | 41 | void DSOLOCAL *msc_pregcomp_ex(apr_pool_t *pool, const char *pattern, int options, 42 | const char **_errptr, int *_erroffset, 43 | int match_limit, int match_limit_recursion); 44 | 45 | void DSOLOCAL *msc_pregcomp(apr_pool_t *pool, const char *pattern, int options, 46 | const char **_errptr, int *_erroffset); 47 | 48 | int DSOLOCAL msc_regexec_ex(msc_regex_t *regex, const char *s, 49 | unsigned int slen, int startoffset, int options, 50 | int *ovector, int ovecsize, char **error_msg); 51 | 52 | int DSOLOCAL msc_regexec_capture(msc_regex_t *regex, const char *s, 53 | unsigned int slen, int *ovector, 54 | int ovecsize, char **error_msg); 55 | 56 | int DSOLOCAL msc_regexec(msc_regex_t *regex, const char *s, 57 | unsigned int slen, char **error_msg); 58 | 59 | int DSOLOCAL msc_fullinfo(msc_regex_t *regex, int what, void *where); 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /modules/security/msc_release.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #include "msc_release.h" 16 | 17 | static const struct modsec_build_type_rec { 18 | char name[12]; /* pads at 16 bytes with val */ 19 | int val; 20 | } modsec_build_type[] = { 21 | { "-dev", 1 }, /* Development build */ 22 | { "-rc", 3 }, /* Release Candidate build */ 23 | { "", 9 }, /* Production build */ 24 | { "-tw", 9 }, /* Truswave Holdings build */ 25 | { "-trunk", 9 } /* Trunk build */ 26 | }; 27 | 28 | int get_modsec_build_type(const char *name) 29 | { 30 | size_t i; 31 | 32 | for (i = 0; i < sizeof(modsec_build_type)/sizeof(modsec_build_type[0]); i++) { 33 | if (strcmp(((name == NULL) ? MODSEC_VERSION_TYPE : name), modsec_build_type[i].name) == 0) { 34 | return modsec_build_type[i].val; 35 | } 36 | } 37 | 38 | return 9; /* so no warning */ 39 | } 40 | -------------------------------------------------------------------------------- /modules/security/msc_release.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_RELEASE_H_ 16 | #define _MSC_RELEASE_H_ 17 | 18 | #include 19 | #include 20 | 21 | /* ENH: Clean this mess up by detecting this is possible */ 22 | #if !(defined(_AIX) || defined(WIN32) || defined(CYGWIN) || defined(NETWARE) || defined(SOLARIS2) || defined(OSF1)) 23 | #define DSOLOCAL __attribute__((visibility("hidden"))) 24 | #else 25 | #define DSOLOCAL 26 | #endif 27 | 28 | #if defined(DEBUG_MEM) 29 | /* Nothing Yet */ 30 | #endif 31 | 32 | /* For GNU C, tell the compiler to check printf like formatters */ 33 | #if (defined(__GNUC__) && !defined(SOLARIS2)) 34 | #define PRINTF_ATTRIBUTE(a,b) __attribute__((format (printf, a, b))) 35 | #else 36 | #define PRINTF_ATTRIBUTE(a,b) 37 | #endif 38 | 39 | #define MODSEC_VERSION_MAJOR "1" 40 | #define MODSEC_VERSION_MINOR "0" 41 | #define MODSEC_VERSION_MAINT "0" 42 | #define MODSEC_VERSION_BUILD "712" 43 | #define MODSEC_VERSION_TYPE "" 44 | #define MODSEC_VERSION_RELEASE "7067" 45 | 46 | #define MODSEC_VERSION_SUFFIX MODSEC_VERSION_TYPE MODSEC_VERSION_RELEASE 47 | 48 | #define MODSEC_VERSION_DEBUG_VERSION \ 49 | MODSEC_VERSION_MAJOR "." MODSEC_VERSION_MINOR "." MODSEC_VERSION_MAINT "-" \ 50 | MODSEC_VERSION_BUILD 51 | #define MODSEC_VERSION \ 52 | MODSEC_VERSION_MAJOR "." MODSEC_VERSION_MINOR "." MODSEC_VERSION_MAINT \ 53 | 54 | /* Apache Module Defines */ 55 | #define MODSEC_MODULE_NAME "ModSecurity for Apache" 56 | #define MODSEC_MODULE_VERSION MODSEC_VERSION 57 | //#define MODSEC_MODULE_NAME_FULL MODSEC_MODULE_NAME "/" MODSEC_MODULE_VERSION " (http://www.modsecurity.org/)" 58 | #define MODSEC_MODULE_NAME_FULL "Security" "/" MODSEC_MODULE_VERSION 59 | 60 | int DSOLOCAL get_modsec_build_type(const char *name); 61 | 62 | #endif /* _MSC_RELEASE_H_ */ 63 | -------------------------------------------------------------------------------- /modules/security/msc_reqbody.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_reqbody.c -------------------------------------------------------------------------------- /modules/security/msc_ssl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_ssl.c -------------------------------------------------------------------------------- /modules/security/msc_ssl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/msc_ssl.h -------------------------------------------------------------------------------- /modules/security/msc_unicode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_UNICODE_H_ 16 | #define _MSC_UNICODE_H_ 17 | 18 | typedef struct unicode_map unicode_map; 19 | 20 | #include 21 | #include "modsecurity.h" 22 | #include "apr_hash.h" 23 | 24 | #define CODEPAGE_SEPARATORS " \t\n\r" 25 | 26 | struct unicode_map { 27 | apr_file_t *map; 28 | const char *mapfn; 29 | }; 30 | 31 | int DSOLOCAL unicode_map_init(directory_config *dcfg, const char *mapfn, char **error_msg); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /modules/security/msc_xml.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_XML_H_ 16 | #define _MSC_XML_H_ 17 | 18 | typedef struct xml_data xml_data; 19 | 20 | #include "modsecurity.h" 21 | #include 22 | #include 23 | 24 | /* Structures */ 25 | struct xml_data { 26 | xmlSAXHandler *sax_handler; 27 | xmlParserCtxtPtr parsing_ctx; 28 | xmlDocPtr doc; 29 | unsigned int well_formed; 30 | }; 31 | 32 | /* Functions */ 33 | int DSOLOCAL xml_init(modsec_rec *msr, char **error_msg); 34 | 35 | int DSOLOCAL xml_process_chunk(modsec_rec *msr, const char *buf, unsigned int size, char **error_msg); 36 | 37 | int DSOLOCAL xml_complete(modsec_rec *msr, char **error_msg); 38 | 39 | apr_status_t DSOLOCAL xml_cleanup(modsec_rec *msr); 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /modules/security/persist_dbm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _PERSIST_DBM_H_ 16 | #define _PERSIST_DBM_H_ 17 | 18 | #include "apr_general.h" 19 | #include "modsecurity.h" 20 | 21 | apr_table_t DSOLOCAL *collection_retrieve(modsec_rec *msr, const char *col_name, 22 | const char *col_value, int col_value_length); 23 | 24 | int DSOLOCAL collection_store(modsec_rec *msr, apr_table_t *collection); 25 | 26 | int DSOLOCAL collections_remove_stale(modsec_rec *msr, const char *col_name); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /modules/security/re.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/re.c -------------------------------------------------------------------------------- /modules/security/re.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/re.h -------------------------------------------------------------------------------- /modules/security/re_actions.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/re_actions.c -------------------------------------------------------------------------------- /modules/security/re_operators.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/re_operators.c -------------------------------------------------------------------------------- /modules/security/re_variables.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/re_variables.c -------------------------------------------------------------------------------- /modules/security/security_public.h: -------------------------------------------------------------------------------- 1 | #ifndef _SECURITY_PUBLIC_H_ 2 | #define _SECURITY_PUBLIC_H_ 3 | 4 | #define DEBUG_DBLOG 1 5 | #define CACHE_DEBUG 1 6 | #define VAR_FETCH_CACHE 1 7 | 8 | #endif -------------------------------------------------------------------------------- /modules/security/security_public.h.in: -------------------------------------------------------------------------------- 1 | #ifndef _SECURITY_PUBLIC_H_ 2 | #define _SECURITY_PUBLIC_H_ 3 | 4 | #endif -------------------------------------------------------------------------------- /modules/security/url_bwlist.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/url_bwlist.c -------------------------------------------------------------------------------- /modules/security/url_bwlist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/modules/security/url_bwlist.h -------------------------------------------------------------------------------- /os/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /os/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = $(OS_DIR) 3 | 4 | include $(top_builddir)/build/rules.mk 5 | -------------------------------------------------------------------------------- /os/config.m4: -------------------------------------------------------------------------------- 1 | AC_MSG_CHECKING(for target platform) 2 | 3 | case $host in 4 | *beos*) 5 | OS="beos" 6 | OS_DIR=$OS 7 | ;; 8 | *pc-os2-emx*) 9 | OS="os2" 10 | OS_DIR=$OS 11 | ;; 12 | bs2000*) 13 | OS="unix" 14 | OS_DIR=$OS 15 | ;; 16 | *cygwin*) 17 | OS="cygwin" 18 | OS_DIR="unix" 19 | ;; 20 | *mingw32*) 21 | OS="win32" 22 | OS_DIR=$OS 23 | ;; 24 | *) 25 | OS="unix" 26 | OS_DIR=$OS;; 27 | esac 28 | 29 | AC_MSG_RESULT($OS) 30 | APACHE_FAST_OUTPUT(os/${OS_DIR}/Makefile) 31 | -------------------------------------------------------------------------------- /os/os2/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | LTLIBRARY_NAME = libos.la 3 | LTLIBRARY_SOURCES = util_os2.c 4 | 5 | include $(top_srcdir)/build/ltlib.mk 6 | -------------------------------------------------------------------------------- /os/os2/config.m4: -------------------------------------------------------------------------------- 1 | if test "$OS" = "os2" ; then 2 | APR_ADDTO(CFLAGS, [-DOS2 -O2]) 3 | fi 4 | -------------------------------------------------------------------------------- /os/os2/core.mk: -------------------------------------------------------------------------------- 1 | # Some rules for making a shared core dll on OS/2 2 | 3 | os2core: httpd.dll $(CORE_IMPLIB) 4 | $(LIBTOOL) --mode=link gcc -Zstack 512 $(LDFLAGS) $(EXTRA_LDFLAGS) -o httpd $(CORE_IMPLIB) 5 | 6 | httpd.dll: $(PROGRAM_DEPENDENCIES) $(CORE_IMPLIB) 7 | $(LINK) -Zdll $(EXTRA_LDFLAGS) -s -o $@ server/exports.lo modules.lo $(PROGRAM_DEPENDENCIES) $(AP_LIBS) server/ApacheCoreOS2.def 8 | -------------------------------------------------------------------------------- /os/os2/core_header.def: -------------------------------------------------------------------------------- 1 | LIBRARY httpd INITINSTANCE 2 | DESCRIPTION "Apache Server Core" 3 | DATA NONSHARED 4 | 5 | EXPORTS 6 | "main" 7 | 8 | ; One for mod_dav from socket library 9 | "_swaps" 10 | 11 | ; And some more for mod_unique_id 12 | "gethostname" 13 | "gethostbyname" 14 | "_swapl" 15 | "h_errno" 16 | "inet_ntoa" 17 | 18 | ; mod_proxy needs this one 19 | "inet_addr" 20 | -------------------------------------------------------------------------------- /os/os2/os.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file os2/os.h 19 | * @brief This file in included in all Apache source code. It contains definitions 20 | * of facilities available on _this_ operating system (HAVE_* macros), 21 | * and prototypes of OS specific functions defined in os.c or os-inline.c 22 | * 23 | * @defgroup APACHE_OS_OS2 os2 24 | * @ingroup APACHE_OS 25 | * @{ 26 | */ 27 | 28 | #ifndef APACHE_OS_H 29 | #define APACHE_OS_H 30 | 31 | #define PLATFORM "OS/2" 32 | 33 | /* going away shortly... */ 34 | #define HAVE_DRIVE_LETTERS 35 | #define HAVE_UNC_PATHS 36 | #define CASE_BLIND_FILESYSTEM 37 | 38 | #endif /* ! APACHE_OS_H */ 39 | /** @} */ 40 | -------------------------------------------------------------------------------- /os/os2/util_os2.c: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define INCL_DOS 18 | #define INCL_DOSERRORS 19 | #include 20 | #include "ap_config.h" 21 | #include "httpd.h" 22 | #include "http_log.h" 23 | #include "os.h" 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "apr_strings.h" 29 | 30 | 31 | AP_DECLARE(apr_status_t) ap_os_create_privileged_process( 32 | const request_rec *r, 33 | apr_proc_t *newproc, const char *progname, 34 | const char * const *args, 35 | const char * const *env, 36 | apr_procattr_t *attr, apr_pool_t *p) 37 | { 38 | return apr_proc_create(newproc, progname, args, env, attr, p); 39 | } 40 | -------------------------------------------------------------------------------- /os/unix/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | LTLIBRARY_NAME = libos.la 3 | LTLIBRARY_SOURCES = unixd.c 4 | 5 | include $(top_srcdir)/build/ltlib.mk 6 | -------------------------------------------------------------------------------- /os/unix/config.m4: -------------------------------------------------------------------------------- 1 | if test "$OS" = "unix" ; then 2 | APACHE_TYPE_RLIM_T 3 | 4 | AC_CHECK_HEADERS(sys/time.h sys/resource.h sys/sem.h sys/ipc.h) 5 | 6 | AC_CHECK_FUNCS(setsid killpg) 7 | fi 8 | -------------------------------------------------------------------------------- /os/unix/os.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file unix/os.h 19 | * @brief This file in included in all Apache source code. It contains definitions 20 | * of facilities available on _this_ operating system (HAVE_* macros), 21 | * and prototypes of OS specific functions defined in os.c or os-inline.c 22 | * 23 | * @defgroup APACHE_OS_UNIX unix 24 | * @ingroup APACHE_OS 25 | * @{ 26 | */ 27 | 28 | #ifndef APACHE_OS_H 29 | #define APACHE_OS_H 30 | 31 | #include "apr.h" 32 | #include "ap_config.h" 33 | 34 | #ifndef PLATFORM 35 | #define PLATFORM "Unix" 36 | #endif 37 | 38 | /* On platforms where AP_NEED_SET_MUTEX_PERMS is defined, modules 39 | * should call unixd_set_*_mutex_perms on mutexes created in the 40 | * parent process. */ 41 | #define AP_NEED_SET_MUTEX_PERMS 1 42 | 43 | #ifdef _OSD_POSIX 44 | pid_t os_fork(const char *user); 45 | #endif 46 | 47 | #endif /* !APACHE_OS_H */ 48 | /** @} */ 49 | -------------------------------------------------------------------------------- /server/.indent.pro: -------------------------------------------------------------------------------- 1 | -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 2 | -TBUFF 3 | -TFILE 4 | -TTRANS 5 | -TUINT4 6 | -T_trans 7 | -Tallow_options_t 8 | -Tapache_sfio 9 | -Tarray_header 10 | -Tbool_int 11 | -Tbuf_area 12 | -Tbuff_struct 13 | -Tbuffy 14 | -Tcmd_how 15 | -Tcmd_parms 16 | -Tcommand_rec 17 | -Tcommand_struct 18 | -Tconn_rec 19 | -Tcore_dir_config 20 | -Tcore_server_config 21 | -Tdir_maker_func 22 | -Tevent 23 | -Tglobals_s 24 | -Thandler_func 25 | -Thandler_rec 26 | -Tjoblist_s 27 | -Tlisten_rec 28 | -Tmerger_func 29 | -Tmode_t 30 | -Tmodule 31 | -Tmodule_struct 32 | -Tmutex 33 | -Tn_long 34 | -Tother_child_rec 35 | -Toverrides_t 36 | -Tparent_score 37 | -Tpid_t 38 | -Tpiped_log 39 | -Tpool 40 | -Trequest_rec 41 | -Trequire_line 42 | -Trlim_t 43 | -Tscoreboard 44 | -Tsemaphore 45 | -Tserver_addr_rec 46 | -Tserver_rec 47 | -Tserver_rec_chain 48 | -Tshort_score 49 | -Ttable 50 | -Ttable_entry 51 | -Tthread 52 | -Tu_wide_int 53 | -Tvtime_t 54 | -Twide_int 55 | -------------------------------------------------------------------------------- /server/buildmark.c: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "ap_config.h" 18 | #include "httpd.h" 19 | 20 | #if defined(__DATE__) && defined(__TIME__) 21 | static const char server_built[] = __DATE__ " " __TIME__; 22 | #else 23 | static const char server_built[] = "unknown"; 24 | #endif 25 | 26 | AP_DECLARE(const char *) ap_get_server_built() 27 | { 28 | return server_built; 29 | } 30 | -------------------------------------------------------------------------------- /server/cli/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = $(CLI_SUBDIR_NAME) 3 | 4 | include $(top_builddir)/build/rules.mk 5 | 6 | -------------------------------------------------------------------------------- /server/cli/linux/Makefile.in: -------------------------------------------------------------------------------- 1 | LTLIBRARY_NAME = libcli.la 2 | 3 | LTLIBRARY_SOURCES = cparser_tree.c cparser_show_tree.c pe_cli.c cli_global.c cli_log.c cli_server_policy.c cli_black_white_list.c cli_security_policy_interface.c cli_security_policy_keyword.c cli_security_policy_mode.c cli_interface.c 4 | 5 | include $(top_srcdir)/build/ltlib.mk 6 | -------------------------------------------------------------------------------- /server/cli/linux/bridge-proxy-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "bridge_proxy" 2 | 3 | //add the backend webserver listen http port of bridge-proxy 4 | bridge http 5 | //add the backend webserver listen https port of bridge-proxy 6 | bridge https 7 | //delete the bridge and http port of bridge-proxy 8 | no bridge http 9 | //delete the bridge and https port of bridge-proxy 10 | no bridge https 11 | 12 | //commit the backend webserver listen port of bridge-proxy 13 | commit 14 | 15 | #endsubmode 16 | 17 | -------------------------------------------------------------------------------- /server/cli/linux/cc-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "cc" 2 | 3 | //config source-ip access-rate 4 | no source-ip access-rate 5 | source-ip access-rate statistic-cycle request-times 6 | 7 | //config source-ip status-408-rate 8 | no source-ip status-408-rate 9 | source-ip status-408-rate statistic-cycle response-times 10 | 11 | //config referrer-url access-rate 12 | no referrer-url access-rate 13 | referrer-url access-rate statistic-cycle request-times 14 | 15 | //config url access-rate 16 | url-page 17 | #include "cc-url.cli" 18 | 19 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/cc-url.cli: -------------------------------------------------------------------------------- 1 | #submode "cc_url" 2 | 3 | //config url access-rate 4 | access-rate statistic-cycle request-times 5 | no access-rate statistic-cycle 6 | 7 | //config url page 8 | url 9 | no url all 10 | no url 11 | 12 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/cli_black_white_list.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_black_white_list.c -------------------------------------------------------------------------------- /server/cli/linux/cli_black_white_list.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_black_white_list.h -------------------------------------------------------------------------------- /server/cli/linux/cli_global.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_global.c -------------------------------------------------------------------------------- /server/cli/linux/cli_interface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_interface.c -------------------------------------------------------------------------------- /server/cli/linux/cli_log.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_log.c -------------------------------------------------------------------------------- /server/cli/linux/cli_security_policy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_security_policy.h -------------------------------------------------------------------------------- /server/cli/linux/cli_security_policy_interface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_security_policy_interface.c -------------------------------------------------------------------------------- /server/cli/linux/cli_security_policy_keyword.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_security_policy_keyword.c -------------------------------------------------------------------------------- /server/cli/linux/cli_security_policy_mode.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_security_policy_mode.c -------------------------------------------------------------------------------- /server/cli/linux/cli_server_policy.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/cli_server_policy.c -------------------------------------------------------------------------------- /server/cli/linux/code-injection-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "code" 2 | 3 | //config code keyword 4 | keyword plain-text 5 | 6 | //delete code keyword 7 | no keyword all 8 | no keyword plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/command-injection-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "cmd" 2 | 3 | //config cmd keyword 4 | keyword plain-text 5 | 6 | //delete cmd keyword 7 | no keyword all 8 | no keyword plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/configure-in.cli: -------------------------------------------------------------------------------- 1 | //destroy bridge 2 | no bridge 3 | //create new bridge 4 | bridge 5 | 6 | #submode "br" 7 | //add interface to bridge 8 | interface 9 | //delete interface from bridge 10 | no interface 11 | #endsubmode 12 | 13 | //add ip address to the interface 14 | interface ip-address mask 15 | //delete ip address to the interface 16 | no interface 17 | 18 | //set interface up 19 | interface up 20 | //set interface down 21 | interface down 22 | -------------------------------------------------------------------------------- /server/cli/linux/configure-pe.cli: -------------------------------------------------------------------------------- 1 | #submode "pe" 2 | 3 | #include "configure-in.cli" 4 | 5 | //configure the online work mode bridge-proxy 6 | protect-engine work-mode online bridge-proxy 7 | #include "bridge-proxy-mode.cli" 8 | 9 | //configure the online work mode route-proxy 10 | protect-engine work-mode online route-proxy 11 | #include "route-proxy-mode.cli" 12 | 13 | //configure the online work mode reverse-proxy 14 | protect-engine work-mode online reverse-proxy 15 | #include "reverse-proxy-mode.cli" 16 | 17 | //configure the offline work mode 18 | protect-engine work-mode offline 19 | #include "offline-mode.cli" 20 | 21 | //set work mode to default(route-proxy) 22 | no protect-engine work-mode 23 | 24 | //configure the encoding type 25 | protect-engine encode 26 | no protect-engine encode 27 | 28 | //configure ip black list 29 | protect-engine ip-black-list 30 | #include "ip-black-list.cli" 31 | 32 | //configure ip white list 33 | protect-engine ip-white-list 34 | #include "ip-white-list.cli" 35 | 36 | //configure url black list 37 | protect-engine url-black-list 38 | #include "url-black-list.cli" 39 | 40 | //configure url white list 41 | protect-engine url-white-list 42 | #include "url-white-list.cli" 43 | 44 | //delete security policy 45 | no protect-engine security-policy 46 | 47 | //config security policy 48 | protect-engine security-policy 49 | #include "security-policy-mode.cli" 50 | 51 | //delete the specified server policy 52 | no protect-engine server-policy 53 | //config the default server policy 54 | //protect-engine server-policy 55 | //config the server policy 56 | protect-engine server-policy 57 | #include "server-policy-mode.cli" 58 | 59 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/cookie-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "cookie" 2 | 3 | //config cookie-name 4 | cookie-name plain-text 5 | 6 | //delete fileup file-type 7 | no cookie-name all 8 | no cookie-name plain-text 9 | 10 | //config expire-time 11 | expire-time 12 | 13 | //config expire-time default 14 | no expire-time 15 | 16 | //config verification-method 17 | verification method content 18 | 19 | //config verification-method default 20 | no verification 21 | 22 | //add attribution 23 | attribution secure 24 | attribution secure httponly 25 | attribution httponly 26 | 27 | 28 | // no attribution 29 | no attribution 30 | 31 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/creditcard-information-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "creditcard" 2 | 3 | //config creditcard keyword 4 | keyword substitute plain-text for regular-exp 5 | 6 | //delete creditcard keyword 7 | no keyword all 8 | no keyword regular-exp 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/csrf-attack-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "csrf" 2 | //config csrf cookie-name 3 | cookie-name plain-text 4 | 5 | //delete csrf cookie-name 6 | no cookie-name all 7 | no cookie-name plain-text 8 | 9 | //config csrf url 10 | url 11 | 12 | //delete csrf url 13 | no url all 14 | no url 15 | 16 | #endsubmode 17 | -------------------------------------------------------------------------------- /server/cli/linux/file-download-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "filedown" 2 | 3 | //config filedown file-type 4 | file-type plain-text 5 | 6 | //delete filedown file-type 7 | no file-type all 8 | no file-type plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/file-upload-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "fileup" 2 | 3 | //config fileup file-type 4 | file-type plain-text 5 | 6 | //delete fileup file-type 7 | no file-type all 8 | no file-type plain-text 9 | 10 | //config individual-file-size 11 | individual-file-size { } 12 | 13 | //config individual-file-size default 14 | no individual-file-size 15 | 16 | //config all-file-size 17 | all-file-size { } 18 | 19 | //config individual-file-size default 20 | no all-file-size 21 | 22 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/idcard-information-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "idcard" 2 | 3 | //config idcard keyword 4 | keyword substitute plain-text for regular-exp 5 | 6 | //delete idcard keyword 7 | no keyword all 8 | no keyword regular-exp 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/ip-black-list.cli: -------------------------------------------------------------------------------- 1 | #submode "ipblack" 2 | 3 | //add client ip to ip black list 4 | client ip-address 5 | //delete all client ip from ip black list 6 | no client all 7 | //delete specified client ip from ip black list 8 | no client ip-address 9 | 10 | //set except ip address 11 | dynamic except ip-address 12 | //delete all except ip addresses 13 | no dynamic except all 14 | //delete specified except ip address 15 | no dynamic except ip-address 16 | 17 | //set timeout 18 | dynamic timeout 19 | //set timeout to default(32 min) 20 | no dynamic timeout 21 | 22 | //commit the user configure 23 | commit 24 | 25 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/ip-white-list.cli: -------------------------------------------------------------------------------- 1 | #submode "ipwhite" 2 | 3 | //add client ip to ip white list 4 | client ip-address 5 | //delete all client ip address from ip white list 6 | no client all 7 | //delete specified client ip address from ip white list 8 | no client ip-address 9 | 10 | //add server ip to ip white list 11 | server ip-address 12 | //delete all server ip address from ip white list 13 | no server all 14 | //delete specified server ip address from ip white list 15 | no server ip-address 16 | 17 | //add server host to ip white list 18 | server host plain-text 19 | //delete all server hosts from ip white list 20 | no server host all 21 | //delete specified server host from ip white list 22 | no server host plain-text 23 | 24 | //commit all the ip white list configure 25 | commit 26 | 27 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/keyword-filter-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "keyword_filter" 2 | 3 | //config keyword_filter keyword 4 | keyword plain-text 5 | 6 | //delete keyword_filter keyword 7 | no keyword all 8 | no keyword plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/offline-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "offline" 2 | 3 | //add the interface of offline 4 | interface 5 | 6 | //delete the interface of offline 7 | no interface 8 | 9 | //add ip address and http port of offline 10 | ip-address http 11 | //add ip address and https port of offline 12 | ip-address https 13 | //delete ip address and http port of offline 14 | no ip-address http 15 | //delete ip address and https port of offline 16 | no ip-address https 17 | 18 | //commit the offline interface and ip address 19 | commit 20 | 21 | #endsubmode 22 | -------------------------------------------------------------------------------- /server/cli/linux/pe_cli.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli/linux/pe_cli.c -------------------------------------------------------------------------------- /server/cli/linux/pe_cli.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: pe_cli.h 2786 2013-07-09 16:42:55 FreeWAF Development Team $ 3 | * 4 | * (C) 2013-2014 see FreeWAF Development Team 5 | * 6 | * This Program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This Program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with GNU Make; see the file LICENSE.GPLv2. If not, write to 18 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 19 | * http://www.gnu.org/licenses/gpl-2.0.html 20 | * 21 | */ 22 | 23 | #ifndef _PE_CLI_H_ 24 | #define _PE_CLI_H_ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #define cli_printf_info(context, format, args...) cparser_printf(context, format, ##args) 31 | 32 | AP_DECLARE(void) cli_printf(cparser_context_t *context, const char *format, ...); 33 | AP_DECLARE(void) cli_fprintf(cparser_context_t *context, const char *format, ...); 34 | AP_DECLARE(int) clear_server_policy(void); 35 | AP_DECLARE(int) interface_find(char *intf_name); 36 | AP_DECLARE(int) bridge_check(char *bridge_name); 37 | AP_DECLARE(int) clear_bridge(); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /server/cli/linux/protocol-param-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "protocol" 2 | 3 | //config request-header-num 4 | request-header-num 5 | request-header-num 6 | 7 | //config request-header-num default 8 | no request-header-num 9 | 10 | //config header-size-except-cookie 11 | header-size-except-cookie { } 12 | 13 | //config header-size-except-cookie default 14 | no header-size-except-cookie 15 | 16 | //config cookie-size 17 | cookie-size { } 18 | 19 | //config cookie-size default 20 | no cookie-size 21 | 22 | //config request-url-size 23 | request-url-size { } 24 | 25 | //config request-url-siz default 26 | no request-url-size 27 | 28 | //config query-string-size 29 | query-string-size { } 30 | 31 | //config request-url-siz default 32 | no query-string-size 33 | 34 | //config request-argument-name-size 35 | request-argument-name-size { } 36 | 37 | //config request-argument-name-size default 38 | no request-argument-name-size 39 | 40 | //config request-argument-name-value-size 41 | request-argument-name-value-size { } 42 | 43 | //config request-argument-name-value-size default 44 | no request-argument-name-value-size 45 | 46 | //config request-argument-num 47 | request-argument-num { } 48 | 49 | //config request-argument-num default 50 | no request-argument-num 51 | 52 | //config request-body-size 53 | request-body-size { } 54 | 55 | //config request-argument-size default 56 | no request-body-size 57 | 58 | #endsubmode 59 | 60 | -------------------------------------------------------------------------------- /server/cli/linux/request-method-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "method" 2 | 3 | //config method 4 | method plain-text 5 | 6 | //delete method 7 | no method all 8 | no method plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/reverse-proxy-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "reverse_proxy" 2 | 3 | //add the listen ip address and http port of reverse-proxy 4 | ip-address http 5 | //add the listen ip address and https port of reverse-proxy 6 | ip-address https 7 | //delete the listen ip address and http port of reverse-proxy 8 | no ip-address http 9 | //delete the listen ip address and https port of reverse-proxy 10 | no ip-address https 11 | 12 | //commit the listen ip address and http port of reverse-proxy 13 | commit 14 | 15 | #endsubmode 16 | -------------------------------------------------------------------------------- /server/cli/linux/root-configure.cli: -------------------------------------------------------------------------------- 1 | //this is config cli files 2 | 3 | #submode "st" 4 | 5 | //save config 6 | write 7 | 8 | //load config 9 | load 10 | 11 | //enter submode 12 | configure 13 | #include "configure-pe.cli" 14 | 15 | //clear log 16 | clear log 17 | 18 | //clear all the black urls 19 | clear url-black-list dynamic all 20 | 21 | //clear the specified black urls 22 | clear url-black-list dynamic referrer-url 23 | 24 | //clear all the black ip address 25 | clear ip-black-list dynamic all 26 | 27 | //clear the specified black ip address 28 | clear ip-black-list dynamic ip-address 29 | 30 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/route-proxy-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "route_proxy" 2 | 3 | //add the backend webserver listen http port of route-proxy 4 | http 5 | //add the backend webserver listen https port of route-proxy 6 | https 7 | //delete the backend webserver listen http port of route-proxy 8 | no http 9 | //delete the backend webserver listen https port of route-proxy 10 | no https 11 | 12 | //commit the backend webserver listen port of route-proxy 13 | commit 14 | 15 | #endsubmode 16 | 17 | 18 | -------------------------------------------------------------------------------- /server/cli/linux/server-policy-advanced-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "advance" 2 | 3 | //set argument separator 4 | argument-separator 5 | //clear all the argument separator 6 | no argument-separator 7 | 8 | //set cookie format 9 | cookie-format 10 | //set cookie format to default(version-0) 11 | no cookie-format 12 | 13 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/server-policy-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "sp" 2 | 3 | //deploy the security policy 4 | deploy security-policy 5 | 6 | //delete the virt server 7 | no virt-server ip-address https 8 | //delete the virt server 9 | no virt-server ip-address http 10 | //configure the reserve proxy 11 | virt-server ip-address http real-server ip-address http 12 | //configure the reserve proxy 13 | virt-server ip-address https real-server ip-address https 14 | 15 | //delete the real server 16 | no real-server ip-address http 17 | //delete the real server 18 | no real-server ip-address host http 19 | //delete the real server 20 | no real-server ip-address https 21 | //delete the real server 22 | no real-server ip-address host https 23 | //configure the {bridge-transparent | route-transparent | offline} proxy 24 | real-server ip-address host http 25 | //configure the {bridge-transparent | route-transparent | offline} proxy 26 | real-server ip-address http 27 | //configure the {bridge-transparent | route-transparent | offline} proxy 28 | real-server ip-address host https 29 | //configure the {bridge-transparent | route-transparent | offline} proxy 30 | real-server ip-address https 31 | 32 | // Enter advanced configure mode 33 | advanced-configure 34 | #include "server-policy-advanced-mode.cli" 35 | 36 | //enable to record the access log 37 | access-log enable 38 | //unable to record the access log 39 | no access-log enable 40 | 41 | //enable to record the attack log 42 | attack-log enable 43 | //enable to record the attack log and set the level 44 | attack-log enable severity 45 | //unable to record the attack log 46 | no attack-log enable 47 | 48 | //set the protect engine detect type 49 | engine 50 | //set the protect engine detect type to default(detect-only) 51 | no engine 52 | 53 | //commit the server policy 54 | commit 55 | 56 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/server-version-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "server_version" 2 | 3 | //config server-version keyword 4 | keyword substitute plain-text for regular-exp 5 | 6 | //delete trojan keyword 7 | no keyword all 8 | no keyword regular-exp 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/spider-scanner-attack-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "spider" 2 | 3 | //config spider keyword 4 | keyword plain-text 5 | 6 | //delete spider keyword 7 | no keyword all 8 | no keyword plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/sql-injection-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "sql" 2 | 3 | //config sql keyword 4 | keyword plain-text 5 | 6 | //delete sql keyword 7 | no keyword all 8 | no keyword plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/trojan-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "trojan" 2 | 3 | //config trojan keyword 4 | keyword plain-text 5 | 6 | //delete trojan keyword 7 | no keyword all 8 | no keyword plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/url-black-list.cli: -------------------------------------------------------------------------------- 1 | #submode "urlblack" 2 | 3 | //add url to url black list 4 | url 5 | //delete all urls from url black list 6 | no url all 7 | //delete specified url from url black list 8 | no url 9 | 10 | //set the dynamic timeout 11 | dynamic timeout 12 | //set the dynamic timeout to default(32 min) 13 | no dynamic timeout 14 | 15 | //set except url 16 | dynamic except referrer-url 17 | //delete all except urls 18 | no dynamic except all 19 | //delete specified except urls 20 | no dynamic except referrer-url 21 | 22 | //commit all the url black configures 23 | commit 24 | 25 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/url-white-list.cli: -------------------------------------------------------------------------------- 1 | #submode "urlwhite" 2 | 3 | //add url to url white list 4 | url 5 | //delete all urls from url white list 6 | no url all 7 | //delete specified url from url white list 8 | no url 9 | 10 | //commit the url white configure 11 | commit 12 | 13 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/waf-root.cli: -------------------------------------------------------------------------------- 1 | //this is top cli files 2 | 3 | //enter configure submode 4 | enable 5 | #include "root-configure.cli" 6 | -------------------------------------------------------------------------------- /server/cli/linux/weak-password-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "wpd" 2 | //delete weak password webpage 3 | no url all 4 | no url 5 | 6 | //config weak password webpage 7 | url password-name 8 | #include "weak-password-url-mode.cli" 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/weak-password-url-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "wp_url" 2 | 3 | //configure weak password keyword 4 | weak_password 5 | 6 | //delete weak password keyword 7 | no weak_password all 8 | no weak_password plain-text 9 | no weak_password regular-exp 10 | 11 | #endsubmode -------------------------------------------------------------------------------- /server/cli/linux/xss-attack-mode.cli: -------------------------------------------------------------------------------- 1 | #submode "xss" 2 | 3 | //config xss keyword 4 | keyword plain-text 5 | 6 | //delete xss keyword 7 | no keyword all 8 | no keyword plain-text 9 | 10 | #endsubmode -------------------------------------------------------------------------------- /server/cli_common.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/cli_common.c -------------------------------------------------------------------------------- /server/config.m4: -------------------------------------------------------------------------------- 1 | dnl ## Check for libraries 2 | 3 | dnl ## Check for header files 4 | 5 | AC_CHECK_HEADERS(bstring.h unistd.h) 6 | 7 | dnl ## Check for typedefs, structures, and compiler characteristics. 8 | 9 | dnl ## Check for library functions 10 | 11 | AC_CHECK_FUNCS(syslog) 12 | 13 | dnl Obsolete scoreboard code uses this. 14 | AC_CHECK_HEADERS(sys/times.h) 15 | AC_CHECK_FUNCS(times) 16 | -------------------------------------------------------------------------------- /server/convert/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | LTLIBRARY_NAME = libconvert.la 3 | LTLIBRARY_SOURCES = convert_init.c convert_policy.c convert_subpolicy.c \ 4 | convert_sql_injection.c convert_protocol_param.c convert_file_upload.c convert_file_download.c \ 5 | convert_request_method.c convert_black_white.c bitmap.c combind_rule.c convert_server_version.c \ 6 | convert_iccard_information.c convert_modify_check_value.c convert_add_check_value.c \ 7 | convert_add_two_keyword.c convert_idcard_information.c convert_xss_attack.c convert_spider.c \ 8 | convert_keyword_filter.c convert_cookie.c convert_command.c convert_weak_passwd.c convert_trojan.c \ 9 | convert_cc_protect.c convert_code_injection.c convert_csrf.c convert_tools.c 10 | 11 | include $(top_srcdir)/build/ltlib.mk 12 | -------------------------------------------------------------------------------- /server/convert/combind_rule.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/combind_rule.c -------------------------------------------------------------------------------- /server/convert/config.m4: -------------------------------------------------------------------------------- 1 | APACHE_FAST_OUTPUT(server/convert/Makefile) 2 | 3 | -------------------------------------------------------------------------------- /server/convert/convert_add_check_value.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_add_check_value.c -------------------------------------------------------------------------------- /server/convert/convert_add_two_keyword.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_add_two_keyword.c -------------------------------------------------------------------------------- /server/convert/convert_black_white.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_black_white.c -------------------------------------------------------------------------------- /server/convert/convert_cc_protect.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_cc_protect.c -------------------------------------------------------------------------------- /server/convert/convert_code_injection.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_code_injection.c -------------------------------------------------------------------------------- /server/convert/convert_command.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_command.c -------------------------------------------------------------------------------- /server/convert/convert_cookie.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_cookie.c -------------------------------------------------------------------------------- /server/convert/convert_csrf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_csrf.c -------------------------------------------------------------------------------- /server/convert/convert_file_download.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_file_download.c -------------------------------------------------------------------------------- /server/convert/convert_file_upload.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_file_upload.c -------------------------------------------------------------------------------- /server/convert/convert_iccard_information.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_iccard_information.c -------------------------------------------------------------------------------- /server/convert/convert_init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_init.c -------------------------------------------------------------------------------- /server/convert/convert_keyword_filter.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_keyword_filter.c -------------------------------------------------------------------------------- /server/convert/convert_modify_check_value.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_modify_check_value.c -------------------------------------------------------------------------------- /server/convert/convert_policy.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_policy.c -------------------------------------------------------------------------------- /server/convert/convert_private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_private.h -------------------------------------------------------------------------------- /server/convert/convert_protocol_param.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_protocol_param.c -------------------------------------------------------------------------------- /server/convert/convert_request_method.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_request_method.c -------------------------------------------------------------------------------- /server/convert/convert_spider.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_spider.c -------------------------------------------------------------------------------- /server/convert/convert_sql_injection.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_sql_injection.c -------------------------------------------------------------------------------- /server/convert/convert_subpolicy.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_subpolicy.c -------------------------------------------------------------------------------- /server/convert/convert_tools.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_tools.c -------------------------------------------------------------------------------- /server/convert/convert_trojan.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_trojan.c -------------------------------------------------------------------------------- /server/convert/convert_weak_passwd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_weak_passwd.c -------------------------------------------------------------------------------- /server/convert/convert_xss_attack.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/convert/convert_xss_attack.c -------------------------------------------------------------------------------- /server/engine_config.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/engine_config.c -------------------------------------------------------------------------------- /server/eoc_bucket.c: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "httpd.h" 18 | #include "http_connection.h" 19 | 20 | static apr_status_t eoc_bucket_read(apr_bucket *b, const char **str, 21 | apr_size_t *len, apr_read_type_e block) 22 | { 23 | *str = NULL; 24 | *len = 0; 25 | return APR_SUCCESS; 26 | } 27 | 28 | AP_DECLARE(apr_bucket *) ap_bucket_eoc_make(apr_bucket *b) 29 | { 30 | b->length = 0; 31 | b->start = 0; 32 | b->data = NULL; 33 | b->type = &ap_bucket_type_eoc; 34 | 35 | return b; 36 | } 37 | 38 | AP_DECLARE(apr_bucket *) ap_bucket_eoc_create(apr_bucket_alloc_t *list) 39 | { 40 | apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); 41 | 42 | APR_BUCKET_INIT(b); 43 | b->free = apr_bucket_free; 44 | b->list = list; 45 | return ap_bucket_eoc_make(b); 46 | } 47 | 48 | AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_eoc = { 49 | "EOC", 5, APR_BUCKET_METADATA, 50 | apr_bucket_destroy_noop, 51 | eoc_bucket_read, 52 | apr_bucket_setaside_noop, 53 | apr_bucket_split_notimpl, 54 | apr_bucket_simple_copy 55 | }; 56 | -------------------------------------------------------------------------------- /server/error_bucket.c: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "http_protocol.h" 18 | #include "apr_buckets.h" 19 | #include "apr_strings.h" 20 | #if APR_HAVE_STRINGS_H 21 | #include 22 | #endif 23 | 24 | static apr_status_t error_bucket_read(apr_bucket *b, const char **str, 25 | apr_size_t *len, apr_read_type_e block) 26 | { 27 | *str = NULL; 28 | *len = 0; 29 | return APR_SUCCESS; 30 | } 31 | 32 | static void error_bucket_destroy(void *data) 33 | { 34 | ap_bucket_error *h = data; 35 | 36 | if (apr_bucket_shared_destroy(h)) { 37 | apr_bucket_free(h); 38 | } 39 | } 40 | 41 | AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error, 42 | const char *buf, apr_pool_t *p) 43 | { 44 | ap_bucket_error *h; 45 | 46 | h = apr_bucket_alloc(sizeof(*h), b->list); 47 | h->status = error; 48 | h->data = (buf) ? apr_pstrdup(p, buf) : NULL; 49 | 50 | b = apr_bucket_shared_make(b, h, 0, 0); 51 | b->type = &ap_bucket_type_error; 52 | return b; 53 | } 54 | 55 | AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf, 56 | apr_pool_t *p, 57 | apr_bucket_alloc_t *list) 58 | { 59 | apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); 60 | 61 | APR_BUCKET_INIT(b); 62 | b->free = apr_bucket_free; 63 | b->list = list; 64 | return ap_bucket_error_make(b, error, buf, p); 65 | } 66 | 67 | AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_error = { 68 | "ERROR", 5, APR_BUCKET_METADATA, 69 | error_bucket_destroy, 70 | error_bucket_read, 71 | apr_bucket_setaside_notimpl, 72 | apr_bucket_split_notimpl, 73 | apr_bucket_shared_copy 74 | }; 75 | -------------------------------------------------------------------------------- /server/gen_test_char.dep: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Generated Dependency File, included by gen_test_char.mak 2 | 3 | .\gen_test_char.c : \ 4 | "..\srclib\apr\include\apr_lib.h"\ 5 | 6 | -------------------------------------------------------------------------------- /server/listen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/listen.c -------------------------------------------------------------------------------- /server/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/main.c -------------------------------------------------------------------------------- /server/mpm/MPM.NAMING: -------------------------------------------------------------------------------- 1 | 2 | The following MPMs currently exist: 3 | 4 | prefork ....... Multi Process Model with Preforking (Apache 1.3) 5 | perchild ...... Multi Process Model with Threading. 6 | Constant number of processes, variable number of threads 7 | each child process can have a different uid/gid. 8 | mpmt_os2 ...... Multi Process Model with Threading on OS/2 9 | Constant number of processes, variable number of threads. 10 | One acceptor thread per process, multiple workers threads. 11 | winnt ......... Single Process Model with Threading on Windows NT 12 | worker ........ Multi Process model with threads. One acceptor thread, 13 | multiple worker threads. 14 | netware ....... Multi-threaded MPM for Netware 15 | beos .......... Single Process Model with Threading on BeOS 16 | -------------------------------------------------------------------------------- /server/mpm/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = $(MPM_SUBDIR_NAME) 3 | 4 | include $(top_builddir)/build/rules.mk 5 | -------------------------------------------------------------------------------- /server/mpm/config.m4: -------------------------------------------------------------------------------- 1 | AC_MSG_CHECKING(which MPM to use) 2 | AC_ARG_WITH(mpm, 3 | APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use. 4 | MPM={beos|event|worker|prefork|mpmt_os2|winnt}),[ 5 | APACHE_MPM=$withval 6 | ],[ 7 | if test "x$APACHE_MPM" = "x"; then 8 | APACHE_MPM=prefork 9 | fi 10 | ]) 11 | AC_MSG_RESULT($APACHE_MPM) 12 | 13 | apache_cv_mpm=$APACHE_MPM 14 | 15 | ap_mpm_is_threaded () 16 | { 17 | if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "winnt" ; then 18 | return 0 19 | else 20 | return 1 21 | fi 22 | } 23 | 24 | ap_mpm_is_experimental () 25 | { 26 | if test "$apache_cv_mpm" = "event" ; then 27 | return 0 28 | else 29 | return 1 30 | fi 31 | } 32 | 33 | if ap_mpm_is_threaded; then 34 | APR_CHECK_APR_DEFINE(APR_HAS_THREADS) 35 | 36 | if test "x$ac_cv_define_APR_HAS_THREADS" = "xno"; then 37 | AC_MSG_RESULT(The currently selected MPM requires threads which your system seems to lack) 38 | AC_MSG_CHECKING(checking for replacement) 39 | AC_MSG_RESULT(prefork selected) 40 | apache_cv_mpm=prefork 41 | else 42 | case $host in 43 | *-linux-*) 44 | case `uname -r` in 45 | 2.0* ) 46 | dnl Threaded MPM's are not supported on Linux 2.0 47 | dnl as on 2.0 the linuxthreads library uses SIGUSR1 48 | dnl and SIGUSR2 internally 49 | echo "Threaded MPM's are not supported on this platform" 50 | AC_MSG_CHECKING(checking for replacement) 51 | AC_MSG_RESULT(prefork selected) 52 | apache_cv_mpm=prefork 53 | ;; 54 | esac 55 | ;; 56 | esac 57 | fi 58 | fi 59 | 60 | APACHE_FAST_OUTPUT(server/mpm/Makefile) 61 | 62 | MPM_NAME=$apache_cv_mpm 63 | if ap_mpm_is_experimental; then 64 | AC_MSG_WARN(You have selected an EXPERIMENTAL MPM. Be warned!) 65 | MPM_SUBDIR_NAME=experimental/$MPM_NAME 66 | else 67 | MPM_SUBDIR_NAME=$MPM_NAME 68 | fi 69 | MPM_DIR=server/mpm/$MPM_SUBDIR_NAME 70 | MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la 71 | 72 | if test ! -f "$abs_srcdir/$MPM_DIR/mpm.h"; then 73 | AC_MSG_ERROR(the selected mpm -- $apache_cv_mpm -- is not supported) 74 | fi 75 | 76 | APACHE_SUBST(MPM_NAME) 77 | APACHE_SUBST(MPM_SUBDIR_NAME) 78 | MODLIST="$MODLIST mpm_${MPM_NAME}" 79 | 80 | -------------------------------------------------------------------------------- /server/mpm/worker/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | LTLIBRARY_NAME = libworker.la 3 | LTLIBRARY_SOURCES = worker.c fdqueue.c pod.c 4 | 5 | include $(top_srcdir)/build/ltlib.mk 6 | -------------------------------------------------------------------------------- /server/mpm/worker/config5.m4: -------------------------------------------------------------------------------- 1 | dnl ## XXX - Need a more thorough check of the proper flags to use 2 | 3 | if test "$MPM_NAME" = "worker" ; then 4 | AC_CHECK_FUNCS(pthread_kill) 5 | APACHE_FAST_OUTPUT(server/mpm/$MPM_NAME/Makefile) 6 | fi 7 | -------------------------------------------------------------------------------- /server/mpm/worker/mpm.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file worker/mpm.h 19 | * @brief Unix Worker MPM 20 | * 21 | * @defgroup APACHE_MPM_WORKER Unix Worker MPM 22 | * @ingroup APACHE_OS_UNIX APACHE_MPM 23 | * @{ 24 | */ 25 | 26 | #include "scoreboard.h" 27 | #include "unixd.h" 28 | 29 | #ifndef APACHE_MPM_WORKER_H 30 | #define APACHE_MPM_WORKER_H 31 | 32 | #define WORKER_MPM 33 | 34 | #define MPM_NAME "Worker" 35 | 36 | #define AP_MPM_WANT_RECLAIM_CHILD_PROCESSES 37 | #define AP_MPM_WANT_WAIT_OR_TIMEOUT 38 | #define AP_MPM_WANT_PROCESS_CHILD_STATUS 39 | #define AP_MPM_WANT_SET_PIDFILE 40 | #define AP_MPM_WANT_SET_SCOREBOARD 41 | #define AP_MPM_WANT_SET_LOCKFILE 42 | #define AP_MPM_WANT_SET_MAX_REQUESTS 43 | #define AP_MPM_WANT_SET_COREDUMPDIR 44 | #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH 45 | #define AP_MPM_WANT_SIGNAL_SERVER 46 | #define AP_MPM_WANT_SET_MAX_MEM_FREE 47 | #define AP_MPM_WANT_SET_STACKSIZE 48 | #define AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN 49 | #define AP_MPM_WANT_FATAL_SIGNAL_HANDLER 50 | #define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK 51 | 52 | #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid) 53 | #define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0) 54 | #define MPM_ACCEPT_FUNC unixd_accept 55 | 56 | extern int ap_threads_per_child; 57 | extern int ap_max_daemons_limit; 58 | extern server_rec *ap_server_conf; 59 | extern char ap_coredump_dir[MAX_STRING_LEN]; 60 | 61 | #endif /* APACHE_MPM_WORKER_H */ 62 | /** @} */ 63 | -------------------------------------------------------------------------------- /server/mpm/worker/mpm_default.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file worker/mpm_default.h 19 | * @brief Worker MPM defaults 20 | * 21 | * @addtogroup APACHE_MPM_WORKER 22 | * @{ 23 | */ 24 | 25 | #ifndef APACHE_MPM_DEFAULT_H 26 | #define APACHE_MPM_DEFAULT_H 27 | 28 | /* Number of servers to spawn off by default --- also, if fewer than 29 | * this free when the caretaker checks, it will spawn more. 30 | */ 31 | #ifndef DEFAULT_START_DAEMON 32 | #define DEFAULT_START_DAEMON 3 33 | #endif 34 | 35 | /* Maximum number of *free* server processes --- more than this, and 36 | * they will die off. 37 | */ 38 | 39 | #ifndef DEFAULT_MAX_FREE_DAEMON 40 | #define DEFAULT_MAX_FREE_DAEMON 10 41 | #endif 42 | 43 | /* Minimum --- fewer than this, and more will be created */ 44 | 45 | #ifndef DEFAULT_MIN_FREE_DAEMON 46 | #define DEFAULT_MIN_FREE_DAEMON 3 47 | #endif 48 | 49 | #ifndef DEFAULT_THREADS_PER_CHILD 50 | #define DEFAULT_THREADS_PER_CHILD 25 51 | #endif 52 | 53 | /* File used for accept locking, when we use a file */ 54 | #ifndef DEFAULT_LOCKFILE 55 | #define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock" 56 | #endif 57 | 58 | /* Where the main/parent process's pid is logged */ 59 | #ifndef DEFAULT_PIDLOG 60 | #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/pe.pid" 61 | #endif 62 | 63 | /* 64 | * Interval, in microseconds, between scoreboard maintenance. 65 | */ 66 | #ifndef SCOREBOARD_MAINTENANCE_INTERVAL 67 | #define SCOREBOARD_MAINTENANCE_INTERVAL 1000000 68 | #endif 69 | 70 | /* Number of requests to try to handle in a single process. If <= 0, 71 | * the children don't die off. 72 | */ 73 | #ifndef DEFAULT_MAX_REQUESTS_PER_CHILD 74 | #define DEFAULT_MAX_REQUESTS_PER_CHILD 10000 75 | #endif 76 | 77 | #endif /* AP_MPM_DEFAULT_H */ 78 | /** @} */ 79 | -------------------------------------------------------------------------------- /server/mpm/worker/pod.h: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file worker/pod.h 19 | * @brief Worker MPM Pipe of Death 20 | * 21 | * @addtogroup APACHE_MPM_WORKER 22 | * @{ 23 | */ 24 | 25 | #include "apr.h" 26 | #include "apr_strings.h" 27 | #define APR_WANT_STRFUNC 28 | #include "apr_want.h" 29 | 30 | #include "httpd.h" 31 | #include "http_config.h" 32 | #include "http_log.h" 33 | #include "http_main.h" 34 | #include "mpm.h" 35 | #include "mpm_common.h" 36 | #include "ap_mpm.h" 37 | #include "ap_listen.h" 38 | #include "mpm_default.h" 39 | 40 | #define RESTART_CHAR '$' 41 | #define GRACEFUL_CHAR '!' 42 | #define CLI_CLEAR_OK_CHAR 'a' 43 | #define PE_PRE_CONF_OK_CHAR 'b' 44 | #define CLI_CONF_FAIL_CHAR 'c' 45 | #define CLI_CONF_OK_CHAR 'd' 46 | #define PE_FORK_OK_CHAR 'e' 47 | #define PE_MAIN_LOOP_CHAR 'f' 48 | 49 | #define AP_RESTART 0 50 | #define AP_GRACEFUL 1 51 | #define AP_CLI_CLEAR_OK 2 52 | #define AP_PE_PRE_CONF_OK 3 53 | #define AP_CLI_CONF_FAIL 4 54 | #define AP_CLI_CONF_OK 5 55 | #define AP_PE_FORK_OK 6 56 | #define AP_PE_MAIN_LOOP_OK 7 57 | 58 | typedef struct ap_pod_t ap_pod_t; 59 | 60 | struct ap_pod_t { 61 | apr_file_t *pod_in; 62 | apr_file_t *pod_out; 63 | apr_pool_t *p; 64 | }; 65 | 66 | AP_DECLARE(apr_status_t) ap_mpm_pod_open(apr_pool_t *p, ap_pod_t **pod); 67 | AP_DECLARE(int) ap_mpm_pod_check(ap_pod_t *pod); 68 | AP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t *pod); 69 | AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod, int graceful); 70 | AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num, int graceful); 71 | /** @} */ 72 | -------------------------------------------------------------------------------- /server/mpm/worker/worker.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/mpm/worker/worker.c -------------------------------------------------------------------------------- /server/protocol.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/protocol.c -------------------------------------------------------------------------------- /server/util.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/util.c -------------------------------------------------------------------------------- /server/util_cfgtree.c: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define CORE_PRIVATE 18 | #include "util_cfgtree.h" 19 | #include 20 | 21 | ap_directive_t *ap_add_node(ap_directive_t **parent, ap_directive_t *current, 22 | ap_directive_t *toadd, int child) 23 | { 24 | if (current == NULL) { 25 | /* we just started a new parent */ 26 | if (*parent != NULL) { 27 | (*parent)->first_child = toadd; 28 | toadd->parent = *parent; 29 | } 30 | if (child) { 31 | /* First item in config file or container is a container */ 32 | *parent = toadd; 33 | return NULL; 34 | } 35 | return toadd; 36 | } 37 | current->next = toadd; 38 | toadd->parent = *parent; 39 | if (child) { 40 | /* switch parents, navigate into child */ 41 | *parent = toadd; 42 | return NULL; 43 | } 44 | return toadd; 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /server/util_charset.c: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | * contributor license agreements. See the NOTICE file distributed with 3 | * this work for additional information regarding copyright ownership. 4 | * The ASF licenses this file to You under the Apache License, Version 2.0 5 | * (the "License"); you may not use this file except in compliance with 6 | * the License. You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "ap_config.h" 18 | 19 | #if APR_CHARSET_EBCDIC 20 | 21 | #include "httpd.h" 22 | #include "http_log.h" 23 | #include "http_core.h" 24 | #include "util_charset.h" 25 | 26 | /* ap_hdrs_to_ascii, ap_hdrs_from_ascii 27 | * 28 | * These are the translation handles used to translate between the network 29 | * format of protocol headers and the local machine format. 30 | * 31 | * For an EBCDIC machine, these are valid handles which are set up at 32 | * initialization to translate between ISO-8859-1 and the code page of 33 | * the source code. 34 | * 35 | * For an ASCII machine, these remain NULL so that when they are stored 36 | * in the BUFF via ap_bsetop(BO_RXLATE) it ensures that no translation is 37 | * performed. 38 | */ 39 | 40 | apr_xlate_t *ap_hdrs_to_ascii, *ap_hdrs_from_ascii; 41 | 42 | #endif /*APR_CHARSET_EBCDIC */ 43 | -------------------------------------------------------------------------------- /server/util_ip.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/util_ip.c -------------------------------------------------------------------------------- /server/vhost.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/server/vhost.c -------------------------------------------------------------------------------- /srclib/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | BUILD_SUBDIRS = $(AP_BUILD_SRCLIB_DIRS) 3 | CLEAN_SUBDIRS = $(AP_CLEAN_SRCLIB_DIRS) 4 | 5 | include $(top_builddir)/build/rules.mk 6 | -------------------------------------------------------------------------------- /srclib/pcre/AUTHORS: -------------------------------------------------------------------------------- 1 | Written by: Philip Hazel 2 | 3 | University of Cambridge Computing Service, 4 | Cambridge, England. Phone: +44 1223 334714. 5 | 6 | Copyright (c) 1997-2004 University of Cambridge 7 | -------------------------------------------------------------------------------- /srclib/pcre/COPYING: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | ------------ 3 | 4 | PCRE is a library of functions to support regular expressions whose syntax 5 | and semantics are as close as possible to those of the Perl 5 language. 6 | 7 | Release 5 of PCRE is distributed under the terms of the "BSD" licence, as 8 | specified below. The documentation for PCRE, supplied in the "doc" 9 | directory, is distributed under the same terms as the software itself. 10 | 11 | Written by: Philip Hazel 12 | 13 | University of Cambridge Computing Service, 14 | Cambridge, England. Phone: +44 1223 334714. 15 | 16 | Copyright (c) 1997-2004 University of Cambridge 17 | All rights reserved. 18 | 19 | Redistribution and use in source and binary forms, with or without 20 | modification, are permitted provided that the following conditions are met: 21 | 22 | * Redistributions of source code must retain the above copyright notice, 23 | this list of conditions and the following disclaimer. 24 | 25 | * Redistributions in binary form must reproduce the above copyright 26 | notice, this list of conditions and the following disclaimer in the 27 | documentation and/or other materials provided with the distribution. 28 | 29 | * Neither the name of the University of Cambridge nor the names of its 30 | contributors may be used to endorse or promote products derived from 31 | this software without specific prior written permission. 32 | 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 34 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 35 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 36 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 37 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 38 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 39 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 40 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 41 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 42 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 43 | POSSIBILITY OF SUCH DAMAGE. 44 | 45 | End 46 | -------------------------------------------------------------------------------- /srclib/pcre/LICENCE: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | ------------ 3 | 4 | PCRE is a library of functions to support regular expressions whose syntax 5 | and semantics are as close as possible to those of the Perl 5 language. 6 | 7 | Release 5 of PCRE is distributed under the terms of the "BSD" licence, as 8 | specified below. The documentation for PCRE, supplied in the "doc" 9 | directory, is distributed under the same terms as the software itself. 10 | 11 | Written by: Philip Hazel 12 | 13 | University of Cambridge Computing Service, 14 | Cambridge, England. Phone: +44 1223 334714. 15 | 16 | Copyright (c) 1997-2004 University of Cambridge 17 | All rights reserved. 18 | 19 | Redistribution and use in source and binary forms, with or without 20 | modification, are permitted provided that the following conditions are met: 21 | 22 | * Redistributions of source code must retain the above copyright notice, 23 | this list of conditions and the following disclaimer. 24 | 25 | * Redistributions in binary form must reproduce the above copyright 26 | notice, this list of conditions and the following disclaimer in the 27 | documentation and/or other materials provided with the distribution. 28 | 29 | * Neither the name of the University of Cambridge nor the names of its 30 | contributors may be used to endorse or promote products derived from 31 | this software without specific prior written permission. 32 | 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 34 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 35 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 36 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 37 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 38 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 39 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 40 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 41 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 42 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 43 | POSSIBILITY OF SUCH DAMAGE. 44 | 45 | End 46 | -------------------------------------------------------------------------------- /srclib/pcre/Makefile.in: -------------------------------------------------------------------------------- 1 | LTLIBRARY_NAME = libpcre.la 2 | LTLIBRARY_SOURCES = maketables.c get.c study.c pcre.c 3 | 4 | CLEAN_TARGETS = dftables chartables.c 5 | DISTCLEAN_TARGETS = pcre.h pcre-config config.h config.log config.status $(CLEAN_TARGETS) 6 | 7 | include $(top_srcdir)/build/ltlib.mk 8 | 9 | config.h: 10 | touch $@ 11 | 12 | $(LTLIBRARY_OBJECTS) dftables.lo: config.h 13 | 14 | dftables: dftables.lo 15 | $(LINK) $(EXTRA_LDFLAGS) dftables.lo $(EXTRA_LIBS) 16 | 17 | $(srcdir)/chartables.c: dftables 18 | ./dftables $@ 19 | 20 | pcre.lo: $(srcdir)/chartables.c 21 | -------------------------------------------------------------------------------- /srclib/pcre/dftables.dep: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Generated Dependency File, included by dftables.mak 2 | 3 | .\dftables.c : \ 4 | ".\config.h"\ 5 | ".\internal.h"\ 6 | ".\maketables.c"\ 7 | ".\pcre.h"\ 8 | 9 | 10 | !IF "$(CFG)" == "dftables - Win32 Release" 11 | 12 | !ELSEIF "$(CFG)" == "dftables - Win32 Debug" 13 | 14 | !ENDIF 15 | 16 | !IF "$(CFG)" == "dftables - Win32 Release" 17 | 18 | !ELSEIF "$(CFG)" == "dftables - Win32 Debug" 19 | 20 | !ENDIF 21 | 22 | -------------------------------------------------------------------------------- /srclib/pcre/dll.mk: -------------------------------------------------------------------------------- 1 | # dll.mk - auxilary Makefile to easy build dll's for mingw32 target 2 | # ver. 0.6 of 1999-03-25 3 | # 4 | # Homepage of this makefile - http://www.is.lg.ua/~paul/devel/ 5 | # Homepage of original mingw32 project - 6 | # http://www.fu.is.saga-u.ac.jp/~colin/gcc.html 7 | # 8 | # How to use: 9 | # This makefile can: 10 | # 1. Create automatical .def file from list of objects 11 | # 2. Create .dll from objects and .def file, either automatical, or your 12 | # hand-written (maybe) file, which must have same basename as dll 13 | # WARNING! There MUST be object, which name match dll's name. Make sux. 14 | # 3. Create import library from .def (as for .dll, only its name required, 15 | # not dll itself) 16 | # By convention implibs for dll have .dll.a suffix, e.g. libstuff.dll.a 17 | # Why not just libstuff.a? 'Cos that's name for static lib, ok? 18 | # Process divided into 3 phases because: 19 | # 1. Pre-existent .def possible 20 | # 2. Generating implib is enough time-consuming 21 | # 22 | # Variables: 23 | # DLL_LDLIBS - libs for linking dll 24 | # DLL_LDFLAGS - flags for linking dll 25 | # 26 | # By using $(DLL_SUFFIX) instead of 'dll', e.g. stuff.$(DLL_SUFFIX) 27 | # you may help porting makefiles to other platforms 28 | # 29 | # Put this file in your make's include path (e.g. main include dir, for 30 | # more information see include section in make doc). Put in the beginning 31 | # of your own Makefile line "include dll.mk". Specify dependences, e.g.: 32 | # 33 | # Do all stuff in one step 34 | # libstuff.dll.a: $(OBJECTS) stuff.def 35 | # stuff.def: $(OBJECTS) 36 | # 37 | # Steps separated, pre-provided .def, link with user32 38 | # 39 | # DLL_LDLIBS=-luser32 40 | # stuff.dll: $(OBJECTS) 41 | # libstuff.dll.a: $(OBJECTS) 42 | 43 | 44 | DLLWRAP=dllwrap 45 | DLLTOOL=dlltool 46 | 47 | DLL_SUFFIX=dll 48 | 49 | .SUFFIXES: .o .$(DLL_SUFFIX) 50 | 51 | _%.def: %.o 52 | $(DLLTOOL) --export-all --output-def $@ $^ 53 | 54 | %.$(DLL_SUFFIX): %.o 55 | $(DLLWRAP) --dllname $(notdir $@) --driver-name $(CC) --def $*.def -o $@ $(filter %.o,$^) $(DLL_LDFLAGS) $(DLL_LDLIBS) 56 | 57 | lib%.$(DLL_SUFFIX).a:%.def 58 | $(DLLTOOL) --dllname $(notdir $*.dll) --def $< --output-lib $@ 59 | 60 | # End 61 | -------------------------------------------------------------------------------- /srclib/pcre/doc/README_httpd: -------------------------------------------------------------------------------- 1 | The documentation directory has been omitted from this copy of PCRE 2 | inside the httpd codebase because it's huge--over a megabyte of PCRE docs. 3 | 4 | The PCRE documentation directory is available in unmodified form in the 5 | vendor branch. You can access it via web browser or Subversion checkout at 6 | http://svn.apache.org/repos/asf/httpd/httpd/vendor/pcre/current/doc/ 7 | -------------------------------------------------------------------------------- /srclib/pcre/libpcre.def: -------------------------------------------------------------------------------- 1 | LIBRARY libpcre 2 | EXPORTS 3 | pcre_malloc 4 | pcre_free 5 | pcre_config 6 | pcre_callout 7 | pcre_compile 8 | pcre_copy_substring 9 | pcre_exec 10 | pcre_get_substring 11 | pcre_get_stringnumber 12 | pcre_get_substring_list 13 | pcre_free_substring 14 | pcre_free_substring_list 15 | pcre_info 16 | pcre_fullinfo 17 | pcre_maketables 18 | pcre_study 19 | pcre_version 20 | -------------------------------------------------------------------------------- /srclib/pcre/libpcre.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre 9 | Description: PCRE - Perl compatible regular expressions C library 10 | Version: @PCRE_VERSION@ 11 | Libs: -L${libdir} -lpcre 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /srclib/pcre/libpcreposix.def: -------------------------------------------------------------------------------- 1 | LIBRARY libpcreposix 2 | EXPORTS 3 | pcre_malloc 4 | pcre_free 5 | pcre_config 6 | pcre_callout 7 | pcre_compile 8 | pcre_copy_substring 9 | pcre_exec 10 | pcre_get_substring 11 | pcre_get_stringnumber 12 | pcre_get_substring_list 13 | pcre_free_substring 14 | pcre_free_substring_list 15 | pcre_info 16 | pcre_fullinfo 17 | pcre_maketables 18 | pcre_study 19 | pcre_version 20 | 21 | regcomp 22 | regexec 23 | regerror 24 | regfree 25 | -------------------------------------------------------------------------------- /srclib/pcre/makevp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM This file was contributed by Alexander Tokarev for building PCRE for use 4 | REM with Virtual Pascal. It has not been tested with the latest PCRE release. 5 | 6 | REM CHANGE THIS FOR YOUR BORLAND C++ COMPILER PATH 7 | 8 | SET BORLAND=c:\usr\apps\bcc55 9 | 10 | sh configure 11 | 12 | bcc32 -DDFTABLES -DSTATIC -DVPCOMPAT -I%BORLAND%\include -L%BORLAND%\lib dftables.c 13 | 14 | dftables > chartables.c 15 | 16 | bcc32 -c -RT- -y- -v- -u- -P- -O2 -5 -DSTATIC -DVPCOMPAT -UDFTABLES -I%BORLAND%\include get.c maketables.c pcre.c study.c 17 | 18 | tlib %BORLAND%\lib\cw32.lib *calloc *del *strncmp *memcpy *memmove *memset 19 | tlib pcre.lib +get.obj +maketables.obj +pcre.obj +study.obj +calloc.obj +del.obj +strncmp.obj +memcpy.obj +memmove.obj +memset.obj 20 | 21 | del *.obj *.exe *.tds *.bak >nul 2>nul 22 | 23 | echo --- 24 | echo Now the library should be complete. Please check all messages above. 25 | echo Don't care for warnings, it's OK. 26 | -------------------------------------------------------------------------------- /srclib/pcre/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id: mkinstalldirs 106103 2004-11-21 18:50:36Z nd $ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /srclib/pcre/pcre-config.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | exec_prefix_set=no 6 | 7 | usage="\ 8 | Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]" 9 | 10 | if test $# -eq 0; then 11 | echo "${usage}" 1>&2 12 | exit 1 13 | fi 14 | 15 | libR= 16 | case `uname -s` in 17 | *SunOS*) 18 | libR=" -R@libdir@" 19 | ;; 20 | esac 21 | 22 | while test $# -gt 0; do 23 | case "$1" in 24 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 25 | *) optarg= ;; 26 | esac 27 | 28 | case $1 in 29 | --prefix=*) 30 | prefix=$optarg 31 | if test $exec_prefix_set = no ; then 32 | exec_prefix=$optarg 33 | fi 34 | ;; 35 | --prefix) 36 | echo $prefix 37 | ;; 38 | --exec-prefix=*) 39 | exec_prefix=$optarg 40 | exec_prefix_set=yes 41 | ;; 42 | --exec-prefix) 43 | echo $exec_prefix 44 | ;; 45 | --version) 46 | echo @PCRE_VERSION@ 47 | ;; 48 | --cflags | --cflags-posix) 49 | if test @includedir@ != /usr/include ; then 50 | includes=-I@includedir@ 51 | fi 52 | echo $includes 53 | ;; 54 | --libs-posix) 55 | echo -L@libdir@$libR -lpcreposix -lpcre 56 | ;; 57 | --libs) 58 | echo -L@libdir@$libR -lpcre 59 | ;; 60 | *) 61 | echo "${usage}" 1>&2 62 | exit 1 63 | ;; 64 | esac 65 | shift 66 | done 67 | -------------------------------------------------------------------------------- /srclib/pcre/pcre.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/srclib/pcre/pcre.c -------------------------------------------------------------------------------- /srclib/pcre/pcre.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | 3 | pcre_malloc DATA 4 | pcre_free DATA 5 | 6 | pcre_compile 7 | pcre_copy_substring 8 | pcre_exec 9 | pcre_get_substring 10 | pcre_get_substring_list 11 | pcre_free_substring 12 | pcre_free_substring_list 13 | pcre_info 14 | pcre_fullinfo 15 | pcre_maketables 16 | pcre_study 17 | pcre_version 18 | 19 | regcomp 20 | regexec 21 | regerror 22 | regfree 23 | -------------------------------------------------------------------------------- /srclib/pcre/pcre.dep: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Generated Dependency File, included by pcre.mak 2 | 3 | !IF "$(CFG)" == "pcre - Win32 Release" 4 | 5 | !ELSEIF "$(CFG)" == "pcre - Win32 Debug" 6 | 7 | !ENDIF 8 | 9 | .\get.c : \ 10 | ".\config.h"\ 11 | ".\internal.h"\ 12 | ".\pcre.h"\ 13 | 14 | 15 | .\maketables.c : \ 16 | ".\config.h"\ 17 | ".\internal.h"\ 18 | ".\pcre.h"\ 19 | 20 | 21 | .\pcre.c : \ 22 | ".\chartables.c"\ 23 | ".\config.h"\ 24 | ".\internal.h"\ 25 | ".\pcre.h"\ 26 | ".\printint.c"\ 27 | ".\ucp.c"\ 28 | ".\ucp.h"\ 29 | ".\ucpinternal.h"\ 30 | ".\ucptable.c"\ 31 | ".\ucptypetable.c"\ 32 | 33 | 34 | .\study.c : \ 35 | ".\config.h"\ 36 | ".\internal.h"\ 37 | ".\pcre.h"\ 38 | 39 | 40 | !IF "$(CFG)" == "pcre - Win32 Release" 41 | 42 | !ELSEIF "$(CFG)" == "pcre - Win32 Debug" 43 | 44 | !ENDIF 45 | 46 | !IF "$(CFG)" == "pcre - Win32 Release" 47 | 48 | !ELSEIF "$(CFG)" == "pcre - Win32 Debug" 49 | 50 | !ENDIF 51 | 52 | -------------------------------------------------------------------------------- /srclib/pcre/testdata/testinput1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/srclib/pcre/testdata/testinput1 -------------------------------------------------------------------------------- /srclib/pcre/testdata/testinput3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/srclib/pcre/testdata/testinput3 -------------------------------------------------------------------------------- /srclib/pcre/testdata/testinput5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/srclib/pcre/testdata/testinput5 -------------------------------------------------------------------------------- /srclib/pcre/testdata/testoutput1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/srclib/pcre/testdata/testoutput1 -------------------------------------------------------------------------------- /srclib/pcre/testdata/testoutput3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/srclib/pcre/testdata/testoutput3 -------------------------------------------------------------------------------- /srclib/pcre/testdata/testoutput5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freewaf/waf-pe/b8230241ec23e4a2706a7de9b2670671c304ba4b/srclib/pcre/testdata/testoutput5 -------------------------------------------------------------------------------- /srclib/pcre/ucp.h: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * libucp - Unicode Property Table handler * 3 | *************************************************/ 4 | 5 | /* These are the character categories that are returned by ucp_findchar */ 6 | 7 | enum { 8 | ucp_C, /* Other */ 9 | ucp_L, /* Letter */ 10 | ucp_M, /* Mark */ 11 | ucp_N, /* Number */ 12 | ucp_P, /* Punctuation */ 13 | ucp_S, /* Symbol */ 14 | ucp_Z /* Separator */ 15 | }; 16 | 17 | /* These are the detailed character types that are returned by ucp_findchar */ 18 | 19 | enum { 20 | ucp_Cc, /* Control */ 21 | ucp_Cf, /* Format */ 22 | ucp_Cn, /* Unassigned */ 23 | ucp_Co, /* Private use */ 24 | ucp_Cs, /* Surrogate */ 25 | ucp_Ll, /* Lower case letter */ 26 | ucp_Lm, /* Modifier letter */ 27 | ucp_Lo, /* Other letter */ 28 | ucp_Lt, /* Title case letter */ 29 | ucp_Lu, /* Upper case letter */ 30 | ucp_Mc, /* Spacing mark */ 31 | ucp_Me, /* Enclosing mark */ 32 | ucp_Mn, /* Non-spacing mark */ 33 | ucp_Nd, /* Decimal number */ 34 | ucp_Nl, /* Letter number */ 35 | ucp_No, /* Other number */ 36 | ucp_Pc, /* Connector punctuation */ 37 | ucp_Pd, /* Dash punctuation */ 38 | ucp_Pe, /* Close punctuation */ 39 | ucp_Pf, /* Final punctuation */ 40 | ucp_Pi, /* Initial punctuation */ 41 | ucp_Po, /* Other punctuation */ 42 | ucp_Ps, /* Open punctuation */ 43 | ucp_Sc, /* Currency symbol */ 44 | ucp_Sk, /* Modifier symbol */ 45 | ucp_Sm, /* Mathematical symbol */ 46 | ucp_So, /* Other symbol */ 47 | ucp_Zl, /* Line separator */ 48 | ucp_Zp, /* Paragraph separator */ 49 | ucp_Zs /* Space separator */ 50 | }; 51 | 52 | /* For use in PCRE we make this function static so that there is no conflict if 53 | PCRE is linked with an application that makes use of an external version - 54 | assuming an external version is ever released... */ 55 | 56 | static int ucp_findchar(const int, int *, int *); 57 | 58 | /* End of ucp.h */ 59 | -------------------------------------------------------------------------------- /support/README: -------------------------------------------------------------------------------- 1 | Support files: 2 | 3 | ab 4 | ABuse your server with this benchmarker. Rudimentary 5 | command line testing tool. 6 | 7 | apachectl 8 | Apache run-time Control script. To facilitate the 9 | administrator and/or your rc.d scripts to control the 10 | functioning of the Apache httpd daemon. 11 | 12 | apxs 13 | APache eXtenSion tool. Eases building and installing 14 | DSO style modules. 15 | 16 | dbmmanage 17 | Create and update user authentication files in the faster 18 | DBM format used by mod_auth_db. 19 | 20 | htcacheclean 21 | Keep the size of mod_disk_cache store within a certain limit. 22 | 23 | htdigest 24 | Create and update user authentication files used in 25 | DIGEST authentification. See mod_auth_digest. 26 | 27 | htpasswd 28 | Create and update user authentication files used in 29 | BASIC authentification. I.e. the htpasswd files. 30 | See mod_auth. 31 | 32 | httpd.8 33 | General apache man page. 34 | 35 | log_server_status 36 | This script is designed to be run at a frequent interval by something 37 | like cron. It connects to the server and downloads the status 38 | information. It reformats the information to a single line and logs 39 | it to a file. 40 | 41 | logresolve 42 | resolve hostnames for IP-adresses in Apache logfiles 43 | 44 | phf_abuse_log.cgi 45 | This script can be used to detect people trying to abuse an ancient 46 | and long plugged security hole which existed in a CGI script distributed 47 | with Apache 1.0.3 and earlier versions. 48 | 49 | rotatelogs 50 | rotate Apache logs without having to kill the server. 51 | 52 | split-logfile 53 | This script will take a combined virtual hosts access 54 | log file and break its contents into separate files. 55 | 56 | suexec 57 | Switch User For Exec. Used internally by apache, 58 | see the document `Apache suEXEC Support' 59 | under http://www.apache.org/docs/suexec.html . 60 | 61 | SHA1 62 | This directory includes some utilities to allow Apache 1.3.6 to 63 | recognize passwords in SHA1 format, as used by Netscape web 64 | servers. It is not installed by default. 65 | 66 | -------------------------------------------------------------------------------- /support/interface.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test $1 = "addbr"; then 4 | brctl addbr $2 5 | ifconfig $2 up 6 | elif test $1 = "delbr"; then 7 | ifconfig $2 down 8 | brctl delbr $2 9 | elif test $1 = "addif"; then 10 | brctl addif $2 $3 11 | elif test $1 = "delif"; then 12 | brctl delif $2 $3 13 | elif test $1 = "addip"; then 14 | ifconfig $2 $3 netmask $4 15 | elif test $1 = "delip"; then 16 | echo $2 | grep -q ':' 17 | if test $? -eq 0; then 18 | ifconfig $2 down 19 | else 20 | ifconfig $2 0.0.0.0 21 | fi 22 | elif test $1 = "setif"; then 23 | ifconfig $2 $3 24 | fi 25 | -------------------------------------------------------------------------------- /support/split-logfile.in: -------------------------------------------------------------------------------- 1 | #!@perlbin@ 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # 19 | # This script will take a combined Web server access 20 | # log file and break its contents into separate files. 21 | # It assumes that the first field of each line is the 22 | # virtual host identity (put there by "%v"), and that 23 | # the logfiles should be named that+".log" in the current 24 | # directory. 25 | # 26 | # The combined log file is read from stdin. Records read 27 | # will be appended to any existing log files. 28 | # 29 | %is_open = (); 30 | 31 | while ($log_line = ) { 32 | # 33 | # Get the first token from the log record; it's the 34 | # identity of the virtual host to which the record 35 | # applies. 36 | # 37 | ($vhost) = split (/\s/, $log_line); 38 | # 39 | # Normalize the virtual host name to all lowercase. 40 | # If it's blank, the request was handled by the default 41 | # server, so supply a default name. This shouldn't 42 | # happen, but caution rocks. 43 | # 44 | $vhost = lc ($vhost) or "access"; 45 | # 46 | # if the vhost contains a "/" or "\", it is illegal so just use 47 | # the default log to avoid any security issues due if it is interprted 48 | # as a directory separator. 49 | if ($vhost =~ m#[/\\]#) { $vhost = "access" } 50 | # 51 | # If the log file for this virtual host isn't opened 52 | # yet, do it now. 53 | # 54 | if (! $is_open{$vhost}) { 55 | open $vhost, ">>${vhost}.log" 56 | or die ("Can't open ${vhost}.log"); 57 | $is_open{$vhost} = 1; 58 | } 59 | # 60 | # Strip off the first token (which may be null in the 61 | # case of the default server), and write the edited 62 | # record to the current log file. 63 | # 64 | $log_line =~ s/^\S*\s+//; 65 | printf $vhost "%s", $log_line; 66 | } 67 | exit 0; 68 | --------------------------------------------------------------------------------