robert832

Untitled

Mar 26th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. import requests
  2. import json
  3. import uuid
  4. import os
  5. import time
  6.  
  7.  
  8. def ctoauth():
  9. if os.path.isfile('key.dat'):
  10. current_hwid = uuid.getnode()
  11. f = open('key.dat', 'r')
  12. auth = f.read()
  13. data = {
  14. "a": "auth",
  15. "k": str(auth),
  16. "hwid": str(current_hwid)
  17. }
  18. checkauth = requests.post('https://cracked.to/auth.php', data=data)
  19. with checkauth:
  20. json1 = json.loads(checkauth.text)
  21. if '"auth":true' in checkauth.text:
  22. print("Welcome back, " + json1["username"])
  23. time.sleep(2)
  24. else:
  25. print(checkauth.json()['error'].title())
  26. input()
  27. os._exit(0)
  28. else:
  29. authkey = str(input('Insert Cracked.to Auth Key: '))
  30. current_hwid = uuid.getnode()
  31.  
  32. data = {
  33. "a": "auth",
  34. "k": str(authkey),
  35. "hwid": str(current_hwid)
  36. }
  37.  
  38. checkauth = requests.post('https://cracked.to/auth.php', data=data)
  39.  
  40. with checkauth:
  41. json2 = json.loads(checkauth.text)
  42. if '"auth":true' in checkauth.text:
  43. f = open('key.dat', 'w')
  44. f.write(authkey)
  45. f.close()
  46. print("Welcome: " + json2["username"])
  47. time.sleep(2)
  48. else:
  49. print(checkauth.json()['error'].title())
  50. input()
  51. os._exit(0)
  52. ctoauth()
Advertisement
Add Comment
Please, Sign In to add comment