当前位置:   article > 正文

微信小程序之纷玩岛_纷玩岛脚本

纷玩岛脚本

本教程仅限于学术探讨,也没有专门针对某个网站而编写,禁止用于非法用途、商业活动、恶意滥用技术等,否则后果自负。观看则同意此约定。如有侵权,请告知删除,谢谢!

 懒得写逆向过程了自己看源码,主导一个懒字,贯彻到底
关注...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. # !/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # @Time : 2023/6/7 12:52
  4. # @Author : Jay
  5. # @File : fwd.py
  6. # @Description :
  7. import time
  8. import string
  9. import random
  10. import requests
  11. from loguru import logger
  12. from urllib3 import disable_warnings
  13. disable_warnings()
  14. headers = {
  15. "Authorization": "",
  16. "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/6939",
  17. }
  18. strDigit = string.digits + string.ascii_letters
  19. def getIdf():
  20. e, i, u = "1234567890", 255, 0
  21. idf = str(int(time.time() * 1000)) + "-" + str(int(1000000 * (random.random() + 1)))
  22. for a in range(len(idf)):
  23. i ^= ord(idf[a])
  24. u += ord(idf[a])
  25. return idf + str(ord(e[(i + 256) % 10])) + str(ord(e[u % 10]))
  26. # 接口验证定义的BlackBox
  27. def getBlackBox():
  28. profile_url = "https://fp.tongdun.net/wxapp/profile.json?partner=fenwandao"
  29. params = {
  30. # 置空的字段为AES加密,由于key、iv没有传入后端所以无法校验参数,从而置空
  31. "partner": "fenwandao",
  32. "app_name": "fenwandao_wx",
  33. "t": "",
  34. "id": "",
  35. "v": "GeVeM4b8MRzyErm9LPSNmp==", # 后端校验平台的参数固定
  36. "a": "",
  37. "b": "",
  38. "c": "",
  39. "d": "",
  40. "e": "",
  41. "f": "",
  42. "i": "",
  43. "idf": getIdf(),
  44. "g": "",
  45. "h": "" # hash128加盐整个params
  46. }
  47. tokenId = requests.post(url=profile_url, headers=headers, data=params, verify=False).json()['result']['tokenId']
  48. return box(tokenId)
  49. def box(td):
  50. td = list(td)
  51. td[0] = random.choice(strDigit)
  52. td.insert(4, random.choice(strDigit))
  53. td.insert(15, random.choice(strDigit))
  54. td.insert(-1, random.choice(strDigit))
  55. return "".join(td) + ":0"
  56. def random_str(s=4):
  57. return "".join([random.choice(strDigit) for _ in range(s)])
  58. # 自定义的BlackBox
  59. def getCustomBlackBox():
  60. return box(f"{random_str()}{int(time.time())}{random_str(9)}")
  61. def run():
  62. data = {
  63. "contactName": "屌毛",
  64. "contactPhone": "10086",
  65. "deliveryType": 1,
  66. "combineTicketVos": [],
  67. "ordinaryTicketVos": [{
  68. "seatPlanId": 1352,
  69. "seatPlanName": "VIP票320元",
  70. "seatPlanPrice": 320,
  71. "seatPlanQuantity": 1,
  72. "seatInfoVo": None,
  73. "frequentContactsId": 523566
  74. }],
  75. "payment": 320,
  76. "totalPrice": 320,
  77. "performId": 389,
  78. "projectId": "266",
  79. "privilegeCodeList": [],
  80. "blackBox": getCustomBlackBox() # 因blackBox是同盾随机的字符串id,可以自定义类似的随机字符串跳过请求,使提交订单更快
  81. }
  82. start_ts = time.time()
  83. res = requests.post("https://api.livelab.com.cn/order/app/center/v3/create", headers=headers, verify=False, json=data).json()
  84. orderNo = res.get("data", False)
  85. if orderNo:
  86. logger.success(f"`订单号 {orderNo} -> 【广州】萧秉治Xiao Bing Chih Project X Live Tour 巡回演唱会`下单成功!")
  87. res = requests.post(f"https://api.livelab.com.cn/performance/app/order/cancel/order?orderNo={orderNo}",
  88. json={"custom": {"auth": True, "loading": False, "ignoreStatus": False}}, headers=headers, verify=False).json()
  89. logger.success(f"订单取消状态 --> {res.get('msg', '取消失败.')}")
  90. else:
  91. logger.warning(res)
  92. logger.success(f"订单提交耗时: {round(time.time() - start_ts, 2)} 秒")
  93. if __name__ == '__main__':
  94. run()

 

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号