Skip to content

Instantly share code, notes, and snippets.

@SharpEdgeMarshall
Last active April 7, 2020 01:06
Show Gist options
  • Star 30 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9 to your computer and use it in GitHub Desktop.
Save SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9 to your computer and use it in GitHub Desktop.
Zoom.us Vaccine

Zoom.us Vaccine

To run the script please follow these instructions:

  • Launch Terminal (CMD+Space => digit “Terminal” => press Enter)
  • copy and paste inside the terminal and press enter:
    • curl -sSL https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.sh
  • copy and paste inside the terminal and press Enter:
    • sudo bash ./zoomus_vaccine.sh
  • It will ask you for your mac account password
  • Insert 1 and press Enter
  • Insert 1 if you want to do a dry-run or 2 if you want to run it effectively and press Enter
  • copy and paste inside the terminal and press Enter:
    • rm ./zoomus_vaccine.sh
#!/bin/bash
DRY_RUN=true
RESET='\033[0m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
remove_file() {
echo "Checking ${1} existence..."
if [ -f "$1" ] || [ -d "$1" ]; then
echo -e "${GREEN}Found ${1} ${RESET}"
if [ "$DRY_RUN" = true ]; then
echo -e "${YELLOW}Would run: rm -rf $1 ${RESET}"
else
rm -rf "$1"
retVal=$?
if [ $retVal -ne 0 ]; then
echo -e "${RED}Couldn't remove $1, please do it manually ${RESET}"
fi
fi
fi
}
kill_process() {
echo "Checking for $1 process existence..."
pgrep $1 | while read x; do
echo -e "${GREEN}Found process with PID: $x and Command: $(ps -p $x -o comm=) ${RESET}"
if [ "$DRY_RUN" = true ]; then
echo -e "${YELLOW}Would run: kill -9 $x ${RESET}"
else
kill -9 "$x"
fi
done
}
remove_kext() {
echo "Checking for $1 kext existence..."
if kextstat | grep "$1" ; then
if [ "$DRY_RUN" = true ]; then
echo -e "${YELLOW}Would run: kextunload -b $1 ${RESET}"
else
kextunload -b "$1"
fi
fi
}
inoculate_vaccine () {
if [ "$DRY_RUN" = true ] ; then
echo -e "${YELLOW}Dry-run in progress...${RESET}"
fi
kill_process "zoom.us"
kill_process "ZoomOpener"
remove_file "$HOME/.zoomus"
remove_file "/Applications/zoom.us.app"
remove_file "$HOME/Applications/zoom.us.app"
remove_file "$HOME/Library/Application Support/zoom.us"
remove_file "$HOME/Library/Preferences/us.zoom.xos.plist"
remove_file "$HOME/Library/Preferences/ZoomChat.plist"
remove_file "$HOME/Library/Saved Application State/us.zoom.xos.savedState"
remove_file "$HOME/Library/Cookies/us.zoom.xos.binarycookies"
remove_file "$HOME/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin"
remove_file "$HOME/Library/Caches/us.zoom.xos"
remove_file "$HOME/Library/Logs/zoom.us"
remove_file "$HOME/Library/Logs/zoominstall.log"
remove_kext "zoom.us.ZoomAudioDevice"
remove_file "/System/Library/Extensions/ZoomAudioDevice.kext"
if [ "$DRY_RUN" = false ] ; then
echo -e "${GREEN}Your are now vaccinated for Zoom.us${RESET}"
fi
}
if [[ $UID != 0 ]]; then
echo "Please run this script with sudo:"
echo "sudo $0 $*"
exit 1
fi
echo "This script will vaccinate you for Zoom.us removing it completely from your system, are you sure you want to run it?"
select yn in "Yes" "No"; do
case $yn in
Yes ) break;;
No ) exit;;
esac
done
echo "Do you want to do a dry-run?"
select yn in "Yes" "No"; do
case $yn in
Yes ) DRY_RUN=true; break;;
No ) DRY_RUN=false; break;;
esac
done
inoculate_vaccine
@welbsantos
Copy link

Excellent tool ! Congratulations !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment