Skip to content

Commit

Permalink
thank u for 150 ⭐
Browse files Browse the repository at this point in the history
+ mail verification system
+ optimizations
  • Loading branch information
seadhy committed Mar 4, 2023
1 parent 90a6dc6 commit 3f41671
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 13 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ https://user-images.githubusercontent.com/82868382/210181254-28da72a7-52c9-4bb1-

## 👾 Features
- Fully request based creator
- Auto Mail verify
- Auto Playlist or Profile or Artist follow
- Auto change avatars (pfps)
- Auto scrape username & pfps
- Save accounts SQLite database or text file
- HTTP&HTTPS proxy support
- Multi-Threading support
Expand All @@ -19,7 +21,9 @@ https://user-images.githubusercontent.com/82868382/210181254-28da72a7-52c9-4bb1-

- ✅ 50 Stars | Add more optional choices

- ❌ 150 Stars | Verify mail
- ✅ 150 Stars | Verify mail

- ❌ 250 Stars | Change Password (Accounts don't die with this)

## ✍️ Usage
1. Run `install.bat`
Expand Down
66 changes: 55 additions & 11 deletions creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import json
import sqlite3
import threading
from random import choice, randint
from string import ascii_lowercase
from time import sleep
from subprocess import call
from uuid import uuid4
from cursor import hide
from subprocess import call
from random import choice, randint
from modules.console import Console,Tools
from modules.faker import Faker
from modules.mail_service import Mail
except ModuleNotFoundError:
print('Modules not found! Please run `install.bat` and restart the tool.')
input()
Expand All @@ -29,6 +29,7 @@ def __init__(self):
self.tools.printLogo()
self.faker = Faker()
self.console = Console()
self.mail_service = Mail()

self.config_file = json.load(open('data/config.json', 'r', encoding='utf-8'))
self.settings = self.config_file['settings']
Expand Down Expand Up @@ -59,7 +60,8 @@ def __init__(self):
def debugMode(*args):
lock.acquire()
print('----------DEBUG------------')
for _ in args: print(_)
for _ in args:
print(_)
print('----------DEBUG------------')
lock.release()

Expand Down Expand Up @@ -108,7 +110,7 @@ def getCsrfToken(self, session: httpx.Client) -> str:
while True:
headers = {
"Host": "www.spotify.com",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Language": "tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3",
"Accept-Encoding": "gzip, deflate, br",
Expand Down Expand Up @@ -308,7 +310,7 @@ def followPlaylist(self, session: httpx.Client, client_token: str, token: str):
if self.settings['Debug_Mode'] == 'y':
self.debugMode(r.text, r.status_code)
except Exception:
self.console.printe('Error following, Retrying...')
self.console.printe('Error following, retrying...')
continue
break
def followArtist(self, session: httpx.Client, client_token: str, token: str):
Expand Down Expand Up @@ -348,16 +350,54 @@ def followArtist(self, session: httpx.Client, client_token: str, token: str):

break

def verifyMail(self, session: httpx.Client, verification_link: str):
while True:
try:
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
'Accept-Language': 'tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3',
'Accept-Encoding': 'gzip, deflate, br',
'DNT': '1',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'none',
'Sec-Fetch-User': '?1',
}

r = session.get(verification_link, headers=headers, follow_redirects=True)
if r.status_code == 200:
if "account/email-verification" in r.text:
self.console.printmf(verification_link[:150] + '...')
break
else:
if self.settings['Debug_Mode'] == 'y':
self.debugMode(r.text, r.status_code)
else:
self.console.printe('Error opening link, retrying...')
if self.settings['Debug_Mode'] == 'y':
self.debugMode(r.text, r.status_code)
except Exception:
self.console.printe('Error mail verification, retrying...')

def createAccount(self):
while (self.target_settings['Use_Target'] == 'y' and Console.created < self.target_settings['Target_To']) or (self.target_settings['Use_Target'] != 'y'):
try:
if self.settings['Use_Proxy'] == 'y':
proxy = choice(self.proxies)
session = httpx.Client(headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"}, proxies={"http://": f"http://{proxy}","https://": f"http://{proxy}"})
session = httpx.Client(headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0"}, proxies={"http://": f"http://{proxy}","https://": f"http://{proxy}"}, timeout=30)
else:
session = httpx.Client(headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"})
session = httpx.Client(headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0"}, timeout=30)
username = self.faker.getUsername(self.settings['Create_Username'])
mail = self.faker.getMail(16)

if self.settings['Verify_Mail'] == 'y':
inbox = self.mail_service.generateMail()
mail = inbox[0]
else:
mail = self.faker.getMail(16)

password = self.faker.getPassword(12)
birthday = self.faker.getBirthday()

Expand Down Expand Up @@ -405,15 +445,19 @@ def createAccount(self):
'host': 'spclient.wg.spotify.com',
'spotify-app-version': '8.8.0.347',
'user-agent': 'Spotify/8.8.0.347 Android/25 (SM-G988N)',
'x-client-id': "".join(choice(ascii_lowercase) for _ in range(32)),
'x-client-id': str(uuid4()).replace('-', ''),
}

r = session.post(url='https://spclient.wg.spotify.com/signup/public/v2/account/create', headers=headers, json=payload, timeout=15)
r = session.post(url='https://spclient.wg.spotify.com/signup/public/v2/account/create', headers=headers, json=payload)

if r.status_code == 200 and 'success' in r.text:
self.console.printsc(f'Account has been created with the name {username}.')
Console.created += 1

if self.settings['Verify_Mail'] == 'y':
verification_link = self.mail_service.getVerificationLink(inbox[2])
self.verifyMail(session, verification_link)

account_id = r.json()['success']['username']
login_token = r.json()['success']['login_token']

Expand Down
3 changes: 2 additions & 1 deletion data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"Threads": 3,
"Create_Username": "y or n",
"Create_Avatar": "y or n",
"Use_Proxy": "y or n",
"Change_Avatar": "y or n",
"Use_Proxy": "y or n",
"Verify_Mail": "y",
"Debug_Mode": "if you are not a developer, do not touch this value!! (if you're going to change you can just do 'y')"
},

Expand Down
102 changes: 102 additions & 0 deletions modules/mail_service.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import httpx
import json
import re
from time import sleep
from random import choices
from string import ascii_lowercase, digits, ascii_letters
from modules.console import Console


class Mail:
def __init__(self) -> None:
self.console = Console()

self.generate_url = 'https://api.mail.tm/accounts'
self.token_url = 'https://api.mail.tm/token'
self.messages_url = 'https://api.mail.tm/messages'

headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0', 'Accept': 'application/ld+json', 'Accept-Language': 'tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3', 'Accept-Encoding': 'gzip, deflate, br', 'Referer': 'https://api.mail.tm/domains', 'X-KL-saas-Ajax-Request': 'Ajax_Request', 'Connection': 'keep-alive', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'same-origin', 'If-None-Match': '5dea09b3c8649bf068660601a9ef0f1e', 'TE': 'trailers'}

try:
self.domain = httpx.get('https://api.mail.tm/domains?page=1', headers=headers, timeout=30).json()['hydra:member'][0]['domain']
except Exception:
self.domain = 'eurokool.com'

def generateMail(self) -> tuple:
while True:
try:
mail_text = ''.join(choices(ascii_lowercase + digits, k=12))
mail = f'{mail_text}@{self.domain}'
password = ''.join(choices(ascii_letters + digits, k=12))

headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0',
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3',
'Accept-Encoding': 'gzip, deflate, br',
'Content-Type': 'application/json',
'Referer': 'https://mail.tm/',
'Origin': 'https://mail.tm',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Connection': 'keep-alive',
'TE': 'trailers',
}

payload = {
"address": mail,
"password": password
}

r = httpx.post(url=self.generate_url, headers=headers, json=payload, timeout=30)
if r.status_code == 201:
try:
auth_token = httpx.post(url=self.token_url, json=payload, timeout=30).json()

return mail, password, auth_token['token']
except json.decoder.JSONDecodeError:
sleep(3)
continue
elif r.status_code == 422:
self.console.printe('Generation Error: already used mail address.')
except Exception as e:
self.console.printe('Generation Error: ' + str(e).capitalize() + '.')
continue

def getVerificationLink(self, token: str) -> str:
while True:
try:
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0',
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://mail.tm/',
'Origin': 'https://mail.tm',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'Authorization': f"Bearer {token}",
'Connection': 'keep-alive',
'TE': 'trailers',
}

r = httpx.get('https://api.mail.tm/messages', headers=headers, timeout=30)

if r.json()['hydra:totalItems'] > 0:
r = httpx.get('https://api.mail.tm/messages/' + r.json()['hydra:member'][0]['id'], headers=headers)
verification_link = re.search('https://wl.spotify.com/ls/click\?upn=.*', r.json()['text'])[0].rstrip(' )')

return verification_link

sleep(1)
except IndexError:
sleep(1)
continue
except json.decoder.JSONDecodeError:
sleep(3)
continue
except Exception as e:
self.console.printe('Verification Error: ' + str(e).capitalize() + '.')
continue

0 comments on commit 3f41671

Please sign in to comment.