domingo, 19 de enero de 2025

código

import random
import os
import json
import time
import schedule
import threading
from flask import Flask
from threading import Thread
from colorama import Fore, Style, init
from pyfiglet import figlet_format
import samino

# Initialize colorama
init()

# Display banner
print(Fore.GREEN + Style.BRIGHT)
print(figlet_format("COINS GENERATOR"))
print(Fore.LIGHTBLUE_EX + "_BY BAKR_")
print(Fore.LIGHTMAGENTA_EX + "Please wait 13 seconds")

# Install missing libraries if needed
try:
    import pyfiglet
except ImportError:
    os.system('pip install pyfiglet')
    import pyfiglet

# Colors for terminal output
COLORS = {
    "red": "\x1b[1;91m",
    "green": "\x1b[1;92m",
    "yellow": "\x1b[1;93m",
    "cyan": "\x1b[2;36m",
    "blue": "\x1b[1;34m",
    "magenta": "\x1b[1;95m",
}

# Community link 
community_link = "http://aminoapps.com/p/hag8h4"

# Function to calculate timers for activity
def generate_timers():
    return [{"start": int(time.time()), "end": int(time.time() + 300)} for _ in range(50)]

# Flask app to keep the bot running
app = Flask("")

@app.route("/")
def home():
    return "Bot is running!"

def run():
    app.run(host="0.0.0.0", port=(random.randint(2000, 9000)))

def keep_alive():
    thread = Thread(target=run)
    thread.start()

# Check internet connection
def check_internet():
    hostname = "www.google.com"
    response = os.system("ping -c 1 " + hostname)
    return response == 0

# Main function to handle accounts
def threadit(email, password, device, com_id):
    client = samino.Client()
    try:
        client.login(email=email, password=password)
        print(Fore.GREEN + f"Logged in to - {email}")
        time.sleep(3)
        client.join_community(com_id)
        print(Fore.GREEN + f"Joined Community - {email}")
        
        local = samino.Local(com_id)
        for i in range(24):
            local.send_active_time(timers=generate_timers())
            print(Fore.CYAN + f"{i + 1}/24 Coin Generation - DONE!")
            time.sleep(2)
    except Exception as e:
        print(Fore.RED + f"Error with {email}: {e}")

def main():
    # Load accounts from JSON
    try:
        with open("accounts.json", "r") as file:
            accounts = json.load(file)
    except FileNotFoundError:
        print(Fore.RED + "accounts.json not found!")
        return
    
    # Get community ID
    client = samino.Client()
    com_id = client.get_from_link(community_link).comId

    # Process each account
    for account in accounts:
        email = account.get("email")
        password = account.get("password")
        device = account.get("device")
        
        if email and password and device:
            threadit(email, password, device, com_id)
        else:
            print(Fore.YELLOW + f"Incomplete data for account: {account}")

# Restart script every 6 minutes
def restart_script():
    print(Fore.BLUE + "Restarting script...")
    python = sys.executable
    os.execl(python, python, *sys.argv)

schedule.every(6).minutes.do(restart_script)

if __name__ == "__main__":
    keep_alive()
    while True:
        if check_internet():
            schedule.run_pending()
            main()
        else:
            print(Fore.RED + "No internet connection. Retrying in 5 seconds...")
            time.sleep(5)

No hay comentarios.:

Publicar un comentario

El tarot de tu mente

Ya estoy cansada de nuestra historia, De descifrar tu mente como un adivino, De armar tus acciones como  detective.  Aprendí a sobre magia, ...