-
-
Save k4mrul/48fe2c923f5af84450adb7079f3554bf to your computer and use it in GitHub Desktop.
Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
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 | |
## | |
# Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13 | |
# | |
# Tested on Arch linux | |
## | |
CONFIG_FILE=/opt/teamviewer/config/global.conf | |
# Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
if [ ! -s $CONFIG_FILE ]; then | |
echo "$CONFIG_FILE not found! Teamviewer is installed?" 1>&2 | |
exit 1 | |
fi | |
systemctl stop teamviewerd | |
lastMACUsed=`cat $CONFIG_FILE | grep LastMACUsed | cut -b 23- | tr -d '"'` | |
for iface in `ls /sys/class/net`; do | |
read mac </sys/class/net/$iface/address | |
mac=`echo $mac | tr -d ':'` | |
if [ "${lastMACUsed#*$mac}" != "$lastMACUsed" ]; then | |
echo "$iface -> $mac" | |
#ip link set $iface down | |
macchanger $iface -r | |
#ip link set $iface up | |
fi | |
done | |
rm -f "$CONFIG_FILE" | |
systemctl start teamviewerd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment