某鱼APP x-sign x-mini-wua x-sgext 分析成果

 百度到的算法都是HOOK模拟器  感觉不是很稳定所以自己研究

对分析算法有兴趣的朋友私我,欢迎定制其他APP算法

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)

 输出结果

{
    "api": "mtop.taobao.idle.local.flow.plat.container",
    "data": {
        "data": {
            "ext": {},
            "pages": [{
                "footer": {},
                "header": {},
                "sections": [{
                    "components": [{
                        "data": {
                            "item": {
                                "0": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.top.0",
                                            "arg1": "new_icon1",
                                            "page": "Page_xyLocalTab"
                                        },
                                        "eventId": "2001",
                                        "arg1": "new_icon1"
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "titleColor": "#333333",
                                        "subTitle": "持证服务更靠谱",
                                        "bgColor": "#f2fcf8",
                                        "arg1": "new_icon1",
                                        "title": "找人帮忙",
                                        "subColor": "#24B15B",
                                        "tips": [{
                                            "first": "帮上门遛狗",
                                            "second": "帮收纳衣柜"
                                        }, {
                                            "first": "帮鉴定球鞋",
                                            "second": "帮模型涂装"
                                        }, {
                                            "first": "帮洗车验车",
                                            "second": "帮管道维修"
                                        }]
                                    },
                                    "targetUrl": "https://fleamarket.taobao.com/wow/z/activity/v1/local_bbw_test-copy?wh_biz=tm"
                                },
                                "1": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.top.1",
                                            "arg1": "new_icon2",
                                            "page": "Page_xyLocalTab"
                                        },
                                        "eventId": "2001",
                                        "arg1": "new_icon2"
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "img": "https://gw.alicdn.com/imgextra/i3/O1CN014V1TQb1GuOns9ILqM_!!6000000000682-2-tps-276-180.png",
                                        "titleColor": "#333333",
                                        "subTitle": "薪资担保岗位真",
                                        "bgColor": "#FCFBF2",
                                        "arg1": "new_icon2",
                                        "title": "找份兼职",
                                        "subColor": "#FE9705"
                                    },
                                    "targetUrl": "https://fleamarket.taobao.com/wow/z/activity/v1/xianshijz?wh_biz=tm"
                                },
                                "2": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.top.2",
                                            "arg1": "new_icon3",
                                            "page": "Page_xyLocalTab"
                                        },
                                        "eventId": "2001",
                                        "arg1": "new_icon3"
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "img": "https://gw.alicdn.com/imgextra/i4/O1CN01EMh13w1lP1lY37kAS_!!6000000004810-2-tps-270-150.png",
                                        "titleColor": "#333333",
                                        "subTitle": "免费上门更省心",
                                        "bgColor": "#FCF6F5",
                                        "arg1": "new_icon3",
                                        "title": "附近回收",
                                        "subColor": "#FF6236",
                                        "desc": "已有39.4万人用过"
                                    },
                                    "targetUrl": "https://fleamarket.taobao.com/wow/z/activity/v1/smhs-new?wh_biz=tm&detailPageUrl=1&channel=idle&subChannel=tczj"
                                }
                            },
                            "template": {
                                "name": "xianyu_home_fish_home_city_top_card",
                                "url": "https://ossgw.alicdn.com/rapid-oss-bucket/1627268932833/fish_home_city_top_card.zip",
                                "version": "13"
                            }
                        },
                        "ext": {
                            "columnType": "one",
                            "marginBottom": "8",
                            "marginTop": "4"
                        },
                        "key": "idle_local_home_top",
                        "loadMoreEvent": {},
                        "render": "DX",
                        "startEvent": {},
                        "virtual": "false"
                    }, {
                        "data": {
                            "item": {
                                "0": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.rent.0",
                                            "page": "Page_xyLocalTab"
                                        }
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "subTitleColor": "#059aff",
                                        "img": "https://gw.alicdn.com/imgextra/i1/O1CN01uLpMkj1O8mYSm5xqR_!!6000000001661-2-tps-342-300.png",
                                        "backgroundColor": "#f2faff",
                                        "visible": "true",
                                        "subTitle": "真实房东 免中介费",
                                        "titleColor": "#333333",
                                        "arg1": "new_icon4-Search",
                                        "title": "好房出租"
                                    }
                                },
                                "1": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.rent.1",
                                            "arg1": "new_icon4-1",
                                            "page": "Page_xyLocalTab"
                                        },
                                        "arg1": "new_icon4-1"
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "img": "https://gw.alicdn.com/imgextra/i4/O1CN01HVtSK21ym0dx379k4_!!6000000006620-2-tps-84-84.png",
                                        "titleColor": "#000000",
                                        "arg1": "new_icon4-1",
                                        "title": "整租"
                                    },
                                    "targetUrl": "https://market.m.taobao.com/app/idleFish-F2e/local-rent/pages/SearchList/index.html?head=整租&rentNav=1&rentFrom=1&propValueStr=rentCat:wholeRent&version=623&city=北京&province=北京"
                                },
                                "2": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.rent.2",
                                            "arg1": "new_icon4-2",
                                            "page": "Page_xyLocalTab"
                                        },
                                        "arg1": "new_icon4-2"
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "img": "https://gw.alicdn.com/imgextra/i1/O1CN01KCSycz1wf1Mufg7eG_!!6000000006334-2-tps-84-84.png",
                                        "titleColor": "#000000",
                                        "arg1": "new_icon4-2",
                                        "title": "合租"
                                    },
                                    "targetUrl": "https://market.m.taobao.com/app/idleFish-F2e/local-rent/pages/SearchList/index.html?head=合租&rentNav=2&rentFrom=2&propValueStr=rentCat:shareRent&version=623&city=北京&province=北京"
                                },
                                "3": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.rent.3",
                                            "arg1": "new_icon4-3",
                                            "page": "Page_xyLocalTab"
                                        },
                                        "arg1": "new_icon4-3"
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "img": "https://gw.alicdn.com/imgextra/i1/O1CN01OzGpM91d0HRWNF8Sp_!!6000000003673-2-tps-84-84.png",
                                        "titleColor": "#000000",
                                        "arg1": "new_icon4-3",
                                        "title": "千元房"
                                    },
                                    "targetUrl": "https://market.m.taobao.com/app/idleFish-F2e/local-rent/pages/SearchList/index.html?head=千元房&rentNav=10&version=623&city=北京&province=北京"
                                },
                                "4": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.rent.4",
                                            "arg1": "new_icon4-4",
                                            "page": "Page_xyLocalTab"
                                        },
                                        "arg1": "new_icon4-4"
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "img": "https://gw.alicdn.com/imgextra/i2/O1CN01meVdJS1lcJFZveeMO_!!6000000004839-2-tps-84-84.png",
                                        "titleColor": "#000000",
                                        "arg1": "new_icon4-4",
                                        "title": "全部"
                                    },
                                    "targetUrl": "https://market.m.taobao.com/app/idleFish-F2e/idlefish-renting/home?wh_weex=true&city=北京&province=北京"
                                },
                                "5": {
                                    "clickParam": {
                                        "args": {
                                            "spm": "a2170.14016119.rent.5",
                                            "page": "Page_xyLocalTab"
                                        }
                                    },
                                    "valid": "true",
                                    "exContent": {
                                        "backImg": "https://gw.alicdn.com/imgextra/i1/O1CN01tN6KOc26QUyAVShgk_!!6000000007656-2-tps-36-18.png",
                                        "backgroundColor": "#FFFFFF",
                                        "unit": "",
                                        "unitColor": "#808080",
                                        "locationColor": "#333333",
                                        "countColor": "#059aff",
                                        "moreImg": "https://gw.alicdn.com/imgextra/i2/O1CN01cuvWaj20XvhRopVys_!!6000000006860-2-tps-18-30.png",
                                        "count": "",
                                        "location": "浏览优质房源"
                                    },
                                    "targetUrl": "https://market.m.taobao.com/app/idleFish-F2e/local-rent/pages/SearchList/index.html?city=北京&province=北京&sortType=distanceAsc"
                                }
                            },
                            "template": {
                                "name": "fish_home_city_rent_card_d3",
                                "url": "https://ossgw.alicdn.com/rapid-oss-bucket/1625209980772/fish_home_city_rent_card_d3.zip",
                                "version": "19"
                            }
                        },
                        "ext": {
                            "columnType": "one"
                        },
                        "key": "xianyu_home_fish_home_city_rent_card_d3",
                        "loadMoreEvent": {},
                        "startEvent": {},
                        "virtual": "false"
                    }, {
                        "data": {
                            "item": {
                                "0": {
                                    "valid": "true",
                                    "exContent": {
                                        "items": [{
                                            "clickParam": {
                                                "args": {
                                                    "spm": "a2170.14016119.bottom.0",
                                                    "page": "Page_xyLocalTab"
                                                },
                                                "eventId": "2001",
                                                "arg1": "new_smallicon1"
                                            },
                                            "img": "https://gw.alicdn.com/imgextra/i1/O1CN01s4oEuE28YrQl2pg03_!!6000000007945-2-tps-204-162.png",
                                            "title": "闲鱼小站",
                                            "targetUrl": "https://m.duanqu.com?_ariver_appid=3000000004025644"
                                        }, {
                                            "clickParam": {
                                                "args": {
                                                    "spm": "a2170.14016119.bottom.1",
                                                    "page": "Page_xyLocalTab"
                                                },
                                                "eventId": "2001",
                                                "arg1": "new_smallicon3"
                                            },
                                            "img": "https://gw.alicdn.com/imgextra/i4/O1CN01CQnJ3Q1y1kdqdRhG1_!!6000000006519-2-tps-204-162.png",
                                            "title": "低价卡券",
                                            "targetUrl": "https://market.m.taobao.com/app/idleFish-F2e/mini-local-coupons/hometicket.html"
                                        }, {
                                            "clickParam": {
                                                "args": {
                                                    "spm": "a2170.14016119.bottom.2",
                                                    "page": "Page_xyLocalTab"
                                                },
                                                "eventId": "2001",
                                                "arg1": "new_smallicon11"
                                            },
                                            "img": "https://gw.alicdn.com/imgextra/i3/O1CN01MzOHdi1DiXisNaiL8_!!6000000000250-2-tps-204-162.png",
                                            "title": "民宿短租",
                                            "targetUrl": "https://market.m.taobao.com/app/trip/rx-bnb/pages/home?titleBarHidden=2&disableNav=YES"
                                        }, {
                                            "clickParam": {
                                                "args": {
                                                    "spm": "a2170.14016119.bottom.3",
                                                    "page": "Page_xyLocalTab"
                                                },
                                                "eventId": "2001",
                                                "arg1": "new_smallicon5"
                                            },
                                            "img": "https://gw.alicdn.com/imgextra/i1/O1CN01Un1xNi1NRjKF7jpFn_!!6000000001567-2-tps-204-162.png",
                                            "title": "同城跑腿",
                                            "targetUrl": "https://pt.ele.me/paotui/h5/index.html#/index-page/pick-and-send?VNK=43303d64&separate=1&pageData=%7B%22entrance%22%3A%22xianyuguide%22%7D"
                                        }, {
                                            "clickParam": {
                                                "args": {
                                                    "spm": "a2170.14016119.bottom.4",
                                                    "page": "Page_xyLocalTab"
                                                },
                                                "eventId": "2001",
                                                "arg1": "new_smallicon4"
                                            },
                                            "img": "https://gw.alicdn.com/imgextra/i1/O1CN01YwKPcu28y3DHAiFIl_!!6000000008000-2-tps-204-162.png",
                                            "title": "演出票务",
                                            "targetUrl": "https://aliticket.taobao.com/wow/z/alit/aquaman/xianyutongcheng?wh_biz=tm"
                                        }]
                                    }
                                }
                            },
                            "template": {
                                "name": "fish_home_city_category_card",
                                "url": "https://ossgw.alicdn.com/rapid-oss-bucket/1625183102316/fish_home_city_category_card.zip",
                                "version": "6"
                            }
                        },
                        "ext": {
                            "columnType": "one",
                            "marginBottom": "8"
                        },
                        "key": "fish_home_region_category_card",
                        "loadMoreEvent": {},
                        "render": "DX",
                        "startEvent": {},
                        "virtual": "false"
                    }],
                    "ext": {},
                    "key": "idle_local_icon_banner",
                    "layout": "list",
                    "loadMoreEvent": {
                        "key": "idle_local_icon_banner",
                        "subType": "loadMore"
                    },
                    "needRefreshWhenComplete": "false",
                    "startEvent": {
                        "data": {
                            "ver": "1.0",
                            "api": "mtop.taobao.idle.local.flow.plat.section",
                            "params": {
                                "productId": "2",
                                "shuntId": "14",
                                "unionKey": "idle_local_icon_banner"
                            }
                        },
                        "key": "idle_local_icon_banner",
                        "subType": "reload",
                        "type": "remote"
                    },
                    "virtual": "false"
                }, {
                    "components": [],
                    "ext": {},
                    "key": "idle_local_tab",
                    "layout": "list",
                    "loadMoreEvent": {
                        "key": "idle_local_tab",
                        "subType": "loadMore"
                    },
                    "needRefreshWhenComplete": "false",
                    "slotKey": "section_instance_slot_key",
                    "startEvent": {
                        "data": {
                            "ver": "1.0",
                            "api": "mtop.taobao.idle.local.config",
                            "params": {
                                "productId": "2",
                                "shuntId": "15",
                                "unionKey": "idle_local_tab"
                            }
                        },
                        "key": "idle_local_tab",
                        "subType": "initEvent",
                        "type": "remote"
                    },
                    "virtual": "false"
                }, {
                    "components": [],
                    "ext": {},
                    "key": "idle_local_feeds",
                    "loadMoreEvent": {
                        "key": "idle_local_feeds",
                        "subType": "loadMore"
                    },
                    "needRefreshWhenComplete": "false",
                    "slotKey": "section_instance_feeds_slot_key",
                    "startEvent": {
                        "key": "idle_local_feeds",
                        "subType": "reload"
                    },
                    "virtual": "true"
                }],
                "tabInfo": {
                    "tabId": "xianyu_home_follow",
                    "title": "同城"
             
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值