摩拜协议分析

摩拜解锁过程,是先发送一个解锁命令,然后不断的去询问解锁进度

解锁命令

POST /api/v2/rentmgr/unlockBike.do HTTP/1.1
version: 7.3.1
versionCode: 1841
platform: 1
mainSource: 4002
subSource: 4
os: 23
androidId: MMB29M
lang: zh
country: 0
deviceresolution: 1080X1920
X-B3-TraceId: db84d376c926f49d
citycode: 021
mobileNo: 13120985875
accesstoken: 5cf10571cb0b1a298399aff159699fe2-0
uuid: cb6c723152d0c29dab7e1f0aa7f5b12e
longitude: 121.407373
latitude: 31.368188
time: 1527474553393
eption: c0bda
utctime: 1527474553
Content-Type: application/x-www-form-urlencoded
Content-Length: 408
Host: app.mobike.com
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/3.10.0
btEnabled=1&sign=bd3377b5f2dfe4ff65125ac63b1f0c1b&client_id=android&longitude=121.407373×tamp=1527474553388&userid=1823201787529216135281&bycode=1&latitude=31.368188&bikecode=1111111111&citycode=021&channel=1&epdata=CZFZFT2olswFC5wuqXvlnFQrDWisiQGLpj18O8ZKNRlL7pHw0wmy7KtyyJdhqxh2/s8+q4hqckNj
K3PxBwsVnEj9VU8MRmJHNX1il91QdnJqVbhOGD4rzRDRoJuaYiktZFnzDazPNtEKoEbTvOFgQNCO
YeiIkGL68LTDVYPh288=

返回结果

{
  "bikeHardwareType": -1,
  "bikeId": "1111111111",
  "biketype": 0,
  "code": 108,
  "endTime": 0,
  "h5Url": "",
  "lastTimes": 0,
  "mOBIKE_M_BASE_URL": "",
  "message": "该车编号不存在哦,请确认编号正确并再次尝试",
  "monthCardDay": 0,
  "orderId": "",
  "parkBike": false,
  "price": "",
  "redPacketBike": false,
  "redpacketUrl": "",
  "ridingEvaluationSwitch": false,
  "shortRiding": 0,
  "showCostPage": false,
  "showCostPageTime": 0,
  "startShowTotpTime": 0,
  "startTime": 0,
  "timesection": "",
  "totpType": false,
  "tryRidingDay": 0,
  "tryRidingUser": false,
  "unlockChannel": 1,
  "userId": "1823201787529216135281"
}


你可能感兴趣的:(软件作品)