diff --git a/README.md b/README.md index f76b7a7..5076a4d 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@
- Version Version - _time_stamp_

Let's make an annoyance free better open internet, altogether!

A project by Ador with ❤ -
\ No newline at end of file + diff --git a/module.prop b/module.prop index 243eda7..a0a0310 100644 --- a/module.prop +++ b/module.prop @@ -1,6 +1,6 @@ id=energizedprotection name=Energized Protection -version=1.3.2 -versionCode=200525132 +version=1.3.3 +versionCode=201015133 author=AdroitAdorKhan description=Let's make an annoyance free better open internet, altogether! https://energized.pro diff --git a/system/bin/energized b/system/bin/energized index 57708b6..c410db8 100644 --- a/system/bin/energized +++ b/system/bin/energized @@ -7,9 +7,20 @@ # Script Begins - # ======================================== +# ---------------------------------------- +# Determine the Magisk binary's location +# ---------------------------------------- + +if [ -d "/sbin/.magisk" ]; then + magisk_sbin="/sbin/.magisk" +elif [ -d "$(magisk --path)/.magisk" ]; then + magisk_sbin="$(magisk --path)/.magisk" +fi + # ---------------------------------------- # Load setup files and strings -modPath="/sbin/.magisk/modules/energizedprotection/system/bin" +# ---------------------------------------- +modPath="$magisk_sbin/modules/energizedprotection/system/bin" . $modPath/setupFiles.sh . $modPath/mainMenu.sh . $modPath/strings.sh @@ -54,7 +65,7 @@ N='\e[0m' > /dev/null 2>&1; # No color NC='\033[0m' > /dev/null 2>&1; # printf No color # ---------------------------------------- -hitWeb() { curl -sf http://go.energized.pro/web > /dev/null 2>&1; } +hitWeb() { curl --connect-timeout 5 -sf http://go.energized.pro/web > /dev/null 2>&1; } # ---------------------------------------- # Mount and unmount system @@ -70,7 +81,7 @@ unmountSystem(){ # ---------------------------------------- # Variables # ---------------------------------------- -userAgent='Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' +userAgent='Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0' hostsGZ=$directory/hosts.gz versionInfo=$directory/cache/version.md versionBackup=$directory/cache/version.md.bck diff --git a/system/bin/setupFiles.sh b/system/bin/setupFiles.sh index 1eca972..b2bbcb7 100644 --- a/system/bin/setupFiles.sh +++ b/system/bin/setupFiles.sh @@ -28,6 +28,11 @@ checkMagisk() { busyboxPath=/data/adb/magisk return 1 ;; + '21'[0-9a-zA-Z]*) # Version 21.x + hosts=/data/adb/modules/hosts/system/etc/hosts + busyboxPath=/data/adb/magisk + return 1 + ;; *) echo -e "\n >Version: $printMagiskVersion - not supported.\n > Exiting..." exit