Last active
October 23, 2024 23:18
-
-
Save efernandesng/c739dba20beadb988f2bff492fbe0dce 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 |
Works with Ubuntu / Xubuntu too. Be sure to install macchanger if missing.
Thank you for your script :)
Thanks works like charm, in kali linux debian custom kernel :)
Thanks, it worked for Ubuntu 22.4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works in manjaro. Thanks