Advertisement
AbdulMuttaqin

Spotify Account Generator

Jan 14th, 2019
38,853
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.49 KB | None | 0 0
  1. import sys, os, mechanize, cookielib
  2. from time import sleep
  3.  
  4. def clear():
  5.         if os.name in ['nt', 'win32', 'dos']:
  6.             os.system('cls')
  7.         else:
  8.             os.system('clear')
  9.  
  10. def generateAccount():
  11.    
  12.     if (len(sys.argv) == 4):
  13.        
  14.         if (len(sys.argv[2]) < 6):
  15.             print "[-] Password needs to be minimum 6 characters in Length."
  16.             print "[!] Quitting."
  17.             sys.exit()
  18.            
  19.         clear()
  20.         print "=====================================\n\n"
  21.         print "Spotify Account Generator Version 1.0\n\n"
  22.         print "         Developed by Irenicus       \n"
  23.         print "=====================================\n\n"
  24.        
  25.         sleep(2)
  26.        
  27.         print "[+] Trying to setup a new account...\n"
  28.         # Setting up Account details
  29.         usr = sys.argv[1]
  30.         passwd = sys.argv[2]
  31.         email = sys.argv[3]
  32.         proxySite = 'http://www.daveproxy.co.uk/'
  33.         url = "http://www.spotify.com/uk/get-spotify/go/open/"
  34.         postalCode = "LN94DF"
  35.        
  36.         # Setting cookies to maintain sessions, Yum Yum ^^
  37.         cj = cookielib.LWPCookieJar()
  38.         br = mechanize.Browser()
  39.         br.set_cookiejar(cj)
  40.        
  41.         # Instructing robots to follow orders & do our dirty work
  42.         br.set_handle_robots(False)
  43.        
  44.         # Pretending to be fake & gay
  45.         br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]
  46.        
  47.         # Shows live headers, good for testing
  48.         # br.set_debug_http(True)
  49.        
  50.         # No more comments from this point.
  51.         # Reason: no patience
  52.         html = br.open(proxySite)
  53.        
  54.         br.select_form(nr=0)
  55.        
  56.         br.form['u'] = url
  57.        
  58.         reponse1 = br.submit()
  59.            
  60.         br.select_form(nr=1)
  61.        
  62.         br.form['username'] = usr
  63.         br.form['password_new'] = passwd
  64.         br.form['password_check'] = passwd
  65.         br.form['email'] = email
  66.         br.form['postal_code'] = postalCode
  67.         br.form.find_control('gender').get('male').selected = True
  68.         br.form.find_control('birth_day').get('31').selected = True
  69.         br.form.find_control('birth_month').get('12').selected = True
  70.         br.form.find_control('birth_year').get('1990').selected = True
  71.         br.form.set_single(True, 'iagree')
  72.         br.form.set_single(False, 'sendemail')
  73.         br.form.set_single(False, 'thirdpartyemail')
  74.         br.form.set_single(False, 'sendsms')
  75.        
  76.         response2 = br.submit()
  77.        
  78.         print "[+] Account Created!\n"
  79.         print "[*] Check Manually to validate account."
  80.     else:
  81.         print "[-] Failed to generate account: Insufficient Arguments"
  82.         print "[*] USAGE: %s [username] [password] [email-address]" % (sys.argv[0])
  83.    
  84. if __name__ == '__main__':
  85.     generateAccount()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement