Browse Source

Correction for monthly cron; Add a variable UA...

HucSte 3 months ago
parent
commit
cd63c69ddc
5 changed files with 17 additions and 17 deletions
  1. 3 4
      BlockZones.sha512
  2. 4 5
      BlockZones.sha512.sig
  3. 3 3
      cron/monthly.local
  4. 5 5
      inc/commons_functions.ksh
  5. 2 0
      inc/vars.ksh

+ 3 - 4
BlockZones.sha512

@@ -18,20 +18,19 @@ SHA512 (./inc/badips_dialog.ksh) = b5622065f9c2c8745ae7629a521762d378adc859df4c1
 SHA512 (./inc/bogons_dialog.ksh) = 5d2850e9a31910ad34d51e04335eab8171136f3f775ed25237e9061ea3f2feac8bb3c08087c78234b0c2b136bfad78043973ed8f0b349f5c05803f8636b750bd
 SHA512 (./inc/blacklists.ksh) = 66b6f2cbb927d607406c9e13535f9f32e7603d8a13a79a8b3ee3e272832dff9f9a2503d128815ed87ab8be3ef5da2067e528e0d12c6efd5ea039ad7645deec80
 SHA512 (./inc/blacklists_dialog.ksh) = 97c34bdd6907a75ffdd818c1dcaca7074e514b2356a51c781451e364d31650379e49eeede9300d3cf5d14aaf243fc17d3444b7b71526730e64444d79efd8b444
-SHA512 (./inc/vars.ksh) = 1bf33631c9ef994716ae6afd3e749b819a04f8f3627325c4982ddb5fbf0de23dd9d1c3fe2ae968cbe5d0305c4a0db40928049af5302dedb9cf88b388baa56087
+SHA512 (./inc/vars.ksh) = fe0b78404c7193dae05a61bc2ec818ac6a1a586a58bd947a5fcc82f23b836a421385db231d3a2f6cb4d3536c9db0bf6bb6a59ee7e001b0eaa25045ccfe5bafbd
 SHA512 (./inc/bz_execution.ksh) = dfd90d4244fcffd411eea5eadd3de63285619705651dad95956e7e6662de9733b5322c5812711400451defed5cc3555f43d343558bee87631c6f4c480a730f4a
 SHA512 (./inc/cfg_vars.ksh) = b20e957bc8ace9cce9c5c61dccaa5a9ca4c3d67317d1f1af64ba55caf4ce44fcbebfd84c2ac1d075aa2c052698d7ff78c31ba781b29ebca8b563bacc8d315761
-SHA512 (./inc/commons_functions.ksh) = c4d93b85cd145c6efa010005acebe04612a65673fa494f4ec0b9b61f5aed909133b381ac3fa74bdda79c5943cbf36988f6b8f7bde822cde5c5df531393de400e
+SHA512 (./inc/commons_functions.ksh) = e9c3e0ab282eea27a8d226abfaa7ae693a10ad20fabba07290bff73c60c2b94e79295907113476c855239f9695d212a2e959e3d56162a8ad34b83a7eb47ca22b
 SHA512 (./src/README) = c9ade005a9a3735d1c28a6e3dfea40d2134e7a3ae8a20a818d49ca01124a852feca6954fb6c4f4103a688dd6ad3c05b763157ef4c98b05f648d666e4dc9ae1ed
 SHA512 (./src/personals) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
 SHA512 (./src/bogons) = 8ced05237a3305cf941e6d646c59a925c8be99d6f47fc2f32d1430da95c4e9add6a486a7c1056025566727499034e68bfd9d3df67dbd39137f22b00492f66d5b
 SHA512 (./src/domains) = 0b3b828f9a1df1b5e1dfaee91f4cdcc58c629e1364d1e1951d4bae6202703298bbd9051e999a574c592dc20663187c4379ccce05b41a7c1f6f4955b296fc0dc9
 SHA512 (./src/badips) = 795af2c53aa256f6aa29e142fc5a6983bcac672e4737ad8d5ca25dff5def4091a84217bbec876cdc0c039fec0084bc95c531e0b5b64e33c518a9279ac70ba305
-SHA512 (./src/badips.svg) = 795af2c53aa256f6aa29e142fc5a6983bcac672e4737ad8d5ca25dff5def4091a84217bbec876cdc0c039fec0084bc95c531e0b5b64e33c518a9279ac70ba305
 SHA512 (./src/bz_bogons_ipv6) = 847b7ef03ea8ba10302d17ad3c3f7882ad90a5c9f4ee72615f01f4c0a6590670e8f01d551e59f2de5388c583d75c5e043d68d757ec136bb947dbf8e44932f110
 SHA512 (./src/bz_bogons_ipv4) = 2be2075570a995f6db47cdafb167750afa4cf124804bbc7f39b5ef017e111444086316a78cf5ff92676878d9734a575182b963f46b58f672c237b956bb8e7c18
 SHA512 (./cron/cron.badips) = 4ecaf455407e8aad3b9ad7042a89f46d84c0b593aeac7b4d332e8fc72e949b9107d7ac7f0227d2cef02d3223dde198615e97226c480fddda8b60e7d6e9b035eb
-SHA512 (./cron/monthly.local) = bfe1978eb390441a8f147915c6effce6f5c8987e16b6810b4665212175c679aee0d1a05db1d52856365c23510ede48f1b5ca72f17d521c07880a77d7273cd4a6
+SHA512 (./cron/monthly.local) = 149b8605b7f1e1853ee9b9f8a5c587a9f75ccac0ae4bb0c24b6e60767e3c09442e5dece6f6bdc4684bc064796b08d5012d6385758d826b017cb9ebcb96a12ca1
 SHA512 (./cron/cron.unbound) = 7d8600f68c3fc1a94d4bc9eef9fdbc862c95059b4921e03c5cfae366920dce3f0d074c24abe074366ab4ff8b9582578567e67c6608216d73dba02b372dba96f6
 SHA512 (./cron/thuban.monthly.local) = fe0e23a7a4fa37eea67bbb9d5e9ff037877c1168c9a8511547d6f80cd0d355df85d9ad5d7ed82b0c933c7a0f84ec41184b190ea766b295cbb33600f01506684c
 SHA512 (./lists/README) = 9cc7a94e40134fbc85a3545e4665efb6156429c49e69008c78cc10bf1ed3cbdf85fccdbd478b290d9dd76eb455909dccec039b64dc319b263029529b16b73d1e

+ 4 - 5
BlockZones.sha512.sig

@@ -1,5 +1,5 @@
 untrusted comment: verify with BlockZones.pub
-RWQhfERlQr9tQTktsh0vqSJYZHZKU+8SXup1BqI4cSox/oolaSBfppjULYuw7hR6A1U0bJEXmxGdsaXpV1mS/mMIvPcC0JiCxAI=
+RWQhfERlQr9tQQqZ6yXlp7HgTqxmDB44HLt9EhehZIwLkZidib3x5r8FpUukJ6fekA5vNreHpnuUfbo+wJ33JcdTry4EQlg4Rw0=
 SHA512 (./badips.ksh) = 1c7cfb68df30f984dcd461187e452730b5b5e16dd1ed0ab6e4f08ba92ec7f88b98d9ec526ecd3b9f0e2616b252e8af8024802a63ada106fdbb6c29ef64cedb6a
 SHA512 (./README.md) = 4e6f4e72ccbd8ac0ac9d8ac3d19e12d23122086b280a308de70aca24e5e0e55cb531038fd1146bbd3d93706be5e7d2df15878d17aa08b9b84508a1000a5425a9
 SHA512 (./badips) = 8190c8d223fddfd51c76d969c3df9f26306abb2dc92dbd813b762280f6d71f10b301a0a67ebb78ea27cb239c6f1ad53ba67541e348311c2c01df3cb2840adf57
@@ -20,20 +20,19 @@ SHA512 (./inc/badips_dialog.ksh) = b5622065f9c2c8745ae7629a521762d378adc859df4c1
 SHA512 (./inc/bogons_dialog.ksh) = 5d2850e9a31910ad34d51e04335eab8171136f3f775ed25237e9061ea3f2feac8bb3c08087c78234b0c2b136bfad78043973ed8f0b349f5c05803f8636b750bd
 SHA512 (./inc/blacklists.ksh) = 66b6f2cbb927d607406c9e13535f9f32e7603d8a13a79a8b3ee3e272832dff9f9a2503d128815ed87ab8be3ef5da2067e528e0d12c6efd5ea039ad7645deec80
 SHA512 (./inc/blacklists_dialog.ksh) = 97c34bdd6907a75ffdd818c1dcaca7074e514b2356a51c781451e364d31650379e49eeede9300d3cf5d14aaf243fc17d3444b7b71526730e64444d79efd8b444
-SHA512 (./inc/vars.ksh) = 1bf33631c9ef994716ae6afd3e749b819a04f8f3627325c4982ddb5fbf0de23dd9d1c3fe2ae968cbe5d0305c4a0db40928049af5302dedb9cf88b388baa56087
+SHA512 (./inc/vars.ksh) = fe0b78404c7193dae05a61bc2ec818ac6a1a586a58bd947a5fcc82f23b836a421385db231d3a2f6cb4d3536c9db0bf6bb6a59ee7e001b0eaa25045ccfe5bafbd
 SHA512 (./inc/bz_execution.ksh) = dfd90d4244fcffd411eea5eadd3de63285619705651dad95956e7e6662de9733b5322c5812711400451defed5cc3555f43d343558bee87631c6f4c480a730f4a
 SHA512 (./inc/cfg_vars.ksh) = b20e957bc8ace9cce9c5c61dccaa5a9ca4c3d67317d1f1af64ba55caf4ce44fcbebfd84c2ac1d075aa2c052698d7ff78c31ba781b29ebca8b563bacc8d315761
-SHA512 (./inc/commons_functions.ksh) = c4d93b85cd145c6efa010005acebe04612a65673fa494f4ec0b9b61f5aed909133b381ac3fa74bdda79c5943cbf36988f6b8f7bde822cde5c5df531393de400e
+SHA512 (./inc/commons_functions.ksh) = e9c3e0ab282eea27a8d226abfaa7ae693a10ad20fabba07290bff73c60c2b94e79295907113476c855239f9695d212a2e959e3d56162a8ad34b83a7eb47ca22b
 SHA512 (./src/README) = c9ade005a9a3735d1c28a6e3dfea40d2134e7a3ae8a20a818d49ca01124a852feca6954fb6c4f4103a688dd6ad3c05b763157ef4c98b05f648d666e4dc9ae1ed
 SHA512 (./src/personals) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
 SHA512 (./src/bogons) = 8ced05237a3305cf941e6d646c59a925c8be99d6f47fc2f32d1430da95c4e9add6a486a7c1056025566727499034e68bfd9d3df67dbd39137f22b00492f66d5b
 SHA512 (./src/domains) = 0b3b828f9a1df1b5e1dfaee91f4cdcc58c629e1364d1e1951d4bae6202703298bbd9051e999a574c592dc20663187c4379ccce05b41a7c1f6f4955b296fc0dc9
 SHA512 (./src/badips) = 795af2c53aa256f6aa29e142fc5a6983bcac672e4737ad8d5ca25dff5def4091a84217bbec876cdc0c039fec0084bc95c531e0b5b64e33c518a9279ac70ba305
-SHA512 (./src/badips.svg) = 795af2c53aa256f6aa29e142fc5a6983bcac672e4737ad8d5ca25dff5def4091a84217bbec876cdc0c039fec0084bc95c531e0b5b64e33c518a9279ac70ba305
 SHA512 (./src/bz_bogons_ipv6) = 847b7ef03ea8ba10302d17ad3c3f7882ad90a5c9f4ee72615f01f4c0a6590670e8f01d551e59f2de5388c583d75c5e043d68d757ec136bb947dbf8e44932f110
 SHA512 (./src/bz_bogons_ipv4) = 2be2075570a995f6db47cdafb167750afa4cf124804bbc7f39b5ef017e111444086316a78cf5ff92676878d9734a575182b963f46b58f672c237b956bb8e7c18
 SHA512 (./cron/cron.badips) = 4ecaf455407e8aad3b9ad7042a89f46d84c0b593aeac7b4d332e8fc72e949b9107d7ac7f0227d2cef02d3223dde198615e97226c480fddda8b60e7d6e9b035eb
-SHA512 (./cron/monthly.local) = bfe1978eb390441a8f147915c6effce6f5c8987e16b6810b4665212175c679aee0d1a05db1d52856365c23510ede48f1b5ca72f17d521c07880a77d7273cd4a6
+SHA512 (./cron/monthly.local) = 149b8605b7f1e1853ee9b9f8a5c587a9f75ccac0ae4bb0c24b6e60767e3c09442e5dece6f6bdc4684bc064796b08d5012d6385758d826b017cb9ebcb96a12ca1
 SHA512 (./cron/cron.unbound) = 7d8600f68c3fc1a94d4bc9eef9fdbc862c95059b4921e03c5cfae366920dce3f0d074c24abe074366ab4ff8b9582578567e67c6608216d73dba02b372dba96f6
 SHA512 (./cron/thuban.monthly.local) = fe0e23a7a4fa37eea67bbb9d5e9ff037877c1168c9a8511547d6f80cd0d355df85d9ad5d7ed82b0c933c7a0f84ec41184b190ea766b295cbb33600f01506684c
 SHA512 (./lists/README) = 9cc7a94e40134fbc85a3545e4665efb6156429c49e69008c78cc10bf1ed3cbdf85fccdbd478b290d9dd76eb455909dccec039b64dc319b263029529b16b73d1e

+ 3 - 3
cron/monthly.local

@@ -10,7 +10,7 @@
 #
 # Github: https://framagit.org/BlackLists/BlockZones.git
 #
-# Date: 2017/12/12
+# Date: 2018/03/22
 #
 # Purpose: Get only hosts and local-zone to install it,
 #			with SHA2 and sign project files.
@@ -35,12 +35,12 @@ for file in "${SIGNS[@]}"; do ftp -o "/tmp/$file" "$HOSTURL/$file"; done
 echo "---"
 
 for file in "${FILES[@]}"; do
-	echo "*** Attempt to get file: file"
+	echo "*** Attempt to get file: $file"
 	ftp -o "/tmp/$file" "$HOSTURL/$file"
 	cd /tmp
 	
 	echo "*** Check if file is good!"
-	if signify -Cp BlockZones_GenLists.pub -x BlockZones.sha512.sig | grep "$file"; then
+	if signify -Cp BlockZones_GenLists.pub -x BlockZones.sha512.sig "./$file"; then
 		case "$file" in
 			"hosts") cat /tmp/hosts /etc/hosts | sort | uniq  > /etc/hosts ;;
 			"local-zone") 

+ 5 - 5
inc/commons_functions.ksh

@@ -538,9 +538,9 @@ download() {
 		
 		if [ "${debug}" -eq 1 ]; then 
 			options='-v -w "%{response_code};%{time_total}" '
-			/usr/local/bin/curl -A "Mozilla/5.0 (X11; Debian; Linux; rv:0.0) Gecko/20100101 Firefox/0.0" --compressed ${options} -o "${filename}" "${url}" 2>&1 | tee >> "${bz_log}"
-		
-		elif ! /usr/local/bin/curl -A "Mozilla/5.0 (X11; Debian; Linux; rv:0.0) Gecko/20100101 Firefox/0.0" --compressed ${options} -o "${filename}" "${url}"; then
+			/usr/local/bin/curl -A "${UA}" --compressed ${options} -o "${filename}" "${url}" 2>&1 | tee >> "${bz_log}"
+			
+		elif ! /usr/local/bin/curl -A "${UA}" --compressed ${options} -o "${filename}" "${url}"; then
 			bool=1
 		fi
 
@@ -550,9 +550,9 @@ download() {
 					
 		if [ "${debug}" -eq 1 ]; then 
 			options+="-d "
-			/usr/local/bin/wget --user-agent="Mozilla/5.0 (X11; Debian; Linux; rv:0.0) Gecko/20100101 Firefox/0.0" -c "${options}" -O "${filename}" "${url}" 2>&1 | tee >> "${bz_log}"
+			/usr/local/bin/wget --user-agent="${UA}" -c "${options}" -O "${filename}" "${url}" 2>&1 | tee >> "${bz_log}"
 		
-		elif ! /usr/local/bin/wget --user-agent="Mozilla/5.0 (X11; Debian; Linux; rv:0.0) Gecko/20100101 Firefox/0.0" -c "${options}" -O "${filename}" "${url}"; then
+		elif ! /usr/local/bin/wget --user-agent="${UA}" -c "${options}" -O "${filename}" "${url}"; then
 			bool=1
 		fi
 

+ 2 - 0
inc/vars.ksh

@@ -74,6 +74,8 @@ typeset -i use_wget=0
 ### declare OS variables; DO NOT TOUCH!
 OSN="$(uname -s)"	# Get Operating System Name
 OSR="$(uname -r)"	# Get Operating System Release
+# Declare user agent for curl, wget,...
+UA="Mozilla/5.0 (X11; OpenBSD; rv:58.0) Gecko/20100101 Firefox/58.0" 
 
 ### declare color variables; DO NOT TOUCH!
 if [ $use_color -eq 1 ]; then