Advertisement
Guest User

spotif

a guest
Nov 13th, 2018
5,665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. import requests
  2. import string
  3. import random
  4. f = open('Accounts.txt', 'a')
  5. def getRandomString(length): #Letters and numbers
  6. pool=string.ascii_lowercase+string.digits
  7. return "".join(random.choice(pool) for i in range(length))
  8.  
  9. def getRandomText(length): #Chars only
  10. return "".join(random.choice(string.ascii_lowercase) for i in range(length))
  11.  
  12. print("==Lets hope for the best tee hee==\n")
  13.  
  14. print("Setting up..")
  15. user = getRandomText(8)
  16. passw = getRandomString(8)
  17. email = user+"@"+getRandomText(5)+".com"
  18. payload = {"creation_point": "client_mobile",
  19. "gender": "male",
  20. "postal_code": 1,
  21. "birth_year": 1995,
  22. "username": user,
  23. "iagree": 1,
  24. "birth_month": 4,
  25. "password_repeat": passw,
  26. "password": passw,
  27. "invitecode": "",
  28. "key": "142b583129b2df829de3656f9eb484e6",
  29. "platform": "Android-ARM",
  30. "email": email,
  31. "birth_day": 9,
  32. "creation_flow": "client_mobile"}
  33. headers={"Accept-Encoding": "gzip",
  34. "Accept-Language": "it-IT;q=1, en-US;q=0.5",
  35. "Connection": "Keep-Alive",
  36. "Content-Type": "application/x-www-form-urlencoded",
  37. "Host": "www.spotify.com",
  38. "User-Agent": "Spotify/8.4.38 Android/25 (GT-P7500)"}
  39.  
  40. print("Sending request..")
  41. r = requests.post('https://www.spotify.com/int/xhr/json/sign-up/', headers=headers, data=payload)
  42.  
  43. if r.status_code==200:
  44. if r.json()['status']==1:
  45. print("Account created successfully!")
  46. print("User: "+user)
  47. print("Password: "+passw)
  48. print("Email: "+email)
  49. f.write("Email: "+email+'\n')
  50. f.write("Password: "+passw+'\n')
  51. f.write(","+'\n')
  52. else:
  53. print("Could not create the account.")
  54. print("Response error:")
  55. print(r.json()['errors'])
  56. else:
  57. print("Could not load the page, some errors occurred. Response code:", r.status_code)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement