| import pyperclip | |
| import requests | |
| import re | |
| import sys | |
| import uuid | |
| import json | |
| def fakeid(): | |
| fakeid = requests.get("http://randomuser.me/api/").json()['results'][0] | |
| return { | |
| 'email': fakeid['email'].replace('example.com', 'gmail.com'), | |
| 'phone': re.sub('[^0-9]', '', fakeid['cell']), | |
| 'password': "@A" + fakeid['login']['salt'] | |
| } | |
| def copy_captcha_to_clipboard(captcha): | |
| # you can open what's copied to clipboard here in a web browser | |
| # this is the least creative way i could come up with displaying/solving these ;) | |
| pyperclip.copy(captcha) | |
| def create_parler_account(user): | |
| session = requests.Session() | |
| session.headers['User-Agent'] = 'Parler%20Staging/545 CFNetwork/978.0.7 Darwin 18.7.0' | |
| user_key = session.post('https://api.parler.com/v2/login/apply', data={ | |
| 'email': user['email'], | |
| 'phone': user['phone'], | |
| 'password': user['password'], | |
| 'passwordConfirm' :user['password'], | |
| 'deviceId': uuid.uuid4() | |
| }).json()['key'] | |
| captcha = 'data:image/png;base64,' + session.post('https://api.parler.com/v2/login/captcha/new', data={ | |
| 'identifier': user_key | |
| }).json()['image'] | |
| sys.stderr.write("Captcha: ") | |
| copy_captcha_to_clipboard(captcha) | |
| session.post('https://api.parler.com/v2/login/captcha/submit', data={ | |
| 'identifier': user_key, | |
| 'solution': input().strip() | |
| }).json() | |
| user['mst'] = session.cookies['mst'] | |
| user['jst'] = session.cookies['jst'] | |
| print(json.dumps(user)) | |
| while True: | |
| create_parler_account(fakeid()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment