Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
fixed makefile, make test now puts his stuff in /tmp/naxsi_ut/
Browse files Browse the repository at this point in the history
  • Loading branch information
bui committed Mar 26, 2015
1 parent e095210 commit 56b8a30
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions naxsi_src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ UTIL_VERS := $(shell grep version ../nx_util/setup.py | cut -d "'" -f2)
MOD_PATH := $(shell pwd)
#Enables lcov for unit test code coverage
COV := 1
#TEST := "22*.t"
#TEST := "23*.t"
build:
@if test -d /tmp/nginx ; then \
cd /tmp/nginx && make; \
Expand All @@ -29,15 +29,14 @@ test:
re:
@echo "Nginx source tree : /tmp/nginx"
@if [ $(COV) -eq 1 ] ; then echo "[!] BUILDING WITH -LGCOV" ; \
cd /tmp/nginx && ./configure --with-cc-opt="--coverage" --with-ld-opt=-lgcov --conf-path=/tmp/naxsi_ut/nginx.conf --add-module=$(MOD_PATH) --error-log-path=/tmp/naxsi_ut/error.log --http-client-body-temp-path=/tmp/naxsi_ut/body/ --http-fastcgi-temp-path=/tmp/naxsi_ut/fastcgi/ --http-log-path=/tmp/naxsi_ut/access.log --http-proxy-temp-path=/tmp/naxsi_ut/proxy/ --lock-path=/tmpnginx.lock --pid-path=/tmp/naxsi_ut/nginx.pid --with-http_ssl_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --without-http_uwsgi_module --without-http_scgi_module --with-ipv6 --prefix=/tmp && make \
; else cd /tmp/nginx && ./configure --with-cc-opt="--O0" --with-ld-opt=-lgcov --conf-path=/tmp/naxsi_ut/nginx.conf --add-module=$(MOD_PATH) --error-log-path=/tmp/naxsi_ut/error.log --http-client-body-temp-path=/tmp/naxsi_ut/body/ --http-fastcgi-temp-path=/tmp/naxsi_ut/fastcgi/ --http-log-path=/tmp/naxsi_ut/access.log --http-proxy-temp-path=/tmp/naxsi_ut/proxy/ --lock-path=/tmpnginx.lock --pid-path=/tmp/naxsi_ut/nginx.pid --with-http_ssl_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --without-http_uwsgi_module --without-http_scgi_module --with-ipv6 --prefix=/tmp && make ; fi
cd /tmp/nginx && ./configure --with-cc-opt="--coverage" --with-ld-opt=-lgcov --conf-path=/tmp/naxsi_ut/nginx.conf --add-module=$(MOD_PATH) --error-log-path=/tmp/naxsi_ut/error.log --http-client-body-temp-path=/tmp/naxsi_ut/body/ --http-fastcgi-temp-path=/tmp/naxsi_ut/fastcgi/ --http-log-path=/tmp/naxsi_ut/access.log --http-proxy-temp-path=/tmp/naxsi_ut/proxy/ --lock-path=/tmpnginx.lock --pid-path=/tmp/naxsi_ut/nginx.pid --with-http_ssl_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --without-http_uwsgi_module --without-http_scgi_module --with-ipv6 --prefix=/tmp --with-debug && make \
; else cd /tmp/nginx && ./configure --with-cc-opt="--O0" --with-ld-opt=-lgcov --conf-path=/tmp/naxsi_ut/nginx.conf --add-module=$(MOD_PATH) --error-log-path=/tmp/naxsi_ut/error.log --http-client-body-temp-path=/tmp/naxsi_ut/body/ --http-fastcgi-temp-path=/tmp/naxsi_ut/fastcgi/ --http-log-path=/tmp/naxsi_ut/access.log --http-proxy-temp-path=/tmp/naxsi_ut/proxy/ --lock-path=/tmpnginx.lock --pid-path=/tmp/naxsi_ut/nginx.pid --with-http_ssl_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --without-http_uwsgi_module --without-http_scgi_module --with-ipv6 --prefix=/tmp --with-debug && make ; fi



deploy:
@cp ../naxsi_config/naxsi_core.rules /tmp/
@cd /tmp/nginx && make install
@cat /tmp/nginx.conf | grep -v '#' | sed -e 's@http {@http {\ninclude /etc/nginx/naxsi_core.rules;\n@' | sed -e 's@listen.*80;@listen 4242;@' | sed '1i\master_process off;' > /tmp/nginx.conf.tmp
@cat /tmp/nginx.conf.tmp | sed 's@location / {@location / {\nLearningMode;\nSecRulesEnabled;\nDeniedUrl "/50x.html";\nCheckRule "$$SQL >= 8" BLOCK;\nCheckRule "$$RFI >= 8" BLOCK;\nCheckRule "$$TRAVERSAL >= 4" BLOCK;\nCheckRule "$$EVADE >= 4" BLOCK;\nCheckRule "$$XSS >= 8" BLOCK;\nerror_log /tmp/ngx_error.log debug;\naccess_log /tmp/ngx_access.log;\n@' > /tmp/nginx.conf
@cat /tmp/naxsi_ut/nginx.conf | grep -v '#' | sed -e 's@http {@http {\ninclude /etc/nginx/naxsi_core.rules;\n@' | sed -e 's@listen.*80;@listen 4242;@' | sed '1i\master_process off;' > /tmp/naxsi_ut/nginx.conf.tmp
@cat /tmp/naxsi_ut/nginx.conf.tmp | sed 's@location / {@location / {\nLearningMode;\nSecRulesEnabled;\nDeniedUrl "/50x.html";\nCheckRule "$$SQL >= 8" BLOCK;\nCheckRule "$$RFI >= 8" BLOCK;\nCheckRule "$$TRAVERSAL >= 4" BLOCK;\nCheckRule "$$EVADE >= 4" BLOCK;\nCheckRule "$$XSS >= 8" BLOCK;\nerror_log /tmp/ngx_error.log debug;\naccess_log /tmp/ngx_access.log;\n@' > /tmp/naxsi_ut/nginx.conf
@mkdir -p /tmp/naxsi_ut/body/ /tmp/naxsi_ut/fastcgi/ /tmp/naxsi_ut/proxy/

0 comments on commit 56b8a30

Please sign in to comment.