MCPcopy Create free account
hub / github.com/LumingMelody/JS_reverse / get_sign

Function get_sign

sdx.py:46–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44
45
46def get_sign():
47 ms_timestamp = str(time.time() * 1000)
48 userdata_cookie = "{}" # replace with actual cookie string
49 userdata = json.loads(userdata_cookie)
50 hexUnid = userdata.get("hexUnid", "")
51 random_number = str(random.randint(0, 999999)).zfill(6)
52 t = hexUnid + random_number
53 # print(t)
54
55 # 使用 hashlib 计算 MD5 哈希值
56 m_str = ms_timestamp + "_" + t + "_sdxxqbrolkjwrgoiuyhasdglksjlaghnow32429asnnhg"
57 # m_str = "1680673332300_242969_sdxxqbrolkjwrgoiuyhasdglksjlaghnow32429asnnhg"
58 md5_hash = hashlib.md5(m_str.encode())
59
60 # 将结果转换为十六进制字符串
61 md5_str = md5_hash.hexdigest()
62
63 # print("MD5 哈希值:", md5_str)
64 return ms_timestamp, t, md5_str
65
66
67def get_list(page_num):

Callers 2

get_detailFunction · 0.90
get_listFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected