web和app其实都一样,主要是针对于设备进行风控,web设备叫webdid;
webdid注册出来,过了ks滑块激活,测试了主页,评论等接口都可以跑,平均也就2s注册一个,如果开并发那就更快了;
不过一切的前提在于有好的代理,我一般都是用的秒切的隧道代理。
app的可以关注: app除了设备,就是sig3是so层的算法,粗略看了下,有sha256,aes,crc效验等等;
当然sig3,难度相比其他还是较低,unidbg和纯算也是层出不穷;
https://codeooo.blog.csdn.net/article/details/131848058
import hashlib
import requestsfrom urllib.parse import unquotedef get_NStokensig(sig, token_client_salt):string1 = (sig + token_client_salt).encode()NStokensig = hashlib.sha256(string1).hexdigest()return NStokensigdef get_map_from_string(str):"""把url的参数转为dict:param str::return:"""map = {}str_list = str.split('&')for data in str_list:item = data.split('=')map[item[0]] = item[1]return mapdef get_url_str(map1, map2, salt='382700b563f4'):"""把url参数和formdata参数排序,加盐,返回字符串:param map1:url参数dict:param map2:formdata参数dict:param salt:盐,默认382700b563f4,也有可能会变动:return:"""map = dict(map1, **map2)aps = sorted(map.items(), key=lambda d: d[0])url_str = ""for item in aps:if item[0] == 'sig' or item[0] == '__NS_sig3' or item[0] == '__NStokensig':continuestr = item[0] + '=' + unquote(item[1])url_str += strreturn url_str + saltdef data_md5(content):m = hashlib.md5()m.update(content)return m.hexdigest()def create_sig(query_str, post_arr):url_arr = get_map_from_string(query_str)str = get_url_str(url_arr, post_arr)return data_md5(str.encode())def create_sig3(url_request_path, sig):sig3_str = url_request_path + sigprint("sig3_str", sig3_str)def sig3_start(url, data):url_data = url.split("?")[1]url_request_path = url.split("?")[0].split(".com")[1]sig = create_sig(url_data, data)sig3_str = url_request_path + sigprint(sig3_str)return sig, sig3_strdef get_tokening(sig, token_client_salt="4c8133a397e27490675db4ec55ce0066"):# TODO 登陆NStokensig = get_NStokensig(sig, token_client_salt)print("NStokensig: ", NStokensig)return NStokensig