Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@pste

This comment has been minimized.

Copy link

commented Jul 9, 2019

Great job!
Instead of blindly kill a local ws @ 19421 I'd check if zoom locally exists; something like:
if [ -e $HOME/.zoomus ] killserver
Probability of a port overlap are looow, but we all know that s**t happens :D

@SharpEdgeMarshall

This comment has been minimized.

Copy link
Owner Author

commented Jul 9, 2019

Great job!
Instead of blindly kill a local ws @ 19421 I'd check if zoom locally exists; something like:
if [ -e $HOME/.zoomus ] killserver
Probability of a port overlap are looow, but we all know that s**t happens :D

I rewrote it now should be safer!

@ryanscherler

This comment has been minimized.

Copy link

commented Jul 9, 2019

Thanks for this! One issue I get is:

# Found /Users/.../Library/Cookies/us.zoom.xos.binarycookies 
rm: /Users/.../Library/Cookies/us.zoom.xos.binarycookies: Operation not permitted
Couldn't remove /Users/.../Library/Cookies/us.zoom.xos.binarycookies, please do it manually 

When I try and run it manually I get:

override rw-r--r--  [user]/staff for /Users/.../Library/Cookies/us.zoom.xos.binarycookies? 

Not sure why I cant remove that file?

@SharpEdgeMarshall

This comment has been minimized.

Copy link
Owner Author

commented Jul 9, 2019

@ryanscherler Yes, that's caused by the System Integrity Protection of MacOS
You should give Full Disk Access to your terminal:
http://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/
OR
Delete it manually from Finder (That's why I printed that message)

There are no other workarounds.

@ryanscherler

This comment has been minimized.

Copy link

commented Jul 9, 2019

Ah yes - this is a new laptop and didn't have that set yet. Thanks for the heads up!

@mikesteele

This comment has been minimized.

Copy link

commented Jul 10, 2019

Thanks for this!

@welbsantos

This comment has been minimized.

Copy link

commented Jul 14, 2019

Excellent tool ! Congratulations !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.