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 !!!!
''')
@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

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

Thank you for yet another helpful Code. Where else can I find this kind of information written in such a perfect manner? I hope you like my post Waka Mod Apk

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

I hope you like my post  jerkmat mod apk is free app

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

@Modapkme
Copy link

Modapkme commented Aug 29, 2022

I hope you like my post Download the XCall Mod Apk and get access to a whole bunch of features that will improve your gaming experience.

@KissAnim
Copy link

KissAnim commented Sep 8, 2022

gogoanime is an anime streaming site where you can watch anime online in HD quality for free with English subtitles or dubbing.

@jhumar1
Copy link

jhumar1 commented Sep 15, 2022

Good one. can you make one for remove YouTube ads from browser...
https://www.abrasivesshots.com/blog/5+steel-shots

@hassandevelopers
Copy link

hassandevelopers commented Oct 9, 2022

Thank you regarding another informative document. Where else may I get that kind of info outlined in an excellent approach Hoichoi MOD APK Please speak with me.

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