Загрузка...

Script TG Stars [Test Server]

Thread in Python created by krutyshkin Apr 2, 2025. (bumped Apr 8, 2025) 599 views

  1. krutyshkin
    krutyshkin Topic starter Apr 2, 2025 148 1162 Feb 6, 2019
    ДАННАЯ ПРИКОЛЮХА ДЛЯ ТЕСТ СЕРВЕРОВ ТГ ( ВАШ АКК НА ТЕСТ СЕРВЕРЕ МОЖЕТ СЛЕТАТЬ АККУРАТНЕЕ)

    Там все легко,так что разберетесь
    [IMG]


    Code
    from telethon import TelegramClient, functions, types

    import os

    import asyncio

    import hashlib

    import hmac

    import re


    # не забудьте ниже пролистать и вписать свой пароль от 2фа, иначе нихуя работать не будет


    link = "https://t.me/" # ссылка ВАША на покупку звёзд или према, не важно

    api_id = 1111 # Взять тут - [URL]https://my.telegram.org/apps[/URL]

    api_hash = "111"

    phone = "+111" # твой телефон для входа в акк

    client = TelegramClient("СМЕНИТЕ НА ВАШ App title", api_id, api_hash)

    client.session.set_dc(2, "149.154.167.40", 443)


    def sha256(data: bytes) -> bytes:

    return hashlib.sha256(data).digest()


    def get_slug(url: str) -> str:

    match = re.search(r"https://t\.me/\$?([a-zA-Z0-9_]+)", url)

    return match.group(1) if match else ""


    def pbkdf2_hmac_sha512(password: bytes, salt: bytes, iterations: int, dklen: int) -> bytes:

    return hashlib.pbkdf2_hmac('sha512', password, salt, iterations, dklen)


    def mod_pow(base: int, exp: int, mod: int) -> int:

    return pow(base, exp, mod)


    def compute_k(p: int, g: int) -> int:

    return int.from_bytes(sha256(p.to_bytes(256, 'big') + g.to_bytes(256, 'big')), 'big')


    def compute_u(g_a: int, g_b: int) -> int:

    return int.from_bytes(sha256(g_a.to_bytes(256, 'big') + g_b.to_bytes(256, 'big')), 'big')


    def sh(data: bytes, salt: bytes) -> bytes:

    return sha256(salt + data + salt)


    def ph1(password: str, salt1: bytes, salt2: bytes) -> bytes:

    return sh(sh(password.encode(), salt1), salt2)


    def ph2(password: str, salt1: bytes, salt2: bytes) -> bytes:

    return sh(pbkdf2_hmac_sha512(ph1(password, salt1, salt2), salt1, 100000, 64), salt2)


    def generate_client_parameters(password: str, algo, srp_B: int) -> dict:

    g = algo.g

    p = algo.p

    p = int.from_bytes(p, "big")



    salt1 = algo.salt1

    salt2 = algo.salt2



    k = compute_k(p, g)



    x = int.from_bytes(ph2(password, salt1, salt2), 'big')

    v = mod_pow(g, x, p)



    a = int.from_bytes(os.urandom(256), 'big') % p

    g_a = mod_pow(g, a, p)



    u = compute_u(g_a, srp_B)



    k_v = (k * v) % p

    t = (srp_B - k_v) % p

    s_a = mod_pow(t, a + u * x, p)

    k_a = sha256(s_a.to_bytes(256, 'big'))



    return {

    "g_a": g_a,

    "k_a": k_a

    }


    async def get_new_tmp(p_obj: types.InputCheckPasswordSRP) -> types.account.TmpPassword:

    tmp = await client(functions.account.GetTmpPasswordRequest(password=p_obj, period=8500))

    return tmp


    def compute_m1(algo, g_a: int, g_b: int, k_a: bytes) -> bytes:

    p = algo.p

    p = int.from_bytes(p, "big")

    g = algo.g

    salt1 = algo.salt1

    salt2 = algo.salt2



    h_xor = bytes(x ^ y for x, y in zip(sha256(p.to_bytes(256, 'big')), sha256(g.to_bytes(256, 'big'))))

    return sha256(h_xor + sha256(salt1) + sha256(salt2) + g_a.to_bytes(256, 'big') + g_b.to_bytes(256, 'big') + k_a)


    async def calc():

    pa = await client(functions.account.GetPasswordRequest())

    ca = pa.current_algo

    srp_B = pa.srp_B

    srp_B = int.from_bytes(srp_B, "big")

    srpid = pa.srp_id



    slug = get_slug(link)


    params = generate_client_parameters(password, ca, srp_B)

    g_a = params["g_a"]

    k_a = params["k_a"]



    M1 = compute_m1(ca, g_a, srp_B, k_a)

    return g_a, M1, srpid, slug


    async def lzt():

    await client.start(phone)

    global password

    password = "ыыы" # пароль твой



    g_a, M1, srpid, slug = await calc()



    pwr = types.InputCheckPasswordSRP(srp_id=srpid, A=g_a.to_bytes(256, "big"), M1=M1)

    tmp = await get_new_tmp(pwr)

    tmp_pass = tmp.tmp_password



    while True:

    inv = types.InputInvoiceSlug(slug=slug)

    form = await client(functions.payments.GetPaymentFormRequest(invoice=inv))

    fid = form.form_id

    idd = form.saved_credentials[0].id



    try:

    credentials = types.InputPaymentCredentialsSaved(id=idd, tmp_password=tmp_pass)

    except:

    g_a, M1, srpid, slug = await calc()

    pwr = types.InputCheckPasswordSRP(srp_id=srpid, A=g_a.to_bytes(256, "big"), M1=M1)

    tmp = await get_new_tmp(pwr)

    tmp_pass = tmp.tmp_password

    credentials = types.InputPaymentCredentialsSaved(id=idd, tmp_password=tmp_pass)



    await client(functions.payments.SendPaymentFormRequest(form_id=fid, invoice=inv, credentials=credentials))

    # await asyncio.sleep(0.05)


    async def main():

    for _ in range(101):

    await asyncio.gather(lzt())


    asyncio.run(main())
     
    1. Artemka_LOL
      krutyshkin, кстати, а как попасть туда теперь? У меня не получается
  2. MALWARE
    MALWARE Apr 2, 2025 мяукаю 11,995 Mar 12, 2021
    это конечно хорошо, но какой смысл в этом? чтобы что?
     
    1. Artemka_LOL
      MALWARE, прикольно типо
    2. krutyshkin Topic starter
      MALWARE, ЧТобы быть крутым и хвастаться перед одноклассниками или в тиктоке что у тебя миллиарды звезд
      А так, на тест сервере своя жизнь и свои приколы
      Крч не надо клацать своими нежными ручками миллион раз чтоб накупить звездочек
  3. Gamemaxi
    Gamemaxi May 23, 2025 0 May 23, 2025
    что делать если выдаёт ошибку telethon.errors.rpcbaseerrors.BadRequestError: RPCError 400: SLUG_INVALID (caused by GetPaymentFormRequest) ?
     
Loading...
Top