[GHA] Change File Paths - generate-files.sh and dependencies

This commit is contained in:
Mitchell Krog 2021-06-21 11:46:54 +02:00
parent 17f99ffdc0
commit 722c1e18bc
No known key found for this signature in database
GPG key ID: E02E9D10427B6A43
11 changed files with 136 additions and 137 deletions

View file

@ -46,26 +46,26 @@
YEAR=$(date +"%Y") YEAR=$(date +"%Y")
MONTH=$(date +"%m") MONTH=$(date +"%m")
MY_GIT_TAG=V3.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER} MY_GIT_TAG=V3.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
BAD_REFERRERS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list) BAD_REFERRERS=$(wc -l < ./_generator_lists/bad-referrers.list)
BAD_BOTS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list) BAD_BOTS=$(wc -l < ./_generator_lists/bad-user-agents.list)
_now="$(date)" _now="$(date)"
# ************************************* # *************************************
# Specify input lists for the generator # Specify input lists for the generator
# ************************************* # *************************************
_input1=${TRAVIS_BUILD_DIR}/_generator_lists/good-user-agents.list _input1=./_generator_lists/good-user-agents.list
_input2=${TRAVIS_BUILD_DIR}/_generator_lists/allowed-user-agents.list _input2=./_generator_lists/allowed-user-agents.list
_input3=${TRAVIS_BUILD_DIR}/_generator_lists/limited-user-agents.list _input3=./_generator_lists/limited-user-agents.list
_input4=${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list _input4=./_generator_lists/bad-user-agents.list
_input5=${TRAVIS_BUILD_DIR}/.dev-tools/referrers-regex-format.txt _input5=./dev-tools/referrers-regex-format.txt
_input6=${TRAVIS_BUILD_DIR}/_generator_lists/google-ip-ranges.list _input6=./_generator_lists/google-ip-ranges.list
_input7=${TRAVIS_BUILD_DIR}/_generator_lists/bing-ip-ranges.list _input7=./_generator_lists/bing-ip-ranges.list
_input8=${TRAVIS_BUILD_DIR}/_generator_lists/wordpress-theme-detectors.list _input8=./_generator_lists/wordpress-theme-detectors.list
_input9=${TRAVIS_BUILD_DIR}/_generator_lists/nibbler-seo.list _input9=./_generator_lists/nibbler-seo.list
_input10=${TRAVIS_BUILD_DIR}/_generator_lists/cloudflare-ip-ranges.list _input10=./_generator_lists/cloudflare-ip-ranges.list
_input11=${TRAVIS_BUILD_DIR}/_generator_lists/bad-ip-addresses.list _input11=./_generator_lists/bad-ip-addresses.list
_input12=${TRAVIS_BUILD_DIR}/_generator_lists/fake-googlebots.list _input12=./_generator_lists/fake-googlebots.list
# ******************************************************* # *******************************************************
@ -90,7 +90,7 @@ _inputdb12=/tmp/fake-googlebots.db
# Declare temporary variables used during generation # Declare temporary variables used during generation
# ************************************************** # **************************************************
_nginx=${TRAVIS_BUILD_DIR}/.dev-tools/globalblacklist-testing.template _nginx=./dev-tools/globalblacklist-testing.template
_tmpnginxA=_tmpnginxA _tmpnginxA=_tmpnginxA
_tmpnginx1=_tmpnginx1 _tmpnginx1=_tmpnginx1
_tmpnginx2=_tmpnginx2 _tmpnginx2=_tmpnginx2
@ -178,13 +178,13 @@ ed -s ${_inputdb1}<<\IN
1,/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb1} rm ${_inputdb1}
@ -204,11 +204,11 @@ ed -s ${_inputdb2}<<\IN
1,/# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb2} rm ${_inputdb2}
@ -228,11 +228,11 @@ ed -s ${_inputdb3}<<\IN
1,/# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb3} rm ${_inputdb3}
@ -252,11 +252,11 @@ ed -s ${_inputdb4}<<\IN
1,/# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb4} rm ${_inputdb4}
@ -277,11 +277,11 @@ ed -s ${_inputdb5}<<\IN
1,/# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb5} rm ${_inputdb5}
@ -301,11 +301,11 @@ ed -s ${_inputdb6}<<\IN
1,/# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb6} rm ${_inputdb6}
@ -325,11 +325,11 @@ ed -s ${_inputdb7}<<\IN
1,/# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb7} rm ${_inputdb7}
@ -349,11 +349,11 @@ ed -s ${_inputdb8}<<\IN
1,/# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb8} rm ${_inputdb8}
@ -373,11 +373,11 @@ ed -s ${_inputdb9}<<\IN
1,/# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/x /# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb9} rm ${_inputdb9}
@ -397,11 +397,11 @@ ed -s ${_inputdb10}<<\IN
1,/# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb10} rm ${_inputdb10}
@ -421,11 +421,11 @@ ed -s ${_inputdb11}<<\IN
1,/# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb11} rm ${_inputdb11}
@ -445,11 +445,11 @@ ed -s ${_inputdb12}<<\IN
1,/# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb12} rm ${_inputdb12}
@ -464,13 +464,13 @@ ed -s ${_inputdbA}<<\IN
1,/### VERSION INFORMATION #/d 1,/### VERSION INFORMATION #/d
/### VERSION INFORMATION ##/,$d /### VERSION INFORMATION ##/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/### VERSION INFORMATION #/x /### VERSION INFORMATION #/x
.t. .t.
.,/### VERSION INFORMATION ##/-d .,/### VERSION INFORMATION ##/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdbA} rm ${_inputdbA}
@ -479,7 +479,7 @@ rm ${_inputdbA}
# Generate Additional Files and Copy Them to Folders # Generate Additional Files and Copy Them to Folders
# ************************************************** # **************************************************
sudo cp ${_nginx} ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version.conf sudo cp ${_nginx} ./conf.d/globalblacklist-testing-version.conf
# ********************** # **********************
# Exit With Error Number # Exit With Error Number

View file

@ -46,8 +46,8 @@
YEAR=$(date +"%Y") YEAR=$(date +"%Y")
MONTH=$(date +"%m") MONTH=$(date +"%m")
MY_GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER} MY_GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
BAD_REFERRERS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list) BAD_REFERRERS=$(wc -l < ./_generator_lists/bad-referrers.list)
BAD_BOTS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list) BAD_BOTS=$(wc -l < ./_generator_lists/bad-user-agents.list)
_now="$(date)" _now="$(date)"
# NOTE: # NOTE:
@ -59,18 +59,18 @@ _now="$(date)"
# Specify input lists for the generator # Specify input lists for the generator
# ************************************* # *************************************
_input1=${TRAVIS_BUILD_DIR}/_generator_lists/good-user-agents.list _input1=./_generator_lists/good-user-agents.list
_input2=${TRAVIS_BUILD_DIR}/_generator_lists/allowed-user-agents.list _input2=./_generator_lists/allowed-user-agents.list
_input3=${TRAVIS_BUILD_DIR}/_generator_lists/limited-user-agents.list _input3=./_generator_lists/limited-user-agents.list
_input4=${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list _input4=./_generator_lists/bad-user-agents.list
_input5=${TRAVIS_BUILD_DIR}/.dev-tools/referrers-regex-format.txt _input5=./dev-tools/referrers-regex-format.txt
_input6=${TRAVIS_BUILD_DIR}/_generator_lists/google-ip-ranges.list _input6=./_generator_lists/google-ip-ranges.list
_input7=${TRAVIS_BUILD_DIR}/_generator_lists/bing-ip-ranges.list _input7=./_generator_lists/bing-ip-ranges.list
_input8=${TRAVIS_BUILD_DIR}/_generator_lists/wordpress-theme-detectors.list _input8=./_generator_lists/wordpress-theme-detectors.list
_input9=${TRAVIS_BUILD_DIR}/_generator_lists/nibbler-seo.list _input9=./_generator_lists/nibbler-seo.list
_input10=${TRAVIS_BUILD_DIR}/_generator_lists/cloudflare-ip-ranges.list _input10=./_generator_lists/cloudflare-ip-ranges.list
_input11=${TRAVIS_BUILD_DIR}/_generator_lists/bad-ip-addresses.list _input11=./_generator_lists/bad-ip-addresses.list
_input12=${TRAVIS_BUILD_DIR}/_generator_lists/fake-googlebots.list _input12=./_generator_lists/fake-googlebots.list
# ******************************************************* # *******************************************************
@ -95,7 +95,7 @@ _inputdb12=/tmp/fake-googlebots.db
# Declare temporary variables used during generation # Declare temporary variables used during generation
# ************************************************** # **************************************************
_nginx=${TRAVIS_BUILD_DIR}/.dev-tools/globalblacklist.template _nginx=./dev-tools/globalblacklist.template
_tmpnginxA=_tmpnginxA _tmpnginxA=_tmpnginxA
_tmpnginx1=_tmpnginx1 _tmpnginx1=_tmpnginx1
_tmpnginx2=_tmpnginx2 _tmpnginx2=_tmpnginx2
@ -183,13 +183,13 @@ ed -s ${_inputdb1}<<\IN
1,/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb1} rm ${_inputdb1}
@ -209,11 +209,11 @@ ed -s ${_inputdb2}<<\IN
1,/# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb2} rm ${_inputdb2}
@ -233,11 +233,11 @@ ed -s ${_inputdb3}<<\IN
1,/# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb3} rm ${_inputdb3}
@ -257,11 +257,11 @@ ed -s ${_inputdb4}<<\IN
1,/# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb4} rm ${_inputdb4}
@ -281,11 +281,11 @@ ed -s ${_inputdb5}<<\IN
1,/# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb5} rm ${_inputdb5}
@ -305,11 +305,11 @@ ed -s ${_inputdb6}<<\IN
1,/# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb6} rm ${_inputdb6}
@ -329,11 +329,11 @@ ed -s ${_inputdb7}<<\IN
1,/# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb7} rm ${_inputdb7}
@ -353,11 +353,11 @@ ed -s ${_inputdb8}<<\IN
1,/# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb8} rm ${_inputdb8}
@ -377,11 +377,11 @@ ed -s ${_inputdb9}<<\IN
1,/# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/x /# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb9} rm ${_inputdb9}
@ -401,11 +401,11 @@ ed -s ${_inputdb10}<<\IN
1,/# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb10} rm ${_inputdb10}
@ -425,11 +425,11 @@ ed -s ${_inputdb11}<<\IN
1,/# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/x /# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdb11} rm ${_inputdb11}
@ -449,11 +449,11 @@ ed -s ${_inputdb12}<<\IN
1,/# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/d 1,/# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d /# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template .r ./dev-tools/globalblacklist-testing.template
/# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/x /# START FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/x
.t. .t.
.,/# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d .,/# END FAKE GOOGLEBOTS ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist-testing.template w ./dev-tools/globalblacklist-testing.template
q q
IN IN
rm ${_inputdb12} rm ${_inputdb12}
@ -468,13 +468,13 @@ ed -s ${_inputdbA}<<\IN
1,/### VERSION INFORMATION #/d 1,/### VERSION INFORMATION #/d
/### VERSION INFORMATION ##/,$d /### VERSION INFORMATION ##/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template .r ./dev-tools/globalblacklist.template
/### VERSION INFORMATION #/x /### VERSION INFORMATION #/x
.t. .t.
.,/### VERSION INFORMATION ##/-d .,/### VERSION INFORMATION ##/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template w ./dev-tools/globalblacklist.template
q q
IN IN
rm ${_inputdbA} rm ${_inputdbA}
@ -483,8 +483,8 @@ rm ${_inputdbA}
# Generate Additional Files and Copy Them to Folders # Generate Additional Files and Copy Them to Folders
# ************************************************** # **************************************************
sudo cp ${_nginx} ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist.conf sudo cp ${_nginx} ./conf.d/globalblacklist.conf
sudo cp ${_nginx} ${TRAVIS_BUILD_DIR}/_sample_config_files/Engintron_for_cPanel_WHM_Configuration_Example/etc/nginx/conf.d/globalblacklist.conf sudo cp ${_nginx} ./_sample_config_files/Engintron_for_cPanel_WHM_Configuration_Example/etc/nginx/conf.d/globalblacklist.conf
# ********************** # **********************
# Exit With Error Number # Exit With Error Number

View file

@ -60,27 +60,26 @@ defaultcolor=$(tput setaf default)
# --------- # ---------
makeScriptsExecutable () { makeScriptsExecutable () {
sudo chmod +x ./.dev-tools/*.sh sudo chmod +x ./dev-tools/*.sh
sudo chmod +x ./.dev-tools/*.php sudo chmod +x ./dev-tools/*.php
} }
generateFiles () { generateFiles () {
cd . php ./dev-tools/generate-regex-format-referrers.php
php ./.dev-tools/generate-regex-format-referrers.php php ./dev-tools/generate-regex-format-referrers-whitelist-test.php
php ./.dev-tools/generate-regex-format-referrers-whitelist-test.php sudo ./dev-tools/update-bad-ips.sh
sudo ./.dev-tools/update-bad-ips.sh sudo ./dev-tools/generate-blacklist.sh
sudo ./.dev-tools/generate-blacklist.sh sudo ./dev-tools/generate-blacklist-testing-of-changes.sh
sudo ./.dev-tools/generate-blacklist-testing-of-changes.sh sudo ./dev-tools/modify-config-readme-files.sh
sudo ./.dev-tools/modify-config-readme-files.sh sudo ./dev-tools/prepare-robots-input.sh
sudo ./.dev-tools/prepare-robots-input.sh sudo ./dev-tools/generate-robots.sh
sudo ./.dev-tools/generate-robots.sh sudo ./dev-tools/generate-google-disavow.sh
sudo ./.dev-tools/generate-google-disavow.sh php ./dev-tools/generate-google-exclude.php
php ./.dev-tools/generate-google-exclude.php
sudo dos2unix ./bots.d/*.conf sudo dos2unix ./bots.d/*.conf
sudo dos2unix ./conf.d/*.conf sudo dos2unix ./conf.d/*.conf
sudo dos2unix ./_generator_lists/*.list sudo dos2unix ./_generator_lists/*.list
sudo dos2unix ./.dev-tools/referrers-regex-format.txt sudo dos2unix ./dev-tools/referrers-regex-format.txt
echo "${bold}${green}-------------------------" echo "${bold}${green}-------------------------"
echo "${bold}${green}File Generation Completed" echo "${bold}${green}File Generation Completed"
echo "${bold}${green}-------------------------" echo "${bold}${green}-------------------------"

View file

@ -59,17 +59,17 @@ defaultcolor=$(tput setaf default)
# Variables # Variables
# --------- # ---------
_input1=${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list _input1=./_generator_lists/bad-referrers.list
# --------- # ---------
# FUNCTIONS # FUNCTIONS
# --------- # ---------
createDisavow () { createDisavow () {
sudo truncate -s 0 ${TRAVIS_BUILD_DIR}/_google_webmaster_disavow_links/google-disavow.txt sudo truncate -s 0 ./_google_webmaster_disavow_links/google-disavow.txt
while IFS= read -r LINE while IFS= read -r LINE
do do
printf '%s%s\n' "domain:" "${LINE}" >> ${TRAVIS_BUILD_DIR}/_google_webmaster_disavow_links/google-disavow.txt printf '%s%s\n' "domain:" "${LINE}" >> ./_google_webmaster_disavow_links/google-disavow.txt
done < ${_input1} done < ${_input1}
echo "${bold}${green}-----------------------" echo "${bold}${green}-----------------------"
echo "${bold}${green}Creating Google Disavow" echo "${bold}${green}Creating Google Disavow"

View file

@ -25,7 +25,7 @@ class Generator
*/ */
public function domainWorker() public function domainWorker()
{ {
$domainsFile = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_generator_lists/bad-referrers.list"; $domainsFile = "./_generator_lists/bad-referrers.list";
$handle = fopen($domainsFile, "r"); $handle = fopen($domainsFile, "r");
if (!$handle) { if (!$handle) {
throw new \RuntimeException('Error opening file ' . $domainsFile); throw new \RuntimeException('Error opening file ' . $domainsFile);
@ -61,7 +61,7 @@ class Generator
*/ */
protected function writeToFile($filename, $data) protected function writeToFile($filename, $data)
{ {
$file = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_google_analytics_ghost_spam/$filename"; $file = "./_google_analytics_ghost_spam/$filename";
$handle = fopen($file, 'w') or die('Cannot open file: '.$file); $handle = fopen($file, 'w') or die('Cannot open file: '.$file);
fwrite($handle, $data); fwrite($handle, $data);
} }

View file

@ -26,7 +26,7 @@ class Generator
*/ */
public function domainWorker() public function domainWorker()
{ {
$domainsFile = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_generator_lists/bad-referrers.list"; $domainsFile = "./_generator_lists/bad-referrers.list";
$handle = fopen($domainsFile, "r"); $handle = fopen($domainsFile, "r");
if (!$handle) { if (!$handle) {
@ -69,7 +69,7 @@ class Generator
*/ */
protected function writeToFile($filename, $data) protected function writeToFile($filename, $data)
{ {
$file = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/referrers-regex-format-whitelist-test.txt"; $file = "./.dev-tools/referrers-regex-format-whitelist-test.txt";
$handle = fopen($file, 'w') or die('Cannot open file: '.$file); $handle = fopen($file, 'w') or die('Cannot open file: '.$file);
fwrite($handle, $data); fwrite($handle, $data);
} }
@ -80,7 +80,7 @@ class Generator
*/ */
public function createNginx(array $lines) public function createNginx(array $lines)
{ {
$file = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/referrers-regex-format-whitelist-test.txt"; $file = "./.dev-tools/referrers-regex-format-whitelist-test.txt";
$data = ""; $data = "";
{ {
foreach ($lines as $line) { foreach ($lines as $line) {

View file

@ -26,7 +26,7 @@ class Generator
*/ */
public function domainWorker() public function domainWorker()
{ {
$domainsFile = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_generator_lists/bad-referrers.list"; $domainsFile = "./_generator_lists/bad-referrers.list";
$handle = fopen($domainsFile, "r"); $handle = fopen($domainsFile, "r");
if (!$handle) { if (!$handle) {
@ -69,7 +69,7 @@ class Generator
*/ */
protected function writeToFile($filename, $data) protected function writeToFile($filename, $data)
{ {
$file = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/referrers-regex-format.txt"; $file = "./.dev-tools/referrers-regex-format.txt";
$handle = fopen($file, 'w') or die('Cannot open file: '.$file); $handle = fopen($file, 'w') or die('Cannot open file: '.$file);
fwrite($handle, $data); fwrite($handle, $data);
} }
@ -80,7 +80,7 @@ class Generator
*/ */
public function createNginx(array $lines) public function createNginx(array $lines)
{ {
$file = "/home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/referrers-regex-format.txt"; $file = "./.dev-tools/referrers-regex-format.txt";
$data = ""; $data = "";
{ {
foreach ($lines as $line) { foreach ($lines as $line) {

View file

@ -61,10 +61,10 @@ defaultcolor=$(tput setaf default)
# File Variables # File Variables
# -------------- # --------------
_input1=${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list _input1=./_generator_lists/bad-user-agents.list
_tmprobots=/tmp/robots.txt _tmprobots=./tmp/robots.txt
_inputtmp=${TRAVIS_BUILD_DIR}/.dev-tools/_robots_input/robots.tmp _inputtmp=./dev-tools/_robots_input/robots.tmp
_output=${TRAVIS_BUILD_DIR}/.dev-tools/_robots_input/robots-input.txt _output=./dev-tools/_robots_input/robots-input.txt
# --------- # ---------
# Variables # Variables
@ -73,8 +73,8 @@ _output=${TRAVIS_BUILD_DIR}/.dev-tools/_robots_input/robots-input.txt
YEAR=$(date +"%Y") YEAR=$(date +"%Y")
MONTH=$(date +"%m") MONTH=$(date +"%m")
MY_GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER} MY_GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
BAD_REFERRERS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list) BAD_REFERRERS=$(wc -l < ./_generator_lists/bad-referrers.list)
BAD_BOTS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list) BAD_BOTS=$(wc -l < ./_generator_lists/bad-user-agents.list)
_now="$(date)" _now="$(date)"
_startmarker="### Version Information #" _startmarker="### Version Information #"
_endmarker="### Version Information ##" _endmarker="### Version Information ##"
@ -94,7 +94,7 @@ do
printf 'User-agent: %s\n%s\n' "${LINE}" "Disallow:/" >> "${_tmprobots}" printf 'User-agent: %s\n%s\n' "${LINE}" "Disallow:/" >> "${_tmprobots}"
done < ${_output} done < ${_output}
printf '\n' >> ${_tmprobots} printf '\n' >> ${_tmprobots}
sudo cp ${_tmprobots} ${TRAVIS_BUILD_DIR}/robots.txt/robots.txt sudo cp ${_tmprobots} ./robots.txt/robots.txt
echo "${bold}${green}-------------------------------" echo "${bold}${green}-------------------------------"
echo "${bold}${green}robots.txt Generation Completed" echo "${bold}${green}robots.txt Generation Completed"
echo "${bold}${green}-------------------------------" echo "${bold}${green}-------------------------------"

View file

@ -62,9 +62,9 @@ defaultcolor=$(tput setaf default)
YEAR=$(date +%Y) YEAR=$(date +%Y)
MONTH=$(date +%m) MONTH=$(date +%m)
MY_GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER} MY_GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
BAD_REFERRERS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list) BAD_REFERRERS=$(wc -l < ./_generator_lists/bad-referrers.list)
BAD_BOTS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list) BAD_BOTS=$(wc -l < ./_generator_lists/bad-user-agents.list)
FAKE_GOOGLE_BOTS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/fake-googlebots.list) FAKE_GOOGLE_BOTS=$(wc -l < ./_generator_lists/fake-googlebots.list)
_inputdbA=/tmp/lastupdated.db _inputdbA=/tmp/lastupdated.db
_tmpnginxA=tmpnginxA _tmpnginxA=tmpnginxA
_startmarker="_______________" _startmarker="_______________"
@ -72,9 +72,9 @@ _endmarker="____________________"
_startmarker2="_______________________" _startmarker2="_______________________"
_endmarker2="__________________________" _endmarker2="__________________________"
nginxv="nginx version: nginx/1.10.x" nginxv="nginx version: nginx/1.10.x"
nginxv1=$(cat ${TRAVIS_BUILD_DIR}/.dev-tools/nginxv1.txt) nginxv1=$(cat ./.dev-tools/nginxv1.txt)
nginxv2=$(cat ${TRAVIS_BUILD_DIR}/.dev-tools/nginxv2.txt) nginxv2=$(cat ./.dev-tools/nginxv2.txt)
nginxv3=$(cat ${TRAVIS_BUILD_DIR}/.dev-tools/nginxv3.txt) nginxv3=$(cat ./.dev-tools/nginxv3.txt)
# --------- # ---------
# FUNCTIONS # FUNCTIONS
@ -91,13 +91,13 @@ ed -s ${_inputdbA}<<\IN
1,/_______________/d 1,/_______________/d
/____________________/,$d /____________________/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/README.md .r ./README.md
/_______________/x /_______________/x
.t. .t.
.,/____________________/-d .,/____________________/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/README.md w ./README.md
q q
IN IN
rm ${_inputdbA} rm ${_inputdbA}
@ -114,13 +114,13 @@ ed -s ${_inputdbA}<<\IN
1,/_______________________/d 1,/_______________________/d
/__________________________/,$d /__________________________/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/README.md .r ./README.md
/_______________________/x /_______________________/x
.t. .t.
.,/__________________________/-d .,/__________________________/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/README.md w ./README.md
q q
IN IN
rm ${_inputdbA} rm ${_inputdbA}
@ -137,13 +137,13 @@ ed -s ${_inputdbA}<<\IN
1,/_______________/d 1,/_______________/d
/____________________/,$d /____________________/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/AUTO-CONFIGURATION.md .r ./AUTO-CONFIGURATION.md
/_______________/x /_______________/x
.t. .t.
.,/____________________/-d .,/____________________/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/AUTO-CONFIGURATION.md w ./AUTO-CONFIGURATION.md
q q
IN IN
rm ${_inputdbA} rm ${_inputdbA}
@ -160,13 +160,13 @@ ed -s ${_inputdbA}<<\IN
1,/_______________/d 1,/_______________/d
/____________________/,$d /____________________/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/MANUAL-CONFIGURATION.md .r ./MANUAL-CONFIGURATION.md
/_______________/x /_______________/x
.t. .t.
.,/____________________/-d .,/____________________/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/MANUAL-CONFIGURATION.md w ./MANUAL-CONFIGURATION.md
q q
IN IN
rm ${_inputdbA} rm ${_inputdbA}
@ -183,13 +183,13 @@ ed -s ${_inputdbA}<<\IN
1,/_______________/d 1,/_______________/d
/____________________/,$d /____________________/,$d
,d ,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_google_analytics_ghost_spam/README.md .r ./_google_analytics_ghost_spam/README.md
/_______________/x /_______________/x
.t. .t.
.,/____________________/-d .,/____________________/-d
#,p #,p
#,p used to print output replaced with w below to write #,p used to print output replaced with w below to write
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_google_analytics_ghost_spam/README.md w ./_google_analytics_ghost_spam/README.md
q q
IN IN
rm ${_inputdbA} rm ${_inputdbA}

View file

@ -59,8 +59,8 @@ defaultcolor=$(tput setaf default)
# Specify Input and Output Files # Specify Input and Output Files
# ------------------------------ # ------------------------------
_input=${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list _input=./_generator_lists/bad-user-agents.list
_output=${TRAVIS_BUILD_DIR}/.dev-tools/_robots_input/robots-input.txt _output=./.dev-tools/_robots_input/robots-input.txt
# --------- # ---------
# FUNCTIONS # FUNCTIONS

View file

@ -46,8 +46,8 @@ defaultcolor=$(tput setaf default)
# Variables # Variables
# --------- # ---------
outputfile=${TRAVIS_BUILD_DIR}/_generator_lists/bad-ip-addresses.list outputfile="./_generator_lists/bad-ip-addresses.list"
tmp=${TRAVIS_BUILD_DIR}/_generator_lists/tmp.list tmp="./_generator_lists/tmp.list"
# --------- # ---------
# FUNCTIONS # FUNCTIONS