Ejemplo n.º 1
0
def use_tribot(charname, charpass, proxy=None):
    """Gets settings and runs Tribot CLI"""
    # Storing all of our settings while we're in the correct directory
    use_proxies = get_user_settings()[0]
    proxy_auth_type = get_user_settings()[1]
    tribot_username = get_tribot_settings()[1]
    tribot_password = get_tribot_settings()[2]
    tribot_script = get_tribot_settings()[3]
    script_args = get_tribot_settings()[4]

    if use_proxies:
        proxy_auth_type = get_user_settings()[1]
        proxy_username, proxy_password, proxy_ip, proxy_port = read_proxy(proxy, proxy_auth_type)

    original_path = os.getcwd()
    os.chdir("../src/TRiBot/tribot-gradle-launcher/")

    # Create our CLI command according to if we're using proxies or not
    if use_proxies:
        if proxy_auth_type == 1:  # Using proxies with user:pass authentication
            cli_cmd = (f'gradlew.bat runDetached '
                       f'--username "{tribot_username}" --password "{tribot_password}" '
                       f'--charusername "{charname}" --charpassword "{charpass}" '
                       f'--script "{tribot_script}" --scriptargs "{script_args} " '
                       f'--charworld "433" ' 
                       f'--proxyhost "{proxy_ip}" '
                       f'--proxyport "{proxy_port}" '
                       f'--proxyusername "{proxy_username}" '
                       f'--proxypassword "{proxy_password}" ')
        else:  # Using proxies with IP based authentication
            cli_cmd = (f'gradlew.bat runDetached '
                       f'--username "{tribot_username}" --password "{tribot_password}" '
                       f'--charusername "{charname}" --charpassword "{charpass}" '
                       f'--script "{tribot_script}" --scriptargs "{script_args} " '
                       f'--charworld "433" '
                       f'--proxyhost "{proxy_ip}" '
                       f'--proxyport "{proxy_port}" ')
    else:  # Not using proxies
        cli_cmd = (f'gradlew.bat runDetached '
                   f'--username "{tribot_username}" --password "{tribot_password}" '
                   f'--charusername "{charname}" --charpassword "{charpass}" '
                   f'--script "{tribot_script}" --scriptargs "{script_args} " '
                   f'--charworld "433" ')

    # Run the Tribot CLI in a separate, hidden shell to decrease clutter
    create_no_window = 0x08000000
    subprocess.Popen(f"start /B start cmd.exe @cmd /k {cli_cmd}", shell=True,
                     creationflags=create_no_window)

    # Changing back to the account creator directory
    # So we can see the settings.ini file for the next account.
    os.chdir(original_path)

    return cli_cmd
Ejemplo n.º 2
0
def use_osbot(charname, charpass, proxy=None):
    """Launches OSBot CLI with supplied information"""
    # Grab all of our settings
    use_proxies = get_user_settings()[0]
    osbot_username = get_osbot_settings()[1]
    osbot_password = get_osbot_settings()[2]
    osbot_script = get_osbot_settings()[3]
    script_args = get_osbot_settings()[4]
    client = find_osbot()

    if use_proxies:  # Format CLI with proxy param
        cli_cmd = (f'java -jar "{client}" '
                   f'-proxy {format_current_proxy(proxy)} '
                   f'-login {osbot_username}:{osbot_password} '
                   f'-bot {charname}:{charpass}:0000 '
                   f'-script "{osbot_script}:{script_args}" '
                   f'-world 433')
    else:  # Format without a proxy param
        cli_cmd = (f'java -jar "{client}" '
                   f'-login {osbot_username}:{osbot_password} '
                   f'-bot {charname}:{charpass}:0000 '
                   f'-script "{osbot_script}:{script_args}" '
                   f'-world 433')

    # Run the OSBot CLI in a separate, hidden shell to decrease clutter
    create_no_window = 0x08000000
    subprocess.Popen(f"start /B start cmd.exe @cmd /k {cli_cmd}",
                     shell=True,
                     creationflags=create_no_window)

    return cli_cmd
Ejemplo n.º 3
0
def get_payload() -> dict:
    """
    Generates and fills out our payload.
    returns:
    payload (dict): account creation payload data
    """
    # Get username/password options from settings.ini
    email = get_user_settings()[5]
    password = get_user_settings()[6]

    if not email:  # We aren't using a custom username prefix -> make it random
        email = ''.join([
            random.choice(string.ascii_lowercase + string.digits)
            for n in range(6)
        ]) + '@gmail.com'
    else:  # We're using a custom prefix for our usernames
        if '@' in email:  # Using a custom domain
            email = ''.join([
                random.choice(string.ascii_lowercase + string.digits)
                for n in range(6)
            ]) + email
        else:
            email = email + str(random.randint(1000, 9999)) + '@gmail.com'
    if not password:
        password = email[:get_index(email, '@', 1)] + str(
            random.randint(1, 9999))

    # Generate random birthday for the account
    day = str(random.randint(1, 25))
    month = str(random.randint(1, 12))
    year = str(random.randint(1980, 2006))  # Be at least 13 years old

    payload = {
        'theme': 'oldschool',
        'mod': 'os-mobile',
        'ssl': '1',
        'dest': '%2Fmobile%2Fplay',
        'email1': email,
        'onlyOneEmail': '1',
        'password1': password,
        'onlyOnePassword': '******',
        'day': day,
        'month': month,
        'year': year,
        'create-submit': 'create'
    }
    return payload
Ejemplo n.º 4
0
def save_account(payload, proxy=None):
    """Save the needed account information to created_accs.txt"""
    USE_PROXIES = get_user_settings()[0]
    if USE_PROXIES:
        proxy_auth_type = get_user_settings()[1]
        proxy_ip = read_proxy(proxy, proxy_auth_type)[2]
        proxy = proxy_ip
    else:
        proxy = get_ip()

    # Check if we want user:pass format(false) or user:pass:ip(true)
    acc_details_format = get_user_settings()[7]
    if acc_details_format:
        formatted_payload = f"\n{payload['email1']}:{payload['password1']}:{proxy}"
    else:
        formatted_payload = f"\n{payload['email1']}:{payload['password1']}"

    with open("../src/created_accs.txt", "a+") as acc_list:
        acc_list.write(formatted_payload)
    return formatted_payload
Ejemplo n.º 5
0
def format_current_proxy(proxy):
    """Formats and returns our current proxy for CLI use"""
    # Example returned proxy:
    # {'https': 'socks5://username:[email protected]:24613\n'}
    proxy_auth_type = get_user_settings()[1]
    proxy_username, proxy_password, proxy_ip, proxy_port = read_proxy(
        proxy, proxy_auth_type)
    if proxy_auth_type == 1:
        proxy = f"{proxy_ip}:{proxy_port}:{proxy_username}:{proxy_password}"
        return proxy
    else:
        proxy = f"{proxy_ip}:{proxy_port}"
        return proxy
Ejemplo n.º 6
0
def create_account(append_text, progress_callback):
    """Creates our account and returns the registration info"""
    NUM_OF_ACCS = get_user_settings()[4]
    TRIBOT_ACTIVE = get_tribot_settings()[0]
    OSBOT_ACTIVE = get_osbot_settings()[0]
    USE_PROXIES = get_user_settings()[0]
    sleep_timer = get_user_settings()[8]

    accs_created = 0  # initialize
    failure_counter = 0  # initialize
    failure_threshold = 3  # If we fail this many times, the script will stop.

    progress_callback.emit(f"\nWe'll make: {NUM_OF_ACCS} accounts.")
    progress_callback.emit(f"Will we use proxies?: {USE_PROXIES}")
    progress_callback.emit(f"Will we use Tribot CLI?: {TRIBOT_ACTIVE}")
    progress_callback.emit(f"Will we use OSBot CLI?: {OSBOT_ACTIVE}")
    progress_callback.emit(
        "\nNeed Support? Join the discord - https://discord.gg/SjVjQvm\n")

    while accs_created < NUM_OF_ACCS:
        if NUM_OF_ACCS == 0:
            break
        progress_callback.emit(f"\nSleeping for {sleep_timer} seconds...")
        time.sleep(sleep_timer)

        progress_callback.emit(f"{timestamp()} Creating account...")

        if USE_PROXIES:
            proxy = get_proxy()
            progress_callback.emit(f"Proxy: {proxy['https']}")
        else:
            proxy = None
            progress_callback.emit(f"Proxy: {proxy}")

        payload = get_payload()
        try:
            submit = requests.post(SITE_URL,
                                   headers=HEADERS,
                                   data=payload,
                                   proxies=proxy,
                                   timeout=20)
        except Exception as e:
            print(e)
        if submit.ok:
            if check_account(submit):
                progress_callback.emit("Account created successfully.")
                accs_created += 1
                formatted_payload = save_account(payload, proxy=proxy)
                progress_callback.emit(
                    f"Account created with the details: {formatted_payload}")
                if TRIBOT_ACTIVE:
                    cmd = use_tribot(payload['email1'], payload['password1'],
                                     proxy)
                    progress_callback.emit(
                        "\nLoading Tribot with the following settings...")
                    progress_callback.emit(cmd)
                elif OSBOT_ACTIVE:
                    cmd = use_osbot(payload['email1'], payload['password1'],
                                    proxy)
                    progress_callback.emit(
                        "\nLoading OSBot with the following settings...")
                    progress_callback.emit(cmd)
            else:
                progress_callback.emit("Account creation failed.")
                failure_counter += 1
                if failure_counter == failure_threshold:
                    progress_callback.emit(
                        f"Failed {failure_counter} times. Let your IP cool down or up the sleep timer."
                    )
                    break
        else:
            progress_callback.emit(
                f"Creation failed. Error code {submit.status_code}")
            progress_callback.emit(submit.text)
    progress_callback.emit(f"\n{timestamp()}Finished creating accounts.")
    progress_callback.emit(f"We created: {accs_created} accounts.")
Ejemplo n.º 7
0
from configparser import ConfigParser
from datetime import datetime
from PyQt5 import QtWidgets
from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal, QTimer, QThreadPool, QRunnable

from src.gui_files.acc_creator_gui import Ui_MainWindow
from src.modules.helper_modules.utility import (get_index, get_user_settings,
                                                get_site_settings,
                                                get_tribot_settings,
                                                get_osbot_settings)
from src.modules.licensing.creator_licensing import check_key
from src.modules.updater.updater import check_update

# Get User settings
site_url = get_site_settings()
use_proxies = get_user_settings()[0]
proxy_auth_type = get_user_settings()[1]
num_of_accs = get_user_settings()[4]
username_prefix = get_user_settings()[5]
acc_password = get_user_settings()[6]
retry_seconds = get_user_settings()[8]

# Get Tribot settings
use_tribot = get_tribot_settings()[0]
tribot_username = get_tribot_settings()[1]
tribot_password = get_tribot_settings()[2]
tribot_script = get_tribot_settings()[3]
tribot_script_args = get_tribot_settings()[4]

# Get OSBot settings
use_osbot = get_osbot_settings()[0]