mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
Improve Regex of Test Unit REF: #264
This commit is contained in:
parent
7c9b1298b2
commit
eac2158ce4
2 changed files with 2 additions and 2 deletions
|
@ -237,7 +237,7 @@ rm ${_inputdb3}
|
|||
printf '%s\n' "$_start4" >> ${_tmpnginx4}
|
||||
while IFS= read -r LINE
|
||||
do
|
||||
printf '\t"~*%s%s"\t\t%s\n' "${LINE}" "(?:\.|\b|\/|[1-9])" "$_action4" >> ${_tmpnginx4}
|
||||
printf '\t"~*%s%s"\t\t%s\n' "(?:\.|\b|\/|[1-9])${LINE}" "(?:\.|\b|\/|[1-9])" "$_action4" >> ${_tmpnginx4}
|
||||
#printf '\t"~*%s"\t\t%s\n' "${LINE}" "$_action4" >> ${_tmpnginx4}
|
||||
done < ${_input4}
|
||||
printf '%s\n' "$_end4" >> ${_tmpnginx4}
|
||||
|
|
|
@ -281,7 +281,7 @@ run_curltest13
|
|||
|
||||
run_curltest14 () {
|
||||
truncate -s 0 ${_curltest14}
|
||||
printf '\n%s\n%s\n%s\n\n' "#########################" "TESTING BAD BOT IS DENIED" "#########################"
|
||||
printf '\n%s\n%s\n%s\n\n' "#########################" "TESTING GOOD BOT IS ALLOWED" "#########################"
|
||||
printf '%s%s\n\n' "Last Tested: " "$_now" >> "${_curltest14}"
|
||||
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" http://localhost:9000/index.php 2>> ${_curltest14}
|
||||
if grep -i 'Welcome' ${_curltest14}; then
|
||||
|
|
Loading…
Add table
Reference in a new issue