cxx_login.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # -*- coding: utf-8 -*-
  2. # Author : Charley
  3. # Python : 3.10.8
  4. # Date : 2026/1/30 11:43
  5. import requests
  6. import json
  7. headers = {
  8. "User-Agent": "okhttp/4.9.0",
  9. "Connection": "Keep-Alive",
  10. "Accept-Encoding": "gzip",
  11. "Authorization": "",
  12. "CXX-APP-API-VERSION": "V2",
  13. "deviceType": "2",
  14. "udid": "20f902c10f6163a19bf137d801731d9f",
  15. # "time": "1769751365500",
  16. "Content-Type": "application/json; charset=UTF-8"
  17. }
  18. def send_code():
  19. url = "https://cxx.cardsvault.net/app/py/login/mobile/code"
  20. data = {
  21. "zone": "86",
  22. "mobile": "19521500850"
  23. }
  24. response = requests.post(url, headers=headers, json=data)
  25. print(response.text)
  26. print(response)
  27. def login():
  28. url = "https://cxx.cardsvault.net/app/py/login/mobile"
  29. data = {
  30. # "code": "123123",
  31. "code": code,
  32. "mobile": "19521500850",
  33. "region": {
  34. "code": "86",
  35. "code_en": "CN",
  36. "country_cn": "中国",
  37. "country_en": "China"
  38. }
  39. }
  40. data = json.dumps(data, separators=(',', ':'))
  41. response = requests.post(url, headers=headers, data=data)
  42. print(response.text)
  43. print(response)
  44. if __name__ == '__main__':
  45. send_code()
  46. code = input("请输入验证码:")
  47. login()