Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys, os, mechanize, cookielib
- from time import sleep
- def clear():
- if os.name in ['nt', 'win32', 'dos']:
- os.system('cls')
- else:
- os.system('clear')
- def generateAccount():
- if (len(sys.argv) == 4):
- if (len(sys.argv[2]) < 6):
- print "[-] Password needs to be minimum 6 characters in Length."
- print "[!] Quitting."
- sys.exit()
- clear()
- print "=====================================\n\n"
- print "Spotify Account Generator Version 1.0\n\n"
- print " Developed by Irenicus \n"
- print "=====================================\n\n"
- sleep(2)
- print "[+] Trying to setup a new account...\n"
- # Setting up Account details
- usr = sys.argv[1]
- passwd = sys.argv[2]
- email = sys.argv[3]
- proxySite = 'http://www.daveproxy.co.uk/'
- url = "http://www.spotify.com/uk/get-spotify/go/open/"
- postalCode = "LN94DF"
- # Setting cookies to maintain sessions, Yum Yum ^^
- cj = cookielib.LWPCookieJar()
- br = mechanize.Browser()
- br.set_cookiejar(cj)
- # Instructing robots to follow orders & do our dirty work
- br.set_handle_robots(False)
- # Pretending to be fake & gay
- 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')]
- # Shows live headers, good for testing
- # br.set_debug_http(True)
- # No more comments from this point.
- # Reason: no patience
- html = br.open(proxySite)
- br.select_form(nr=0)
- br.form['u'] = url
- reponse1 = br.submit()
- br.select_form(nr=1)
- br.form['username'] = usr
- br.form['password_new'] = passwd
- br.form['password_check'] = passwd
- br.form['email'] = email
- br.form['postal_code'] = postalCode
- br.form.find_control('gender').get('male').selected = True
- br.form.find_control('birth_day').get('31').selected = True
- br.form.find_control('birth_month').get('12').selected = True
- br.form.find_control('birth_year').get('1990').selected = True
- br.form.set_single(True, 'iagree')
- br.form.set_single(False, 'sendemail')
- br.form.set_single(False, 'thirdpartyemail')
- br.form.set_single(False, 'sendsms')
- response2 = br.submit()
- print "[+] Account Created!\n"
- print "[*] Check Manually to validate account."
- else:
- print "[-] Failed to generate account: Insufficient Arguments"
- print "[*] USAGE: %s [username] [password] [email-address]" % (sys.argv[0])
- if __name__ == '__main__':
- generateAccount()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement