Created
May 31, 2016 18:47
-
-
Save ArtiomL/587d945d3e163891cb4a14f78bd44d97 to your computer and use it in GitHub Desktop.
dbfin - Unload and Delete the Dropbox OS X Kernel Extension (Project inFinite)
This file contains hidden or 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 | |
# dbfin - Unload and Delete the Dropbox OS X Kernel Extension (Project inFinite) | |
# (CC0) No Rights Reserved | |
# Artiom Lichtenstein | |
# v1.1, 31/05/2016 | |
set -u | |
fun_ECHOLOR() { | |
echo -e "$(tput setaf $2)$(tput bold)$1$(tput sgr0)" | |
} | |
clear; echo | |
# Unload Kext | |
sudo kextstat | grep --color=always "dropbox.kext" | |
if [ $? -eq 0 ]; then | |
echo; fun_ECHOLOR "Dropbox kext found. Unloading..." 1 | |
sudo kextunload -b com.getdropbox.dropbox.kext | |
sudo kextstat | grep "dropbox.kext" | |
if [ $? -eq 1 ]; then | |
fun_ECHOLOR "Success!" 2; echo | |
fi | |
else | |
fun_ECHOLOR "Dropbox kext not found." 2 | |
fi | |
# Delete Kext Folder | |
if [ -d "/Library/Extensions/Dropbox.kext" ]; then | |
fun_ECHOLOR "Deleting /Library/Extensions/Dropbox.kext/..." 1 | |
sudo rm -rf /Library/Extensions/Dropbox.kext/ | |
ls -l /Library/Extensions/ | grep "Dropbox.kext" | |
if [ $? -eq 1 ]; then | |
fun_ECHOLOR "Success!" 2; echo | |
fi | |
else | |
fun_ECHOLOR "/Library/Extensions/Dropbox.kext/ not found." 2 | |
fi | |
# Delete and Kill dbkextd | |
kextd=`pgrep dbkextd` | |
if [ -z "$kextd" ]; then | |
fun_ECHOLOR "dbkextd is not running." 2; echo | |
else | |
fun_ECHOLOR "Killing dbkextd..." 1 | |
echo "dbkextd PID : $kextd" | |
kextp=`ps -o comm= -p $kextd` | |
echo "dbkextd Path : $kextp" | |
sudo rm -i "$kextp" | |
sudo kill "$kextd" | |
pgrep dbkextd | |
if [ $? -eq 1 ]; then | |
fun_ECHOLOR "Success!" 2; echo | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is dbkextd adware? It turned up on my etrecheck as possible adware. I use dropbox though.