TeamViewer 版本v13.2.26558 修改ID

TeamViewer 使用頻繁後會被斷定爲商業用途,不可用。此軟件的帳號和設備mac地址綁定。php

修改TeamViewer ID後能夠從新開始使用。下述方法能夠成功修改TeamViewer ID。python

 

Window版本(TeamViewer-v13.2.26558.exe下載地址)git

1.關閉TeamViewer。網絡

2.開始 > 運行,輸入 %appdata%,刪除TeamViewer的文件夾。app

3.開始 > 運行,輸入 regedit;dom

刪除 HKEY_LOCAL_MACHINE\SOFTWARE\ 之下的 TeamViewer;ui

刪除 HKEY_CURRENT_USER\SOFTWARE\ 之下的 TeamViewer;this

4.開始 > 運行,輸入 cmd,輸入 ipconfig /all ,查看本地網卡的MAC地址。spa

4.控制面板 > 網絡和Internet> 網絡和共享中心 > 更改適配器設置 > 本地鏈接/無線網卡;命令行

單擊右鍵 > 屬性 > Microsoft 網絡客戶端 > 配置 > 高級;

在數值欄輸入一個和上文相近的MAC地址或隨意12位數字字符串,點肯定保存。

 

重啓電腦,你會發現你的 TeamViewer ID 已改變。成功!

MacOS版本(TeamViewer-v13.2.26558.dmg下載地址

1.關閉TeamViewer。

2.把下面的代碼寫入到一個文件。並執行。

 

PHP:

#!/usr/bin/env php
<?php


$hone_dir_lib = '/Users/phpdragon/library/preferences/'; del_libary_files($hone_dir_lib); $platformEpert = random_generator(6); $platformSerialNumber = random_generator(8); $replace_str = sprintf('IOPlatformExpert%s%sIOPlatformSerialNumber%s%s%sUUID',$platformEpert,chr(0),chr(0),$platformSerialNumber,chr(0)); $nul_str = '\x00'; //空字符 $pattern = sprintf('/IOPlatformExpert[0-9a-zA-Z]{6,6}\x00IOPlatformSerialNumber%s[0-9a-zA-Z]{8,8}%sUUID/',$nul_str,$nul_str); $files = [ '/Applications/TeamViewer.app/Contents/MacOS/TeamViewer', '/Applications/TeamViewer.app/Contents/MacOS/TeamViewer_Service', '/Applications/TeamViewer.app/Contents/Helpers/TeamViewer_Desktop', ]; foreach($files as $file){ idpatch($file,$pattern,$replace_str); } echo 'IOPlatformExpert: '.$platformEpert."\r\n"; echo 'IOPlatformSerialNumber: '.$platformSerialNumber."\r\n"; echo " ID changed sucessfully. !!! Restart computer before using TeamViewer !!!! "; function idpatch($file,$pattern,$replace_str){ if(!is_file($file)){ return; } $content = file_get_contents($file); $content = preg_replace($pattern,$replace_str, $content); file_put_contents($file,$content); } function del_libary_files($dir){ if(!is_dir($dir)) return false; $handle = opendir($dir); $files = []; if($handle){ while(($fl = readdir($handle)) !== false){ $file = $dir.$fl; if(is_file($file) && (strpos(strtolower($file),'teamviewer') !== false)){ echo "delete ".$file ."\r\n"; unlink($file); } } } return $files; } function random_generator($length = 8){ $pattern = '1A2B3C4D5E6F7G8H9IJKLOMNOPQRSTUVWXYZ'; for($i=0;$i<$length;$i++){ $key .= $pattern{mt_rand(0,35)}; //生成php隨機數  } return $key; }

命令行執行: sudo php TeamViewer-change-id.php

 

 

Python:

#!/usr/bin/env python 

#coding:utf-8
import sys
import os
import glob import platform import re import random import string print(''' -------------------------------- TeamViewer ID Changer for MAC OS -------------------------------- ''') 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 os.environ.has_key('SUDO_USER'): 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'.lower() 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. ''') # Delete config files else: 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/TeamViewer_Desktop', ] 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%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) return True def random_generator(size=8, chars=string.ascii_uppercase + string.digits): return ''.join(random.choice(chars) for _ in range(size)) RANDOMSERIAL = random_generator() RANDOMPLATFORM = "IOPlatformExpert" + random_generator(6) for file in TMBINARYES: 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 !!!! ''')

命令行執行: sudo python TeamViewer-change-id.py

相關文章
相關標籤/搜索