TeamViewer 版本v13.2.26558 修改ID
TeamViewer 使用频繁后会被判定为商业用途,不可用。此软件的账号和设备mac地址绑定。
修改TeamViewer ID后可以重新开始使用。下述方法可以成功修改TeamViewer ID。
Window版本(TeamViewer-v13.2.26558.exe下载地址)
1.关闭TeamViewer。
2.开始 > 运行,输入 %appdata%,删除TeamViewer的文件夹。
3.开始 > 运行,输入 regedit;
删除 HKEY_LOCAL_MACHINE\SOFTWARE\ 之下的 TeamViewer;
删除 HKEY_CURRENT_USER\SOFTWARE\ 之下的 TeamViewer;
4.开始 > 运行,输入 cmd,输入 ipconfig /all ,查看本地网卡的MAC地址。
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