Files
emby-proxy-helper/shell/mac.sh
2026-04-05 18:07:31 +03:00

129 lines
3.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
clear
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
CYAN=$(tput setaf 6)
RESET=$(tput sgr0)
echo "${CYAN}"
cat << "EOF"
-----------------------------------------------------------
| |
| Emby Unlocker for Lifetime Premiere |
| https://github.com/arg0WAK |
| |
-----------------------------------------------------------
EOF
echo "${RESET}"
echo "${YELLOW}[ℹ]${RESET} Checking for administrative privileges..."
if [ "$EUID" -ne 0 ]; then
echo "${RED}[✖]${RESET} This script must be run with sudo!"
exit 1
else
echo "${GREEN}[✔]${RESET} Root privileges confirmed."
fi
HOST_FILE="/etc/hosts"
IP_ARG0=$(ping -c 1 arg0.dev | sed -nE 's/^PING[^(]+\(([^)]+)\).*/\1/p')
if [ -z "$IP_ARG0" ]; then
echo "${RED}[✖]${RESET} Failed to resolve fake validation server."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Adding entry to $HOST_FILE..."
sleep 2
PROXY="$IP_ARG0 mb3admin.com"
if ! grep -Fxq "$PROXY" "$HOST_FILE"; then
echo "$PROXY" >> "$HOST_FILE"
echo "${GREEN}[✔]${RESET} Entry successfully added: $PROXY"
else
echo "${CYAN}[✔]${RESET} Entry already exists, skipping."
fi
echo "${YELLOW}[ℹ]${RESET} Downloading certificate..."
CERT_FILE="mb3admin.crt"
CERT_URL="https://arg0.dev/emby/$CERT_FILE"
TEMP_CERT="/tmp/$CERT_FILE"
if curl -L "$CERT_URL" -o "$TEMP_CERT"; then
echo "${GREEN}[✔]${RESET} Certificate downloaded: $TEMP_CERT"
else
echo "${RED}[✖]${RESET} Failed to download certificate."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Installing certificate to system keychain..."
sleep 2
security add-trusted-cert -d -r trustRoot \
-k /Library/Keychains/System.keychain \
"$TEMP_CERT"
if [ $? -eq 0 ]; then
echo "${GREEN}[✔]${RESET} Certificate successfully added to system keychain."
else
echo "${RED}[✖]${RESET} Failed to install certificate."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Cleaning up temporary files..."
sleep 2
rm -f "$TEMP_CERT"
echo "${GREEN}[✔]${RESET} Temporary certificate file removed."
echo "${YELLOW}[ℹ]${RESET} Flushing DNS cache..."
sleep 2
dscacheutil -flushcache
killall -HUP mDNSResponder 2>/dev/null
echo "${YELLOW}[ℹ]${RESET} Testing network connectivity..."
sleep 5
IP_MB3ADMIN=$(ping -c 1 mb3admin.com | sed -nE 's/^PING[^(]+\(([^)]+)\).*/\1/p')
if [ "$IP_MB3ADMIN" == "$IP_ARG0" ]; then
echo "${GREEN}[✔]${RESET} Both domains match the same IP address: $IP_MB3ADMIN"
else
echo "${RED}[✖]${RESET} Domains do not match."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Checking SSL..."
sleep 2
echo | openssl s_client -connect mb3admin.com:443 -servername mb3admin.com 2>/dev/null | openssl x509 -noout > /dev/null
if [ $? -eq 0 ]; then
echo "${GREEN}[✔]${RESET} SSL certificate is valid."
else
echo "${RED}[✖]${RESET} SSL certificate is invalid."
exit 1
fi
clear
echo "${CYAN}"
cat << "EOF"
---------------------------------------------------------------
| |
| Emby Premiere is now fully unlocked. |
| You can use any license key and enjoy all features! |
| |
---------------------------------------------------------------
EOF
echo "${RESET}"
echo "${YELLOW}[ℹ]${RESET} If you want to support my work, star the repo!"
echo "${CYAN}[ℹ]${RESET} telegram: @arg0WAK"
sleep 3
open https://github.com/arg0WAK