演唱会门票的DM 最新x-sign、x-sgext、x-mini-wua、x-umt的加密算法

最近大家都跑去听演唱会了,好多人都说抢不到票,好奇的我于是跑去看看damai的x-sign加密

首先抓下包
演唱会门票的DM 最新x-sign、x-sgext、x-mini-wua、x-umt的加密算法_第1张图片
看了眼请求头,还是x-sign这些老朋友,于是把以前的rpc直接拿出来,发现还是可以用的,就是入参可能需要按照实际修改下。
然后再走个接口请求下,看看【比看演出】:

#!/usr/bin/python3
# -*- coding: UTF-8 -*-
# python 3.8
import time
from urllib import parse
import requests
from spider_damai.rpc_utils_dm import start_hook

headers = {
    ##
    ##
    ##
    "x-sgext": "JA008XpCtnH%2BLcWY5sVeYvEFwQbCBdICwQbHF8AH0hfAAskHyQPABccA0gTDV5AEwQTABJMGxgeVUpUXwRfGF8kA0gTBBMYXwhfAF8AXwBfAF8AXwBfAF8EXwRfBF8EXwRfBF8EXwRfBF9JR0heQUsIBwQTSBMEEwQTSBNIGlVXSBNIXyRfBF8EXtneZVtIE",

    "x-sign": "azG34N002xAAIcoyfy7OjV%2BLBukq4coxwyyf54l0hnRp6ComhQV58juJKhlK1FKLuxYylJUK%2FdTZUw49mgCOVhgGGKHKIcoxyiHKMc",
"appKey=23781390&appVersion=8.5.4&clientAppIndexVersion=1120230220162303685&clientVersionIndexVersion=0",
    "x-mini-wua": "a9gRRoZADK9dEH6q71Hvdb%2BCYD639Dt8CfQ00Oh6wCpAYb2iM%2F7X1Rl6OJMoP7Pwu8J8B4%2F%2B5RTBAuFoERdJw0DTqh%2FQUUqkxDutsAotTMRB%2F2PViiPUvqbXhL6C0cd7V9a9xbWVjhvpx3M5YX31FLofHah8C4dZyUIDRHcFLPPFTctGzDU3tZJPR",
    "x-utdid": "ZF3VkApcC98DAPWUJMLr9lZD",
    "x-t": "1683871215",

}
cookies = {
    "x5secdata": ""
}

params = {
    'data': ''
}
data = params.get('data')
tamp = str(int(time.time()))
url = "https://acs.m.taobao.com/gw/mtop.damai.mec.aristotle.get/3.0/?data={}".format(parse.quote_plus(data))

_map1 = {
    'data': data,
    'deviceId': "",
    'sid': '',
    'uid': '',
    'x-features': '',
    'appKey': '',
    'api': '',
    'utdid': parse.unquote(headers.get('x-utdid')),
    'ttid': parse.unquote(headers.get('x-ttid')),
    't': tamp,
    'v': ''
}
_map2 = {
    'pageId': "",
    'pageName': ""
}

x_sign, x_mini_wua, x_sgext, x_umt = start_hook(map1=_map1, map2=_map2)
headers['x-sgext'] = parse.quote_plus(x_sgext)
headers['x-sign'] = parse.quote_plus(x_sign)
headers['x-mini-wua'] = parse.quote_plus(x_mini_wua)
headers['x-umt'] = parse.quote_plus(x_umt)
headers['x-t'] = tamp
response = requests.get(url, headers=headers, cookies=cookies)
print(response.text)
print(response)

看看请求结果

大功告成!

你可能感兴趣的:(python,java,windows)