Menu
TeamViewer-id-changer.py
Find Teamviewer Id Machine
#!/usr/bin/env python |
#coding:utf-8 |
importsys |
importos |
importglob |
importplatform |
importre |
importrandom |
importstring |
print('' |
-------------------------------- |
TeamViewer ID Changer for MAC OS |
-------------------------------- |
'') |
ifplatform.system() !='Darwin': |
print('This script can be run only on MAC OS.') |
sys.exit(); |
ifos.geteuid() !=0: |
print('This script must be run form root.') |
sys.exit(); |
ifos.environ.has_key('SUDO_USER'): |
USERNAME=os.environ['SUDO_USER'] |
ifUSERNAME'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 |
deflistdir_fullpath(d): |
return [os.path.join(d, f) forfinos.listdir(d)] |
forfileinlistdir_fullpath(HOMEDIRLIB): |
if'teamviewer'.lower() infile.lower(): |
CONFIGS.append(file) |
ifnotCONFIGS: |
print ('' |
There is no TemViewer configs found. |
Maybe you have deleted it manualy or never run TeamViewer after installation. |
Nothing to delete. |
'') |
# Delete config files |
else: |
print('Configs found:n') |
forfileinCONFIGS: |
printfile |
print('' |
This files will be DELETED permanently. |
All TeamViewer settings will be lost |
'') |
raw_input('Press Enter to continue or CTR+C to abort...') |
forfileinCONFIGS: |
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/TeamViewer_Desktop', |
] |
forfileinTMBINARYES: |
ifos.path.exists(file): |
pass |
else: |
print('File not found: '+file) |
print ('Install TeamViewer correctly') |
sys.exit(); |
# Patch files |
defidpatch(fpath,platf,serial): |
file=open(fpath, 'r+b') |
binary=file.read() |
PlatformPattern='IOPlatformExpert.{6}' |
SerialPattern='IOPlatformSerialNumber%s%s%sUUID' |
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) |
returnTrue |
defrandom_generator(size=8, chars=string.ascii_uppercase+string.digits): |
return'.join(random.choice(chars) for_inrange(size)) |
RANDOMSERIAL=random_generator() |
RANDOMPLATFORM='IOPlatformExpert'+random_generator(6) |
forfileinTMBINARYES: |
try: |
idpatch(file,RANDOMPLATFORM,RANDOMSERIAL) |
except: |
print'Error: can not patch file '+file |
print'Wrong version?' |
sys.exit(); |
print'PlatformDevice: '+RANDOMPLATFORM |
print'PlatformSerial: '+RANDOMSERIAL |
print('' |
ID changed sucessfully. |
!!! Restart computer before using TeamViewer !!!! |
'') |
Dear Julia, I have the same problem, on a cloned mac, I cannot change Teamviewer ID, after reseting teamviewer, including deleting configuration files, and even reseting all the mac. Can you help me? My mac is working with High Sierra OS. Change TeamViewer ID on clone. All TeamViewer sessions are end-to-end encrypted with 256-bit AES for maximum security. How to Download TeamViewer for Mac. TeamViewer download Mac links can be found on the official website of the application. Apart from TeamViewer itself, you have several other TeamViewer remote desktop support and collaboration download options.
commented Jul 21, 2019
How To Find Teamviewer Id
@caobug will it support version 14? |
commented Jul 21, 2019
@hungdev No. try it: https://gist.github.com/zhenhappy/3c808a198715978a38acf0ba44044ea6 |
commented Jul 21, 2019
@caobug , thanks you so much, i will try it. <3 |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment