kawan_login.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # -*- coding: utf-8 -*-
  2. # Author : Charley
  3. # Python : 3.8.10
  4. # Date : 2025/4/18 18:14
  5. import requests
  6. headers = {
  7. "User-Agent": "Dart/3.6 (dart:io)",
  8. "Accept-Encoding": "gzip",
  9. "authorization": "Bearer null",
  10. "content-type": "application/json",
  11. "timestamp": "1744971243352",
  12. "signature": "854fcb756f17db85efa9958158e6c161",
  13. "app-version": "1.0.12",
  14. "content-language": "zh_CN",
  15. "nonce": "da899d80-1c3d-11f0-bcea-87a35c752929",
  16. "isencrypt": "false"
  17. }
  18. def get_sms_code():
  19. url = "https://app.cardplayd.com/app/resource/sms/appLoginCode"
  20. params = {
  21. "phonenumber": "19521500850"
  22. }
  23. response = requests.get(url, headers=headers, params=params)
  24. print(response.text)
  25. print(response)
  26. def api_login():
  27. headers = {
  28. "User-Agent": "Dart/3.6 (dart:io)",
  29. "Accept-Encoding": "gzip",
  30. "Content-Type": "application/json",
  31. "authorization": "Bearer null",
  32. "timestamp": "1744971271189",
  33. "content-language": "zh_CN",
  34. "encrypt-key": "qYkyi9s1Okl8NdPjsXceRnoNFpIvKrOspuzT33cD00wor9wb7kVeVkagz4NyGo2WX9CA1ypbfPfDwbHy5U3N6Q==",
  35. "app-version": "1.0.12",
  36. "signature": "f55c3e5919a3a92f65d51ff4779889cd",
  37. "isencrypt": "true",
  38. "nonce": "eb213450-1c3d-11f0-bcea-87a35c752929"
  39. }
  40. url = "https://app.cardplayd.com/app/auth/app/login"
  41. data = 'C8mLzEQaHL4vP3bMRLXeWUbRUzSkQSic7k+gO3wlE37XnWOC4tdLJ0JyeO24/B9SD4/FaxOlhdzv4wYJ5yynzFG4i9mlM6idDQ4wEIK572RSsYFxNs3foXgUDYbsgnMAZnqyzpruHRrkpRRykBMW9kxBOxJXMPRpgvIBQL/ZzA28dcW1uf1erijmNGC8+Isd'.encode(
  42. 'unicode_escape')
  43. response = requests.post(url, headers=headers, data=data)
  44. print(response.text)
  45. print(response)