Last active
April 1, 2021 03:29
-
-
Save vietanhduong/85aa97a9d26585653615df371379aad3 to your computer and use it in GitHub Desktop.
Gate Keeper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RED='\033[0;31m' | |
GRN='\033[0;32m' | |
BLU='\033[0;34m' | |
NC='\033[0m' | |
PS3='Please enter your choice: ' | |
options=("Disable Your GateKeeper" "Enable Your GateKeeper" "Allow Single App To ByPass The GateKeeper" "Quit") | |
select opt in "${options[@]}" | |
do | |
case $opt in | |
"Disable Your GateKeeper") | |
echo "" | |
echo -e "${GRN}You Chose To Disable Your GateKeeper${NC}" | |
echo "" | |
echo -e "${RED}Plaese Inseret Your Password To Procceed${NC}" | |
echo "" | |
sudo spctl --master-disable | |
break | |
;; | |
"Enable Your GateKeeper") | |
echo "" | |
echo -e "${GRN}You Chose To Enable Your GateKeeper${NC}" | |
echo "" | |
echo -e "${RED}Plaese Inseret Your Password To Procceed${NC}" | |
echo "" | |
sudo spctl --master-enable | |
break | |
;; | |
"Allow Single App To ByPass The GateKeeper") | |
echo "" | |
echo -e "${GRN}You Chose To Allow Single App To ByPass The GateKeeper${NC}" | |
echo "" | |
read -e -p "Drag & Drop The App Here Then Hit Return: " FILEPATH | |
echo "" | |
echo -e "${RED}Plaese Inseret Your Password To Procceed${NC}" | |
echo "" | |
sudo xattr -rd com.apple.quarantine "$FILEPATH" | |
break | |
;; | |
"Quit") | |
break | |
;; | |
*) echo "invalid option $REPLY";; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment