-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.sh
43 lines (40 loc) · 2.65 KB
/
action.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
MODDIR="/data/adb/modules/Re-Malwack"
echo "
╔────────────────────────────────────────╗
│░█▀▄░█▀▀░░░░░█▄█░█▀█░█░░░█░█░█▀█░█▀▀░█░█│
│░█▀▄░█▀▀░▄▄▄░█░█░█▀█░█░░░█▄█░█▀█░█░░░█▀▄│
│░▀░▀░▀▀▀░░░░░▀░▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀│
╚────────────────────────────────────────╝
"
sleep 0.5
echo "- Upgrading Defenses🛡️, this may take a while...."
if ! ping -w 1 google.com; then
echo "- Failed to upgrade. Please check your internet connection."
sleep 2
exit 1
fi
# Download the hosts file and save it as "hosts"
wget --no-check-certificate -O /sdcard/hosts1 https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts &>/dev/null || abort "Failed to download hosts file."
wget --no-check-certificate -O /sdcard/hosts2 https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/pro.plus-compressed.txt &>/dev/null || abort "Failed to download hosts file."
wget --no-check-certificate -O /sdcard/hosts3 https://hblock.molinero.dev/hosts &>/dev/null || abort "Failed to download hosts file."
wget --no-check-certificate -O /sdcard/hosts4 https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardDNS.txt &>/dev/null || abort "Failed to download hosts file."
wget --no-check-certificate -O /sdcard/hosts5 https://raw.githubusercontent.com/r-a-y/mobile-hosts/refs/heads/master/AdguardMobileAds.txt &>/dev/null || abort "Failed to download hosts file."
wget --no-check-certificate -O /sdcard/hosts6 https://raw.githubusercontent.com/r-a-y/mobile-hosts/refs/heads/master/AdguardMobileSpyware.txt &>/dev/null || abort "Failed to download hosts file."
echo "- Preparing New weapons🔫..."
{
for j_cole in /system/etc/hosts /sdcard/hosts1 /sdcard/hosts2 /sdcard/hosts3 /sdcard/hosts4 /sdcard/hosts5 /sdcard/hosts6 ; do
cat $j_cole
echo ""
done
} | sort | uniq > /data/adb/modules/Re-Malwack/system/etc/hosts
# let's see if the file was downloaded or not.
if [ ! -f "/sdcard/hosts6" ]; then
echo "- Looks like there is a problem with some weapons, check your internet connection and try again"
sleep 3
else
string="description=Status: Protection is enabled ✅ | protection update date: $(date)"
sed -i "s/^description=.*/$string/g" $MODDIR/module.prop
echo "- Everthing is fine now, Enjoy 😉"
rm /sdcard/hosts*
sleep 1.5
fi