Skip to content

Commit

Permalink
better printing / socks4 socks5 proxy support / created retries threa…
Browse files Browse the repository at this point in the history
…d count
  • Loading branch information
onemanbuilds committed Oct 30, 2020
1 parent c9373fb commit b370d7a
Showing 1 changed file with 77 additions and 48 deletions.
125 changes: 77 additions & 48 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,67 @@
import requests
import json
import os
import sys
import random
import string
from colorama import init,Fore
from os import name,system
from sys import stdout
from random import choice,randint
from string import ascii_letters,digits
from colorama import init,Style,Fore
from bs4 import BeautifulSoup
from fake_useragent import UserAgent
from threading import Thread, Lock,active_count
from threading import Thread,Lock,active_count
from time import sleep

class Main:

def clear(self):
if os.name == 'posix':
os.system('clear')
elif os.name in ('ce', 'nt', 'dos'):
os.system('cls')
if name == 'posix':
system('clear')
elif name in ('ce', 'nt', 'dos'):
system('cls')
else:
print("\n") * 120

def SetTitle(self,title_name:str):
os.system("title {0}".format(title_name))
system("title {0}".format(title_name))

def ReadFile(self,filename,method):
with open(filename,method) as f:
content = [line.strip('\n') for line in f]
return content

def PrintText(self,bracket_color:Fore,text_in_bracket_color:Fore,text_in_bracket,text):
self.lock.acquire()
stdout.flush()
text = text.encode('ascii','replace').decode()
stdout.write(Style.BRIGHT+bracket_color+'['+text_in_bracket_color+text_in_bracket+bracket_color+'] '+bracket_color+text+'\n')
self.lock.release()

def GetRandomProxy(self):
proxies_file = self.ReadFile('proxies.txt','r')
proxies = {
"http":"http://{0}".format(random.choice(proxies_file)),
"https":"https://{0}".format(random.choice(proxies_file))
proxies = {}
if self.proxy_type == 1:
proxies = {
"http":"http://{0}".format(choice(proxies_file)),
"https":"https://{0}".format(choice(proxies_file))
}
elif self.proxy_type == 2:
proxies = {
"http":"socks4://{0}".format(choice(proxies_file)),
"https":"socks4://{0}".format(choice(proxies_file))
}
else:
proxies = {
"http":"socks5://{0}".format(choice(proxies_file)),
"https":"socks5://{0}".format(choice(proxies_file))
}
return proxies

def __init__(self):
init(convert=True)
self.createds = 0
self.retries = 0
self.SetTitle('One Man Builds Spotify Account Creator Tool')
self.clear()
title = Fore.YELLOW+"""
self.title = Style.BRIGHT+Fore.RED+"""
____ ___ ____ ___ _ ____ _ _ ____ ____ ____ ____ _ _ _ _ ___
[__ |__] | | | | |___ \_/ |__| | | | | | | |\ | |
Expand All @@ -51,31 +73,28 @@ def __init__(self):
"""
print(title)
self.method = int(input(Fore.YELLOW+'['+Fore.WHITE+'>'+Fore.YELLOW+'] [1]Valid Credentails Lookalike [0]Random Strings: '))
self.use_proxy = int(input(Fore.YELLOW+'['+Fore.WHITE+'>'+Fore.YELLOW+'] Would you like to use proxies [1]yes [0]no: '))
self.threads = int(input(Fore.YELLOW+'['+Fore.WHITE+'>'+Fore.YELLOW+'] Threads: '))
self.birth_year_start = int(input(Fore.YELLOW+'['+Fore.WHITE+'>'+Fore.YELLOW+'] Enter the birth year start: '))
self.birth_year_end = int(input(Fore.YELLOW+'['+Fore.WHITE+'>'+Fore.YELLOW+'] Enter the birth year end: '))
print(self.title)
self.method = int(input(Style.BRIGHT+Fore.CYAN+'['+Fore.RED+'>'+Fore.CYAN+'] ['+Fore.RED+'1'+Fore.CYAN+']Valid Credentails Lookalike (slower) ['+Fore.RED+'0'+Fore.CYAN+']Random Strings (faster): '))
self.use_proxy = int(input(Style.BRIGHT+Fore.CYAN+'['+Fore.RED+'>'+Fore.CYAN+'] ['+Fore.RED+'1'+Fore.CYAN+']Proxy ['+Fore.RED+'0'+Fore.CYAN+']Proxyless: '))

if self.use_proxy == 1:
self.proxy_type = int(input(Style.BRIGHT+Fore.CYAN+'['+Fore.RED+'>'+Fore.CYAN+'] ['+Fore.RED+'1'+Fore.CYAN+']Https ['+Fore.RED+'2'+Fore.CYAN+']Socks4 ['+Fore.RED+'3'+Fore.CYAN+']Socks5: '))

self.threads = int(input(Style.BRIGHT+Fore.CYAN+'['+Fore.RED+'>'+Fore.CYAN+'] Threads: '))
self.birth_year_start = int(input(Style.BRIGHT+Fore.CYAN+'['+Fore.RED+'>'+Fore.CYAN+'] Birth year start: '))
self.birth_year_end = int(input(Style.BRIGHT+Fore.CYAN+'['+Fore.RED+'>'+Fore.CYAN+'] Birth year end: '))
self.ua = UserAgent()
self.lock = Lock()
print('')

def PrintText(self,info_name,text,info_color:Fore,text_color:Fore):
self.lock.acquire()
sys.stdout.flush()
text = text.encode('ascii','replace').decode()
sys.stdout.write(f'[{info_color+info_name+Fore.RESET}] '+text_color+f'{text}\n')
self.lock.release()

def AddRandomDomain(self,username):
email_providers = ['gmail.com', 'yahoo.com', 'hotmail.com', 'hotmail.co.uk', 'hotmail.fr', 'outlook.com', 'icloud.com', 'mail.com', 'live.com', 'yahoo.it', 'yahoo.ca', 'yahoo.in', 'live.se', 'orange.fr', 'msn.com', 'mail.ru', 'mac.com']
return username+'@'+random.choice(email_providers)
return username+'@'+choice(email_providers)

def GenUsername(self,gender):
country_codes = ['ru','en','it','fr','uk','hu','pl','cz']

country = random.choice(country_codes)
country = choice(country_codes)

URL = "https://fakenamegenerator.com/gen-{0}-{1}-{2}.php".format(gender,country,country)

Expand All @@ -86,20 +105,20 @@ def GenUsername(self,gender):
response = requests.get(URL,headers=headers).text
soup = BeautifulSoup(response,"html.parser")
fullname = soup.find('div',{'class':'address'}).h3.text
uname_characters = string.ascii_letters + string.digits + '_'
uname_characters = ascii_letters + digits + '_'
valid_username = fullname.lower().replace(' ','')
characters = ''.join(random.choice(uname_characters) for i in range(random.randint(1,6)))
characters = ''.join(choice(uname_characters) for i in range(randint(1,6)))
return valid_username+characters


def GenCredentailsMethod1(self):
credentails = {}
credentails['gender'] = random.choice(['male', 'female'])
credentails['birth_year'] = random.randint(self.birth_year_start,self.birth_year_end)
credentails['birth_month'] = random.randint(1,12)
credentails['birth_day'] = random.randint(1,28)
password_characters = string.ascii_letters + string.digits
password_characters = ''.join(random.choice(password_characters) for i in range(random.randint(8,15)))
credentails['gender'] = choice(['male', 'female'])
credentails['birth_year'] = randint(self.birth_year_start,self.birth_year_end)
credentails['birth_month'] = randint(1,12)
credentails['birth_day'] = randint(1,28)
password_characters = ascii_letters + digits
password_characters = ''.join(choice(password_characters) for i in range(randint(8,15)))
credentails['password'] = password_characters
username = self.GenUsername(credentails['gender'])
credentails['username'] = username
Expand All @@ -109,20 +128,25 @@ def GenCredentailsMethod1(self):

def GenCredentailsMethod2(self):
credentails = {}
credentails['gender'] = random.choice(['male', 'female'])
credentails['birth_year'] = random.randint(self.birth_year_start,self.birth_year_end)
credentails['birth_month'] = random.randint(1,12)
credentails['birth_day'] = random.randint(1,28)
password_characters = string.ascii_letters + string.digits
password_characters = ''.join(random.choice(password_characters) for i in range(random.randint(8,15)))
credentails['gender'] = choice(['male', 'female'])
credentails['birth_year'] = randint(self.birth_year_start,self.birth_year_end)
credentails['birth_month'] = randint(1,12)
credentails['birth_day'] = randint(1,28)
password_characters = ascii_letters + digits
password_characters = ''.join(choice(password_characters) for i in range(randint(8,15)))
credentails['password'] = password_characters
username = string.ascii_letters + string.digits
username = ''.join(random.choice(username) for i in range(random.randint(7,11)))
username = ascii_letters + digits
username = ''.join(choice(username) for i in range(randint(7,11)))
credentails['username'] = username
email = self.AddRandomDomain(username)
credentails['email'] = email
return credentails

def TitleUpdate(self):
while True:
self.SetTitle('One Man Builds Spotify Account Creator ^| CREATED: {0} ^| RETRIES: {1} ^| THREADS: {2}'.format(self.createds,self.retries,active_count()-1))
sleep(0.1)

def SpotifyCreator(self):
try:
create_headers = {
Expand Down Expand Up @@ -157,27 +181,32 @@ def SpotifyCreator(self):
create_response = requests.post(create_url, data=payload, headers=create_headers)

json_data = json.loads(create_response.text)
#print(json_data)

if 'status' in json_data:
if json_data['status'] == 1:
username = json_data['username']
if username != '':
self.PrintText('CREATED','{0}:{1} | {2} | {3} | {4}/{5}/{6}'.format(credentails['email'],credentails['password'],credentails['username'],credentails['gender'],credentails['birth_year'],credentails['birth_month'],credentails['birth_day']),Fore.GREEN,Fore.WHITE)
self.PrintText(Fore.CYAN,Fore.RED,'CREATED','{0}:{1} | {2} | {3} | {4}/{5}/{6}'.format(credentails['email'],credentails['password'],credentails['username'],credentails['gender'],credentails['birth_year'],credentails['birth_month'],credentails['birth_day']))
self.createds += 1
with open('hits.txt','a') as f:
f.write('{0}:{1}\n'.format(credentails['email'],credentails['password']))
with open('detailed_hits.txt','a') as f:
f.write('{0}:{1} | {2} | {3} | {4}/{5}/{6}\n'.format(credentails['email'],credentails['password'],credentails['username'],credentails['gender'],credentails['birth_year'],credentails['birth_month'],credentails['birth_day']))
else:
self.retries += 1
self.SpotifyCreator()
else:
self.retries += 1
self.SpotifyCreator()
else:
self.retries += 1
self.SpotifyCreator()
except:
self.retries += 1
self.SpotifyCreator()

def Start(self):
Thread(target=self.TitleUpdate).start()
while True:
if active_count()<=self.threads:
Thread(target=self.SpotifyCreator).start()
Expand Down

0 comments on commit b370d7a

Please sign in to comment.