Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Latest commit

 

History

History
76 lines (50 loc) · 2.29 KB

theory.md

File metadata and controls

76 lines (50 loc) · 2.29 KB

模拟跑步与活动签到原理

先用 frida 配合此项目仓库的 sake.js 来 hook 证书验证,干掉乐健体育的 ssl pinning,然后进行 packetcapture。通过分析数据报文,向相应站点 getpost 不同的数据进行 forward packet,就可以实现乐健体育的无头模拟。

站点1:Login

为用户提供登录服务

采用post方法,body如下:

body = {"entrance":"1","password":"password","userName":"18888888888"}

返还的response可以获取到很多关键数据:accessTokenorganizationId

站点2:getCurrent

采用get方法,这里返还的response我们只需要semesterId

站点3:getRunningLimit

body要提供getCurrent获取的semesterId,这里返还的response我们只需要limitationsGoalsSexInfoId

站点4:uploadRunningDetails

上传跑步数据

headers中需提供Authorization,采用了Bearer<token>,可以通过获取登录的responseaccesstoken拼接为Bearer accesstoken

采用post方法,body结构为

data ={
       "scoringType": 1,
       "semesterId": semesterId,
       "signPoint": [],
       "startTime": starttime,
       "totalMileage": distance,
       "totalPart": 0.0,
       "type": 跑步类型,
       "uneffectiveReason": "",
       "avePace": random_time / distance * 1000 + random.randint(0,1) / 10,
       "calorie": int(distance * random.uniform(70.0,75.0)),
       "effectiveMileage": distance,
       "effectivePart": 1,
       "endTime": endtime,
       "gpsMileage": distance,
       "limitationsGoalsSexInfoId":limitationsGoalsSexInfoId,
       "paceNumber": distance * (random.randint(50,150)),
       "paceRange": random.randint(5,10),
       "routineLine": [跑步路线]
        }

站点5:getActivityList

获取课外活动列表

采用post方法,这里返还的response我们只需要ActivityId

站点6:signUpActivity

活动报名

可以报名未开始的活动,服务端不验证报名是否开始。

采用post方法,要提供getActivityList获取的ActivityId

站点7:signInActivity

活动签到

进行活动的签到,活动签到不需要位置信息,位置信息仅在客户端验证

采用post方法,要提供getActivityList获取的ActivityId