Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import platform
import random
import re
import string
import sys
print('''
--------------------------------
TeamViewer 14 ID Changer for MAC OS
Version: 0.2 2019
--------------------------------
''')
if platform.system() != "Darwin":
print("This script can be run only on MAC OS.")
sys.exit()
if os.geteuid() != 0:
print("This script must be run form root.")
sys.exit()
if "SUDO_USER" in os.environ:
USERNAME = os.environ["SUDO_USER"]
if USERNAME == "root":
print("Can not find user name. Run this script via sudo from regular user")
sys.exit()
else:
print("Can not find user name. Run this script via sudo from regular user")
sys.exit()
HOMEDIRLIB = "/Users/" + USERNAME + "/library/preferences/"
GLOBALLIB = "/library/preferences/"
CONFIGS = []
# Find config files
def listdir_fullpath(d):
return [os.path.join(d, f) for f in os.listdir(d)]
for file in listdir_fullpath(HOMEDIRLIB):
if 'teamviewer' in file.lower():
CONFIGS.append(file)
for file in listdir_fullpath(GLOBALLIB):
if 'teamviewer' in file.lower():
CONFIGS.append(file)
if not CONFIGS:
print('''
There is no TemViewer configs found.
Maybe you have deleted it manualy or never run TeamViewer after installation.
Nothing to delete.
''')
else:
# Delete config files
print("Configs found:\n")
for file in CONFIGS: print(file)
print('''
This files will be DELETED permanently.
All TeamViewer settings will be lost
''')
raw_input("Press Enter to continue or CTR+C to abort...")
for file in CONFIGS:
try:
os.remove(file)
except:
print("Cannot delete config files. Permission denied?")
sys.exit()
print("Done.")
# Find binaryes
TMBINARYES = [
'/Applications/TeamViewer.app/Contents/MacOS/TeamViewer',
'/Applications/TeamViewer.app/Contents/MacOS/TeamViewer_Service',
'/Applications/TeamViewer.app/Contents/Helpers/Helper',
'/Applications/TeamViewer.app/Contents/Helpers/TeamViewer_Assignment'
]
for file in TMBINARYES:
if os.path.exists(file):
pass
else:
print("File not found: " + file)
print ("Install TeamViewer correctly")
sys.exit()
# Patch files
def idpatch(fpath, platf, serial):
file = open(fpath, 'r+b')
binary = file.read()
PlatformPattern = "IOPlatformExpert.{6}"
SerialPattern = "IOPlatformSerialNumber%s%s%s"
binary = re.sub(PlatformPattern, platf, binary)
binary = re.sub(SerialPattern % (chr(0), "[0-9a-zA-Z]{8,8}", chr(0)), SerialPattern % (chr(0), serial, chr(0)), binary)
file = open(fpath, 'wb').write(binary)
return True
def random_generator(size=8, chars=string.ascii_uppercase + string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
RANDOMSERIAL = random_generator(8)
RANDOMPLATFORM = "IOPlatformExpert" + random_generator(6)
for file in TMBINARYES:
try:
idpatch(file, RANDOMPLATFORM, RANDOMSERIAL)
except:
print("Error: can not patch file " + file)
sys.exit()
print("PlatformDevice: " + RANDOMPLATFORM)
print("PlatformSerial: " + RANDOMSERIAL)
os.system("sudo codesign -f -s - /Applications/TeamViewer.app/")
print('''
ID changed sucessfully.
!!! Restart computer before using TeamViewer !!!!
''')
@ksuuk
Copy link

ksuuk commented Jul 13, 2020

Seems Teamviewer changed something and/or script misses something, as with v15, after successful ID reset and first Teamviewer session, second session triggers again the commercial use suspected popup and kills session after minute or so.

@juato4
Copy link

juato4 commented Aug 12, 2020

Process: TeamViewer [550]
Path: /Applications/TeamViewer.app/Contents/MacOS/TeamViewer
Identifier: TeamViewer
Version: 15.7.6 (1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: TeamViewer [550]
User ID: 501

Date/Time: 2020-08-11 23:30:05.988 -0300
OS Version: Mac OS X 10.16 (20A5343j)
Report Version: 12
Bridge OS Version: 5.0 (18P50347c)
Anonymous UUID: 13F4761D-998E-8F80-9093-066A61E6F2D1

Time Awake Since Boot: 37 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00000001119258b0
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x1119258b0:
--> __TEXT 10eb2a000-111b2c000 [ 48.0M] r-x/r-x SM=COW /Applications/TeamViewer.app/Contents/MacOS/TeamViewer
__DATA 111b2c000-111ec7000 [ 3692K] rw-/rw- SM=COW /Applications/TeamViewer.app/Contents/MacOS/TeamViewer

Application Specific Information:
dyld: launch, running initializers
/Applications/TeamViewer.app/Contents/MacOS/TeamViewer

@mkloser321
Copy link

mkloser321 commented Sep 22, 2020

Error: can not patch file /Applications/app/Contents/MacOS/TeamViewer

@ytaoo
Copy link

ytaoo commented Nov 16, 2020

Thanks for all the suggestions above. After trying all the things I could I finally figured out how to fix it.
So this is a short summary of what works for me.
This script works on both TeamViewer 14 and 15 (the latest version as of Nov 16 2020 at least), but if you download the older version, you cannot remotely control computers installing new versions, and if you decide to upgrade it, it shifts back to the old ID... Which is why I did everything twice. So yeah.. It's better to upgrade your TV before running this script.

For those of you have the "can not patch file" issues, it is probably because the version of your python is too new. This works with Python 2.7, so anything newer than that might have issues.

In terminal, Run
sudo /usr/bin/python TeamViewer-id-changer.py
And then
sudo codesign -f -s - /Applications/TeamViewer.app/

And restart your TV. Now the ID would change to a set of randomly assigned numbers.
Also don't forget to change the path of TeamViewer_Desktop from Helper to MacOS for TV 15.

Disable SIP or restart the system is not required.

My Mac version:
macOS Mojave 10.14
TV versions I tried and worked:
14.7.48350
15.11.6

@zeshan6896
Copy link

zeshan6896 commented Nov 25, 2020

Like!! I blog frequently and I really thank you for your content. The article has truly peaked my interest.
the post was excellent and good.we made the most of the article,thank you
https://yehrishtakyakehlataserial.com/

@livthreads
Copy link

livthreads commented Jan 1, 2021

14.1 is not working , please give support
Thanking you
https://www.livthreads.com/2020/12/download-gb-whatsapp-apk.html

@jassercastillo11
Copy link

jassercastillo11 commented Jan 9, 2021

It works.

For anyone having the error "Error: can not patch file /Applications/app/Contents/MacOS/TeamViewer" try installing python version 2. from you command line try "brew install python@2" then run the script. Once done then restart and you should have a new ID.

@h3x4d3x4
Copy link

h3x4d3x4 commented Mar 11, 2021

So it's not working on v15 anymore, now it says that /Applications/TeamViewer.app/Contents/Helpers/Helper is missing. Any ideas on how to fix this?


TeamViewer 14 ID Changer for MAC OS
Version: 0.2 2019

There is no TemViewer configs found.
Maybe you have deleted it manualy or never run TeamViewer after installation.
Nothing to delete.

File not found: /Applications/TeamViewer.app/Contents/Helpers/Helper
Install TeamViewer correctly

@vigidefu
Copy link

vigidefu commented Mar 16, 2021

Thank you for this fantastic script. Anyway, I had to change'/Applications/TeamViewer.app/Contents/Helpers/Helper' in line 84 into '/Applications/TeamViewer.app/Contents/Helpers/Restarter'. Now I have a new Teamviewer ID in v.15.15.5

@madmorf
Copy link

madmorf commented Mar 26, 2021

Thank you for this fantastic script. Anyway, I had to change'/Applications/TeamViewer.app/Contents/Helpers/Helper' in line 84 into '/Applications/TeamViewer.app/Contents/Helpers/Restarter'. Now I have a new Teamviewer ID in v.15.15.5

Works fine, thank you!

@hykilpikonna
Copy link

hykilpikonna commented Mar 28, 2021

@hassandevelopers
Copy link

hassandevelopers commented Mar 28, 2021

Thanks for another informative Code. Where else may I get that type of info
written in such an ideal approach? Please 9 anime

@manontop
Copy link

manontop commented Mar 31, 2021

--------------------------------
TeamViewer ID Changer for MAC OS
--------------------------------

Configs found:

/Users/Username/library/preferences/com.teamviewer.teamviewer.preferences.plist
/Users/Username/library/preferences/com.teamviewer.teamviewer.preferences.Machine.plist

This files will be DELETED permanently.
All TeamViewer settings will be lost

Press Enter to continue or CTR+C to abort...
Done.
File not found: /Applications/TeamViewer.app/Contents/Helpers/TeamViewer_Desktop
Install TeamViewer correctly

The teamviwer version I have: Version: 15.16.8 (b0756eefb01)
Installed correctly

@Mawe200
Copy link

Mawe200 commented Apr 8, 2021

Hi, I tried to change ID, but when I start the script, the program crashes. Do you know how to fix?

@jassercastillo11
Copy link

jassercastillo11 commented Apr 8, 2021

@OMEGA-Y
Copy link

OMEGA-Y commented May 14, 2021

https://gist.github.com/hykilpikonna/b00d00abae5ebe33a2f5aaf39e73e54b

Thank you very much!
I solved it.

Just write sudo python2 ./TeamViewer-id-changer-15.16.8.py.

@gulsher7
Copy link

gulsher7 commented Aug 6, 2021

https://gist.github.com/hykilpikonna/b00d00abae5ebe33a2f5aaf39e73e54b

Thank you very much!
I solved it.

Just write sudo python2 ./TeamViewer-id-changer-15.16.8.py.

thanx its work also with latest version 15.20.6.... thanx a lot.

@faizkhan230
Copy link

faizkhan230 commented Aug 20, 2021

Thank you very much!
I solved it.9Anime

@gochi88
Copy link

gochi88 commented Oct 8, 2021

Its a pretty helpful for me. Thanks for the post.
Because i have successfully made this FL Studio

@kickassanimetv
Copy link

kickassanimetv commented Dec 31, 2021

Thanks very Helping Me That's Way I Like That Archive Information made This The Beginning After the End

@jhonpeterson
Copy link

jhonpeterson commented Mar 7, 2022

I am very thanks Full to you I for Motivating Me. That's Way I successfully Complete Call of Duty Mobile MOD APK my ow project.

@Alexakyl
Copy link

Alexakyl commented Mar 16, 2022

This version of FMWhatsApp APK Download provides a lot of features and functions for users.Thank you so much.

@4578David
Copy link

4578David commented Mar 30, 2022

Here you want to play the GTA games so don't worry here we provide the all types of GTA files in our website so visit our websitehttps://gtahut.com/gta-sa-apk/! to download the GTA games.

@nenu3642
Copy link

nenu3642 commented Apr 2, 2022

You can also check project qt mod apk atualizado

@nenu3642
Copy link

nenu3642 commented Apr 2, 2022

@nenu3642
Copy link

nenu3642 commented May 27, 2022

We will also recommend you to experience chamet lucky number game hack.

@Christozap
Copy link

Christozap commented Jun 7, 2022

I will recommend you to have a look at Bird Sort Puzzle Mod.

@doramaxmp4
Copy link

doramaxmp4 commented Jun 16, 2022

Thanks for another informative Code. Where else may I get that type of info
written in such an ideal approach? Please doramas mp4

@1171Matias
Copy link

1171Matias commented Jun 16, 2022

no works teamviewer 15.30.3. help

@DAVIDMAMU
Copy link

DAVIDMAMU commented Jul 5, 2022

gangstar miami vindication apk gtahut.com
is available on our website

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