01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
def xSsStubEncode( bArr):
m = hashlib.md5()
m.update(bArr.encode('utf-8'))
md = m.digest()
return xSsStubEncodeHex(md,'0123456789ABCDEF')
def xSsStubEncodeHex(bArr,cArr):
length = len(bArr)
cArr2 = [''] * (length << 1)
i2 = 0
for i3 in range(0, length):
i4 = i2 + 1
cArr2[i2] = cArr[unsigned_right_shitf(bArr[i3] & 240, 4)]
i2 = i4 + 1
cArr2[i4] = cArr[bArr[i3] & 15]
return ''.join(cArr2[0:])
2. 向服务器发送获取验证码请求:
sendCodeUrl = "https://api16-normal-c-alisg.tiktokv.com/passport/mobile/send_code/v1/?passport-sdk-version=17&os;_api=22&device;_type=OPPO+R9m&ssmix;=a&manifest;_version_code=2021705050&dpi;=480&uoo;=1®ion=US&app;_name=musical_ly&version;_name=17.5.5&timezone;_offset=28800&ts;=1619101443&ab;_version=17.5.5&residence;=US&pass-route;=1&cpu;_support64=true&pass-region;=1¤t_region=US&storage;_type=0&ac2;=wifi&app;_type=normal∾=wifi&host;_abi=armeabi-v7a&update;_version_code=2021705050&channel;=googleplay&_rticket=1619101443703&device;_platform=android&iid;=6950565326678279942&build;_number=17.5.5&locale;=en&op;_region=US&version;_code=170505&timezone;_name=Asia%2FShanghai&cdid;=a6d131ba-934f-436a-9fe9-ef851658d8fc&openudid;=5607690bd12d555e&sys;_region=US&device;_id=6950565064088782341&app;_language=en&resolution;=1080*1920&os;_version=5.1&language;=zh-Hans&device;_brand=OPPO&aid;=1233"
传的参数是 'mix_mode=1&multi;_login=1&unbind;_exist=35&mobile;=' + encode(mobile) + '&auto;_read=0&account;_sdk_source=app✓_register=0&type;=3731' 所有跟服务器交换的数据都是加密的,加密算法是:
?
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
def encode(str):
try:
bytessstr = bytes(str, encoding = "utf8")
bytess=[]
for c in bytessstr:
bytess.append(c ^ 5)
i3 = len(bytess) * 2
i4 = 0
cArr=['']*100
for bb in bytess:
b = (bb & 255)
i6 = i4 + 1
cArr2 ='0123456789abcdef'
cArr[i4] = cArr2[b >> 4]
i4 = i6 + 1
cArr[i6] = cArr2[b & 15]
return ''.join(cArr[0:i3])
except:
print('the encode string is unrecoganized - ' + str)
3、第二次获取验证码
4、设置密码
5、设置用户名
所有的请求中,都会要求计算 'x-gorgon'和 'x-khronos',关于这个网上有很多解法,就不重复。
TT的核心算法就那么多,掌握上面内容后,可以实现tiktok的完全自主操作。
以上便是小编为大家带来的抖音国际版 网页版的网址,希望对大家有所帮助,更多内容请继续关注金符游戏。