Untitled

 avatar
user_0623289
python
a year ago
4.3 kB
7
Indexable
from dickgen import Client
from dickgen.lib.util.helpers import gen_deviceId
import requests
from time import sleep
import names
import json

client=Client()

email="phx53010@gmail.com"
email_type="dotplus"
email_code='rwuy ogwm sdbm ufkf'
PASSWORD='phx890@@'
urll='https://aminoapps.com/#access_token=ya29.a0AfB_byApZEAhMptEKjHAPwrMW3SEuwTlke8YvtEvxn1xFB50GUspGFPdrBfxnoBLUyEUFwVL1HbxnhYYomEJQKWZXhFsrt0Py5JI4FvxFlXpCmGrf8xgZrTS3YVl0OHImk2tC5T5xNXJOmCGQ3y-Iouc4-Cy8WRfER8aCgYKAaQSARISFQHGX2MiTUZae-2f6ffL4d8i6AEerw0170&token_type=Bearer&expires_in=3599&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20openid&id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjFmNDBmMGE4ZWYzZDg4MDk3OGRjODJmMjVjM2VjMzE3YzZhNWI3ODEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiOTY1ODg4NjE5MzQzLXA0ajd0am9nYnNmZmkzdTVsMXRpZGs4amxiM3M4aWRiLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiOTY1ODg4NjE5MzQzLXA0ajd0am9nYnNmZmkzdTVsMXRpZGs4amxiM3M4aWRiLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE4MzE5ODA4NjQzMjEwNjkwNzU0IiwiZW1haWwiOiJwaHg1MzAxMEBnbWFpbC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXRfaGFzaCI6InVhNkhSTzVzTGpGMVNUZ2hCYV9CNmciLCJuYmYiOjE3MDUzMTI1MTYsImlhdCI6MTcwNTMxMjgxNiwiZXhwIjoxNzA1MzE2NDE2LCJqdGkiOiJhMmU4ODc4MmZkYWRlODQxYTYyODU1YTE0OWFiYjc0ZjkzZTEyMjI4In0.ijxYrRqD5kKRl-QdA0nNn3nKm4Je0Hs8jUtY1ySkHT2ThSvZruoZ3n3HusL7rb9CK_Gy59Ka9_QU4TkFeEhn9xmwP66445KEXib01xWfxXrx0iIrMg5Joa-t78-ZWeWtK6IklxNqR5SroS4qvXq6zs6zD8WZNdrhDLVI7ejreS94tfuvcYu3x0tfZqhHVl_DKcp-XXpZ-RBiXAcp3ZdTKvdEqw--lykLL3h4PogVux_sU306JixJrwW60KjyHIgehnp3McQhSQB61bGhFJZFSwJ76gUTmzUPNDhxlWngJ6TMrVElW941sRPqXlsFwvB_ZazbGMzY6PkWrFwnlM5ipA&authuser=0&prompt=none'

def save_data(file_name, new_data):
    try:
        with open(file_name, 'r') as file:
            existing_data = json.load(file)
    except FileNotFoundError:
        existing_data = []
    existing_data.append(new_data)
    with open(file_name, 'w') as file:
        json.dump(existing_data, file, indent=2)


def save_token_to_file(token):
    with open("token.txt", "w") as file:
        file.write(token)

def load_token_from_file():
    try:
        with open("token.txt", "r") as file:
            return file.read().strip()
    except FileNotFoundError:
        return None

token=load_token_from_file()
if token == "":

    token=client.get_token(token_id=None,url=urll)
    if token:
        save_token_to_file(token)


def process_email_registration(sid,dev):
    new_email = (client.generate_email(email, email_type)).replace('"', '')
    print(new_email)
    dd = client.req_val(new_email, sid)

    if dd["api:statuscode"] == 0:
        sleep(6)
        url = client.get_verification(email,email_code)
        print(url)
        code = client.captcha2(url)
        print(code)
        ch_req = client.check_val(new_email, code, sid)

        if ch_req["api:statuscode"] == 0:
            client.disconnect(PASSWORD, sid)
            acc = client.update_email(new_email, code, sid, PASSWORD)

            if acc["api:statuscode"] == 0:
                cred = {"email": new_email, "secret": acc['secret'], "password": PASSWORD,'deviceId':dev}
                save_data('acc.json',cred)
                return True
            else:
                print(f"Error updating email: {acc['api:message']}")
        else:
            print(ch_req["api:message"])
    else:
        print(dd)

    return False

def main():
        global token
        try:
                random_name = names.get_full_name()
                dev=gen_deviceId()
                res = client.register(random_name,token,PASSWORD,dev)

                if res["api:statuscode"] == 0:
                        sid=res["sid"]
                        try:
                            if process_email_registration(sid,dev):
                                print("gen suc")
                        except Exception as e:
                            print(e)
                else:
                    print(f"Error registering user: {res['api:message']}")
                    token = client.get_token(token_id=None,url=urll)
                    if token:
                        save_token_to_file(token)
        except Exception as e:
             print(e)

while True:
  main()
Editor is loading...
Leave a Comment