Skip to content

Instantly share code, notes, and snippets.

@k4mrul
Forked from efernandesng/reset_teamviewer.sh
Created May 13, 2021 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k4mrul/48fe2c923f5af84450adb7079f3554bf to your computer and use it in GitHub Desktop.
Save k4mrul/48fe2c923f5af84450adb7079f3554bf to your computer and use it in GitHub Desktop.
Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#!/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