你看一下吧, 用python写的, 就是简单的md5加密, 注释文心写的
# 设置请求的URL
url = 'https://mxsa.mxbc.net/api/v1/h5/marketing/secretword/confirm'
# 构建请求参数
param = f'marketingId={marketingId}&round={round}&s=2&secretword={secretword}c274bac6493544b89d9c4f9d8d542b84'
# 对参数进行MD5编码
m = md5Encode(param.encode("utf8"))
# 获取MD5编码的十六进制字符串
sign = m.hexdigest()
# 构建请求体
body = {
# 口令
"secretword": secretword,
# 签名
"sign": sign,
# 营xiaoID
"marketingId": marketingId,
# 轮次
"round": round,
# 固定值
"s": 2
}
# 发送POST请求并获取响应
res = requests.post(url, headers=headers, json=body)
# 打印响应结果
print(f'任务开始: {res.text}')
|