Skip to content

Instantly share code, notes, and snippets.

@max-potapov
Last active June 18, 2022 11:58
Show Gist options
  • Save max-potapov/1996a7242320c7b97f486d877fdb3825 to your computer and use it in GitHub Desktop.
Save max-potapov/1996a7242320c7b97f486d877fdb3825 to your computer and use it in GitHub Desktop.
#!/bin/sh
pushd /Applications/Microsoft\ Defender.app/Contents/MacOS/
sudo chmod -x *
pushd /Library/Managed\ Preferences/
# TODO: update to new location
sudo su root -c "plutil -replace antivirusEngine.passiveMode -bool true com.microsoft.wdav.plist"
sudo su root -c "plutil -replace antivirusEngine.enableRealTimeProtection -bool false com.microsoft.wdav.plist"
pushd $(whoami)
# TODO: update to new location
sudo su root -c "plutil -replace antivirusEngine.passiveMode -bool true com.microsoft.wdav.plist"
sudo su root -c "plutil -replace antivirusEngine.enableRealTimeProtection -bool false com.microsoft.wdav.plist"
popd
popd
popd
pushd /Library/LaunchDaemons
sudo launchctl unload -w com.microsoft.fresno.plist
popd
pushd /Library/LaunchAgents
launchctl unload -w com.microsoft.wdav.tray.plist
popd
sudo pkill -9 'wdav*'
sudo killall -9 epsext
# iBoss disabling
cd /Library/LaunchDaemons
sudo launchctl unload -w com.iboss.networkchange.plist
sudo launchctl unload -w com.iboss.gen4agent.plist
echo 'Feel free to disable proxy in Wi-Fi settings'
@tyutyunkov
Copy link

replace 18 line with
sudo pkill -9 'wdav*'

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