Skip to content

Commit

Permalink
modified: ols1clk.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Egg committed May 7, 2024
1 parent 6e2d286 commit d496781
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ols1clk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1096,16 +1096,16 @@ function configure_owasp
if [ -f ${CRS_DIR}/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example ]; then
mv ${CRS_DIR}/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example ${CRS_DIR}/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
fi
if [ -f modsec_includes.conf ]; then
mv modsec_includes.conf modsec_includes.conf.bk
if [ -f "${RULE_FILE}" ]; then
mv ${RULE_FILE} ${RULE_FILE}.bk
fi
echo 'include modsecurity.conf' >> modsec_includes.conf
echo 'include modsecurity.conf' >> ${RULE_FILE}
if [ -f ${CRS_DIR}/crs-setup.conf.example ]; then
mv ${CRS_DIR}/crs-setup.conf.example ${CRS_DIR}/crs-setup.conf
echo "include ${CRS_DIR}/crs-setup.conf" >> modsec_includes.conf
echo "include ${CRS_DIR}/crs-setup.conf" >> ${RULE_FILE}
fi
ALL_RULES="$(ls ${CRS_DIR}/rules/ | grep 'REQUEST-\|RESPONSE-')"
echo "${ALL_RULES}" | while read LINE; do echo "include ${CRS_DIR}/rules/${LINE}" >> modsec_includes.conf; done
echo "${ALL_RULES}" | while read LINE; do echo "include ${CRS_DIR}/rules/${LINE}" >> ${RULE_FILE}; done
echo 'SecRuleEngine On' > modsecurity.conf
chown -R lsadm ${OWASP_DIR}
}
Expand Down

0 comments on commit d496781

Please sign in to comment.