个人技术分享

  • 首页
  • 关于
  • 主题
  • 影视解析
  • 音乐
  • 归档
  • 留言
个人技术分享
  • 首页
  • 关于
  • 主题
  • 影视解析
  • 音乐
  • 归档
  • 留言

个人技术分享

刷新页面会随机【个人信息流样式】

hanhanjun888@163.com

个人技术分享

x-sign 算法
def get_sign(Pm):
    #这里是加密需要的字段
    arg0 = Pm['appKey']
    arg1 = Pm['utdid'] + "&"
    arg1 = arg1 + Pm['uid']+ "&"
    arg1 = arg1 + Pm['reqbiz-ext']+ "&"
    arg1 = arg1 + Pm['appKey']+ "&"
    arg1 = arg1 + Pm['datamd5']+ "&"
    arg1 = arg1 + Pm['t']+ "&"
    arg1 = arg1 + Pm['api']+ "&"
    arg1 = arg1 + Pm['v']+ "&"
    arg1 = arg1 + Pm['sid']+ "&"
    arg1 = arg1 + Pm['ttid']+ "&"
    arg1 = arg1 + Pm['deviceId']+ "&"
    arg1 = arg1 + Pm['lat']+ "&"
    arg1 = arg1 + Pm['lng']+ "&"
    arg1 = arg1 + Pm['ext']+ "&"
    arg1 = arg1 + Pm['x-features']+ "&"
    arg1 = arg1 + Pm['routerId']+ "&"
    arg1 = arg1 + Pm['placeId']+ "&"
    arg1 = arg1 + Pm['openBiz']+ "&"
    arg1 = arg1 + Pm['miniAppKey']+ "&"
    arg1 = arg1 + Pm['reqAppKey']+ "&"
    arg1 = arg1 + Pm['act']+ "&"
    arg1 = arg1 + Pm['openBizData']
    arg2 = Pm['api']
    arg3 = "pageName="+ Pm['pageName'] + "&pageId=" + Pm['pageId']
    sign = xianyu.get70102(arg0,arg1,arg2,arg3)
    ret = eval(str(sign))
    Pm.update(ret)
    return ret
#在这里定义自己的字段
def build_Pm(api,v,data):
    Pm = {}
    Pm['x-app-ver'] = "7.1.60"
    Pm['utdid'] = "YIJLR2Y/7fgDAMOPtQCGzfRz"
    Pm['uid'] = ""#登录后才有
    Pm['reqbiz-ext'] = ""
    Pm['appKey'] = "21407387"
    Pm['datamd5'] = hashlib.md5(data.encode("utf-8")).hexdigest() if data != "" else ""
    Pm['t'] = str(int(time.time()))
    Pm['api'] = api
    Pm['v'] = v
    Pm['sid'] = ""#登录后才有
    Pm['ttid'] = "36137321407327@fleamarket_android_7.1.60"
    Pm['deviceId'] = "AlKfW_V2tm3mJ3AYHwUErKPkq41dPGN2vXWlskFJDb2s"
    Pm['lat'] = "0"
    Pm['lng'] = "0"
    Pm['ext'] = "openappkey=DEFAULT_AUTH"
    Pm['x-features'] = "27"
    Pm['routerId'] = ""
    Pm['placeId'] = ""
    Pm['openBiz'] = ""
    Pm['miniAppKey'] = ""
    Pm['reqAppKey'] = ""
    Pm['act'] = ""
    Pm['openBizData'] = ""
    Pm['pageName'] = ""
    Pm['pageId'] = ""
    Pm['x-sgext'] = ""
    Pm['x-umt'] = ""
    Pm['x-mini-wua'] = ""
    Pm['x-sign'] = ""
    Pm['x-pv'] = "6.3"
    Pm['x-bx-version'] = "6.5.24"
    Pm['User-Agent'] = "MTOPSDK/3.1.1.7+(Android;7.1.2;HUAWEI;VOG-AL00)"
    Pm['Cookie'] = ""
    Pm['f-refer'] = "mtop"
    sign = get_sign(Pm)
    return Pm
 
def xianyu_post(url,api,v,data,_headers = {}):
    Pm = build_Pm(api,v,data)
    headers = {
        "x-extdata": Pm['ext'],
        "x-features": Pm['x-features'],
        "x-sgext": quote_plus(Pm['x-sgext']),
        "umid": quote_plus(Pm['x-umt']),
        "User-Agent": quote_plus(Pm['User-Agent']),
        "x-ttid": quote_plus(Pm['ttid']),
        "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
        "a-orange-q":"appKey="+Pm['appKey']+"&appVersion="+Pm['x-app-ver']+"&clientAppIndexVersion=1120210930160801265&clientVersionIndexVersion=0",
        "x-appkey": Pm['appKey'],
        "x-mini-wua": quote_plus(Pm['x-mini-wua']),
        "x-nq" : "WIFI",
        "x-nettype": "WIFI",
        "first_open" : "0",
        "x-c-traceid": Pm['ttid'] + Pm['t'] +"332000317813",
        "x-app-conf-v": "0",
        "x-pv": Pm['x-pv'],
        "x-bx-version": Pm['x-bx-version'],
        "x-t": Pm['t'],
        "x-app-ver": Pm['x-app-ver'],
        "f-refer": Pm['f-refer'],
        "Cookie" : Pm['Cookie'],
        "x-sid": Pm['sid'],
        "x-utdid": Pm['utdid'],
        "x-umt": quote_plus(Pm['x-umt']),
        "x-devid": Pm['deviceId'],
        "x-sign": quote_plus(Pm['x-sign']),
        "x-location": quote_plus("{0},{1}".format(Pm['lng'], Pm['lat'])),
        "x-page-name": Pm['pageName'],
        "x-page-url": quote_plus(Pm['pageId']),
        "x-uid": Pm['uid']
    }
    headers.update(_headers)
    url = url + "/" + api + "/" + v + "/"
    postdata = "data=" + quote_plus(data)
    ret = requests.post(url, data=postdata, headers=headers)
    return ret
url = "http://acs.m.taobao.com/gw"
api = "mtop.taobao.idle.local.flow.plat.container"
v = "1.0"
data = '{"productId":"2","unionKey":"online_local_concept_container"}'
ret =  xianyu_post(url,api,v,data)
print(ret.text)
2年前 2,212浏览 1
赞 评论
  • 1个赞
评论(0)

暂无数据

取消回复

个人技术分享

刷新页面会随机【个人信息流样式】

  • Mac 下 打开微信小程序目录2年前
  • PHP 转到 Go1年前
  • “免费” 开通腾讯混元-元器 机器人 TOKEN真的有“一亿次”2年前
  • 解决移动设备上的所有浏览器顶部都有地址栏,导致高度问题1年前
  • TVBOX 接口整理地址2年前

免费开源主题:smarty_hankin v2.0重构版

wordpress版本:6.0+

PHP版本:7.0~8.0

gitee源码仓库地址:点击打开

github源码仓库地址:点击打开

最新源码地址:待更新

加QQ群入口:1018842166

WP开源主题 smarty_hankin

hankin 扫码关注公众号

最近评论


    Warning: Trying to access array offset on value of type null in /www/wwwroot/hankin.cn/wp-content/themes/hankin/inc/widget/widget-comments.php on line 32

    Warning: Trying to access array offset on value of type null in /www/wwwroot/hankin.cn/wp-content/themes/hankin/inc/widget/widget-comments.php on line 32
  • […] 平台主题名称介绍价格地址WPpix综合性最好的主题298DemoWPpink完成度高朋友圈499DemoWPhankin还在完善的主题noDemoTypicefox完成度高FreeDemoTypListen完成度高FreeDemoTypNabo小鸟风格FreeDemoTypzyyo三栏自适应现代时尚FreeDemoTypFlip仿pix主题noDemoTyppengyou单栏主题noDemoTypfriends单栏主题noDemoTyplan tyLAN程序TY版本39DemoHalopixpix授权移植主题169DemoZblogpyq单栏朋友圈noDemoZblogMoments轻社交朋友圈298DemoHugomoments单栏朋友圈noDemo程序lan程序有朋友圈外观99DemoDiscuz! 朋友圈式手机版Discuz!的纯手机版朋友圈98Demo […] 抠脚大汉的摆烂人生 发布于1年前

  • Warning: Trying to access array offset on value of type null in /www/wwwroot/hankin.cn/wp-content/themes/hankin/inc/widget/widget-comments.php on line 32

    Warning: Trying to access array offset on value of type null in /www/wwwroot/hankin.cn/wp-content/themes/hankin/inc/widget/widget-comments.php on line 32
  • […] Demo […] YanZi-朋友圈 发布于1年前
  • 请问一下,同款主题在哪里授权、下载?   发布于1年前
  • 真不错👍 唤( . )醒 发布于2年前
  • 确实挺不错的 断舍离 发布于2年前

扫码加QQ群:1018842166

微信打赏

支付宝打赏

友情链接: coder gzh DIYgod kam mango pix主题 wordpress 大学 wp2 主题喵 主题猫 元气秋刀鱼 创造狮 吾柯 大海看看 守望轩-宁静雅致的小轩馆 腾讯设计导航 若志奕鑫 风信子博客

hankin Powered by WordPress 浙ICP备20002401号-1