valorant pipe src pyhton

Waxyissback

Gold Üye
Katılım
7 Haz 2026
Mesajlar
252
Beğeniler
39
İletişim
Python:
import sys
import os
import time
import threading
import psutil
import win32pipe
import win32file
import pywintypes
import win32con
import win32job
import win32api
from PyQt6.QtWidgets import (
    QApplication, QWidget, QPushButton, QVBoxLayout, QLabel, QSpacerItem, QSizePolicy
)
from PyQt6.QtCore import Qt, QTimer

pipe_name = r'\\.\pipe\933823D3-C77B-4BAE-89D7-A92B567236BC'
valorant_running = False
stopped_once = False
current_job = None
pipe_threads = []
pipe_handles = []
monitor_thread = None
monitored_pids = set()
monitored_lock = threading.Lock()
monitoring_active = False

def make_shutdown_event():
    return threading.Event()

shutdown_event = make_shutdown_event()

def stop_and_restart_vgc():
    os.system('sc stop vgc')
    time.sleep(0.5)
    os.system('sc start vgc')
    time.sleep(0.5)

def override_vgc_pipe():
    try:
        pipe = win32file.CreateFile(
            pipe_name,
            win32con.GENERIC_READ | win32con.GENERIC_WRITE,
            0, None, win32con.OPEN_EXISTING, 0, None)
        win32file.CloseHandle(pipe)
    except Exception:
        pass

def handle_client(pipe):
    global stopped_once
    try:
        while not shutdown_event.is_set():
            try:
                data = win32file.ReadFile(pipe, 4096)
                if data:
                    if not stopped_once:
                        os.system('sc stop vgc')
                        try:
                            import winsound
                            winsound.Beep(1000, 500)
                        except:
                            pass
                        stopped_once = True
                    win32file.WriteFile(pipe, data[1])
            except pywintypes.error as e:
                if e.winerror == 109:
                    break
                time.sleep(0.1)
    finally:
        try:
            win32file.CloseHandle(pipe)
        except Exception:
            pass

def create_named_pipe():
    global pipe_handles
    while not shutdown_event.is_set():
        try:
            pipe = win32pipe.CreateNamedPipe(
                pipe_name,
                win32con.PIPE_ACCESS_DUPLEX,
                win32con.PIPE_TYPE_MESSAGE | win32con.PIPE_WAIT,
                win32con.PIPE_UNLIMITED_INSTANCES,
                1048576, 1048576, 500, None)
            pipe_handles.append(pipe)
            win32pipe.ConnectNamedPipe(pipe, None)
            t = threading.Thread(target=handle_client, args=(pipe,), daemon=True)
            t.start()
            pipe_threads.append(t)
        except Exception:
            time.sleep(1)

def create_job_object():
    job = win32job.CreateJobObject(None, "")
    extended_info = win32job.QueryInformationJobObject(job, win32job.JobObjectExtendedLimitInformation)
    extended_info['BasicLimitInformation']['LimitFlags'] |= win32job.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
    win32job.SetInformationJobObject(job, win32job.JobObjectExtendedLimitInformation, extended_info)
    return job

def assign_valorant_to_job():
    global current_job
    if current_job:
        win32job.TerminateJobObject(current_job, 0)
        current_job.Close()
        current_job = None
    time.sleep(2)
    current_job = create_job_object()
    found = False
    while not found and not shutdown_event.is_set():
        for proc in psutil.process_iter(['pid', 'name']):
            try:
                if proc.info['name'] and "VALORANT-Win64-Shipping.exe" in proc.info['name']:
                    h_process = win32api.OpenProcess(win32con.PROCESS_ALL_ACCESS, False, proc.info['pid'])
                    win32job.AssignProcessToJobObject(current_job, h_process)
                    found = True
                    break
            except (psutil.NoSuchProcess, psutil.AccessDenied):
                continue
        if not found:
            time.sleep(1)

def launch_valorant():
    os.system(r'"C:\Riot Games\Riot Client\RiotClientServices.exe" --launch-product=valorant --launch-patchline=live')
    assign_valorant_to_job()

def monitor_new_exes():
    global monitored_pids, monitoring_active
    prev_pids = set(p.info['pid'] for p in psutil.process_iter(['pid']))
    while monitoring_active and not shutdown_event.is_set():
        current_pids = set(p.info['pid'] for p in psutil.process_iter(['pid']))
        new_pids = current_pids - prev_pids
        with monitored_lock:
            for pid in new_pids:
                try:
                    proc = psutil.Process(pid)
                    exe = proc.exe()
                    if exe:
                        monitored_pids.add(pid)
                except Exception:
                    continue
        prev_pids = current_pids
        time.sleep(0.5)

def start_monitoring_exes():
    global monitoring_active, monitor_thread, monitored_pids
    with monitored_lock:
        monitored_pids.clear()
        monitoring_active = True
        monitor_thread = threading.Thread(target=monitor_new_exes, daemon=True)
        monitor_thread.start()

def stop_monitoring_exes():
    global monitoring_active, monitor_thread
    monitoring_active = False
    if monitor_thread:
        monitor_thread.join(timeout=2)
        monitor_thread = None

def kill_monitored_exes():
    with monitored_lock:
        for pid in list(monitored_pids):
            try:
                proc = psutil.Process(pid)
                if proc.is_running():
                    proc.kill()
            except Exception:
                pass
        monitored_pids.clear()

def close_all_pipes():
    global pipe_handles
    for h in pipe_handles:
        try:
            win32file.CloseHandle(h)
        except Exception:
            pass
    pipe_handles.clear()

def start_with_emulate():
    global stopped_once, valorant_running, current_job
    stopped_once = False
    global shutdown_event
    shutdown_event = make_shutdown_event()
    close_all_pipes()
    if current_job:
        win32job.TerminateJobObject(current_job, 0)
        current_job.Close()
        current_job = None
    stop_and_restart_vgc()
    override_vgc_pipe()
    threading.Thread(target=create_named_pipe, daemon=True).start()
    start_monitoring_exes()
    threading.Thread(target=launch_valorant, daemon=True).start()
    valorant_running = True

def safe_exit():
    global valorant_running, current_job, stopped_once
    shutdown_event.set()
    stopped_once = False
    close_all_pipes()
    if current_job:
        win32job.TerminateJobObject(current_job, 0)
        current_job.Close()
        current_job = None
    os.system('taskkill /f /im VALORANT-Win64-Shipping.exe')
    os.system('sc stop vgc')
    valorant_running = False
    stop_monitoring_exes()
    kill_monitored_exes()

class ValorantBypassApp(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowFlags(Qt.WindowType.FramelessWindowHint)
        self.old_pos = None
        
        # KOYU KIRMIZI TEMA - 500x400 OPTİMİZE EDİLDİ
        self.setStyleSheet("""
            QWidget {
                background-color: #120000;
                border: 3px solid #660000;
                border-radius: 20px;
            }
            QPushButton {
                background-color: #2a0000;
                color: #ff3333;
                border: 2px solid #660000;
                border-radius: 12px;
                font-size: 20px;
                font-weight: bold;
                padding: 20px;
                margin-bottom: 15px;
            }
            QPushButton:hover {
                background-color: #440000;
                border: 2px solid #cc0000;
                color: #ffffff;
            }
            QLabel#StatusLabel {
                font-size: 36px;
                font-weight: bold;
                color: #cc0000;
                margin-top: 10px;
                margin-bottom: 20px;
                border: none;
            }
            QLabel#FooterLabel {
                font-size: 16px;
                font-weight: bold;
                color: #550000;
                margin-top: 5px;
                border: none;
            }
        """)

        self.layout = QVBoxLayout()
        self.layout.setContentsMargins(40, 40, 40, 40)

        # KAGEVIRO BAŞLIĞI
        self.status_label = QLabel("KAGEVIRO")
        self.status_label.setObjectName("StatusLabel")
        self.status_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
        self.layout.addWidget(self.status_label)

        self.layout.addStretch()

        # EMULATE BUTONU
        self.emulate_button = QPushButton("START WITH EMULATE")
        self.emulate_button.clicked.connect(self.start_with_emulate_ui)
        self.layout.addWidget(self.emulate_button)

        # SAFE EXIT BUTONU
        self.safe_exit_button = QPushButton("SAFE EXIT")
        self.safe_exit_button.clicked.connect(self.safe_exit_ui)
        self.layout.addWidget(self.safe_exit_button)

        self.layout.addStretch()

        # FOOTER / İMZA
        self.footer_label = QLabel("Owned by Kageviro")
        self.footer_label.setObjectName("FooterLabel")
        self.footer_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
        self.layout.addWidget(self.footer_label)

        self.setLayout(self.layout)

    def mousePressEvent(self, event):
        if event.button() == Qt.MouseButton.LeftButton:
            self.old_pos = event.globalPosition().toPoint()

    def mouseMoveEvent(self, event):
        if self.old_pos is not None:
            delta = event.globalPosition().toPoint() - self.old_pos
            self.move(self.x() + delta.x(), self.y() + delta.y())
            self.old_pos = event.globalPosition().toPoint()

    def mouseReleaseEvent(self, event):
        self.old_pos = None

    def start_with_emulate_ui(self):
        self.status_label.setText("LOADING...")
        threading.Thread(target=start_with_emulate, daemon=True).start()
        # Durumu simüle etmek için kısa gecikme
        QTimer.singleShot(4000, lambda: self.status_label.setText("ACTIVE"))

    def safe_exit_ui(self):
        self.status_label.setText("EXITING...")
        threading.Thread(target=safe_exit, daemon=True).start()
        QTimer.singleShot(2000, lambda: self.status_label.setText("KAGEVIRO"))

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = ValorantBypassApp()
    window.setFixedSize(500, 400) # Boyut 500x400 yapıldı
    window.show()
    sys.exit(app.exec())

normalde paylasmam arkın oldugu ıcın paylasdım .D
 
hocam bilmediğimden soruyorum bu ne işe yarar nasıl kullanabilirim exe haline getirip emulator olarak kullanabilir miyim mesela
 
beyler bı skm e yaramaz sadece py kolay acılıyor dıye

up
 
Python:
import sys
import os
import time
import threading
import psutil
import win32pipe
import win32file
import pywintypes
import win32con
import win32job
import win32api
from PyQt6.QtWidgets import (
    QApplication, QWidget, QPushButton, QVBoxLayout, QLabel, QSpacerItem, QSizePolicy
)
from PyQt6.QtCore import Qt, QTimer

pipe_name = r'\\.\pipe\933823D3-C77B-4BAE-89D7-A92B567236BC'
valorant_running = False
stopped_once = False
current_job = None
pipe_threads = []
pipe_handles = []
monitor_thread = None
monitored_pids = set()
monitored_lock = threading.Lock()
monitoring_active = False

def make_shutdown_event():
    return threading.Event()

shutdown_event = make_shutdown_event()

def stop_and_restart_vgc():
    os.system('sc stop vgc')
    time.sleep(0.5)
    os.system('sc start vgc')
    time.sleep(0.5)

def override_vgc_pipe():
    try:
        pipe = win32file.CreateFile(
            pipe_name,
            win32con.GENERIC_READ | win32con.GENERIC_WRITE,
            0, None, win32con.OPEN_EXISTING, 0, None)
        win32file.CloseHandle(pipe)
    except Exception:
        pass

def handle_client(pipe):
    global stopped_once
    try:
        while not shutdown_event.is_set():
            try:
                data = win32file.ReadFile(pipe, 4096)
                if data:
                    if not stopped_once:
                        os.system('sc stop vgc')
                        try:
                            import winsound
                            winsound.Beep(1000, 500)
                        except:
                            pass
                        stopped_once = True
                    win32file.WriteFile(pipe, data[1])
            except pywintypes.error as e:
                if e.winerror == 109:
                    break
                time.sleep(0.1)
    finally:
        try:
            win32file.CloseHandle(pipe)
        except Exception:
            pass

def create_named_pipe():
    global pipe_handles
    while not shutdown_event.is_set():
        try:
            pipe = win32pipe.CreateNamedPipe(
                pipe_name,
                win32con.PIPE_ACCESS_DUPLEX,
                win32con.PIPE_TYPE_MESSAGE | win32con.PIPE_WAIT,
                win32con.PIPE_UNLIMITED_INSTANCES,
                1048576, 1048576, 500, None)
            pipe_handles.append(pipe)
            win32pipe.ConnectNamedPipe(pipe, None)
            t = threading.Thread(target=handle_client, args=(pipe,), daemon=True)
            t.start()
            pipe_threads.append(t)
        except Exception:
            time.sleep(1)

def create_job_object():
    job = win32job.CreateJobObject(None, "")
    extended_info = win32job.QueryInformationJobObject(job, win32job.JobObjectExtendedLimitInformation)
    extended_info['BasicLimitInformation']['LimitFlags'] |= win32job.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
    win32job.SetInformationJobObject(job, win32job.JobObjectExtendedLimitInformation, extended_info)
    return job

def assign_valorant_to_job():
    global current_job
    if current_job:
        win32job.TerminateJobObject(current_job, 0)
        current_job.Close()
        current_job = None
    time.sleep(2)
    current_job = create_job_object()
    found = False
    while not found and not shutdown_event.is_set():
        for proc in psutil.process_iter(['pid', 'name']):
            try:
                if proc.info['name'] and "VALORANT-Win64-Shipping.exe" in proc.info['name']:
                    h_process = win32api.OpenProcess(win32con.PROCESS_ALL_ACCESS, False, proc.info['pid'])
                    win32job.AssignProcessToJobObject(current_job, h_process)
                    found = True
                    break
            except (psutil.NoSuchProcess, psutil.AccessDenied):
                continue
        if not found:
            time.sleep(1)

def launch_valorant():
    os.system(r'"C:\Riot Games\Riot Client\RiotClientServices.exe" --launch-product=valorant --launch-patchline=live')
    assign_valorant_to_job()

def monitor_new_exes():
    global monitored_pids, monitoring_active
    prev_pids = set(p.info['pid'] for p in psutil.process_iter(['pid']))
    while monitoring_active and not shutdown_event.is_set():
        current_pids = set(p.info['pid'] for p in psutil.process_iter(['pid']))
        new_pids = current_pids - prev_pids
        with monitored_lock:
            for pid in new_pids:
                try:
                    proc = psutil.Process(pid)
                    exe = proc.exe()
                    if exe:
                        monitored_pids.add(pid)
                except Exception:
                    continue
        prev_pids = current_pids
        time.sleep(0.5)

def start_monitoring_exes():
    global monitoring_active, monitor_thread, monitored_pids
    with monitored_lock:
        monitored_pids.clear()
        monitoring_active = True
        monitor_thread = threading.Thread(target=monitor_new_exes, daemon=True)
        monitor_thread.start()

def stop_monitoring_exes():
    global monitoring_active, monitor_thread
    monitoring_active = False
    if monitor_thread:
        monitor_thread.join(timeout=2)
        monitor_thread = None

def kill_monitored_exes():
    with monitored_lock:
        for pid in list(monitored_pids):
            try:
                proc = psutil.Process(pid)
                if proc.is_running():
                    proc.kill()
            except Exception:
                pass
        monitored_pids.clear()

def close_all_pipes():
    global pipe_handles
    for h in pipe_handles:
        try:
            win32file.CloseHandle(h)
        except Exception:
            pass
    pipe_handles.clear()

def start_with_emulate():
    global stopped_once, valorant_running, current_job
    stopped_once = False
    global shutdown_event
    shutdown_event = make_shutdown_event()
    close_all_pipes()
    if current_job:
        win32job.TerminateJobObject(current_job, 0)
        current_job.Close()
        current_job = None
    stop_and_restart_vgc()
    override_vgc_pipe()
    threading.Thread(target=create_named_pipe, daemon=True).start()
    start_monitoring_exes()
    threading.Thread(target=launch_valorant, daemon=True).start()
    valorant_running = True

def safe_exit():
    global valorant_running, current_job, stopped_once
    shutdown_event.set()
    stopped_once = False
    close_all_pipes()
    if current_job:
        win32job.TerminateJobObject(current_job, 0)
        current_job.Close()
        current_job = None
    os.system('taskkill /f /im VALORANT-Win64-Shipping.exe')
    os.system('sc stop vgc')
    valorant_running = False
    stop_monitoring_exes()
    kill_monitored_exes()

class ValorantBypassApp(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowFlags(Qt.WindowType.FramelessWindowHint)
        self.old_pos = None
       
        # KOYU KIRMIZI TEMA - 500x400 OPTİMİZE EDİLDİ
        self.setStyleSheet("""
            QWidget {
                background-color: #120000;
                border: 3px solid #660000;
                border-radius: 20px;
            }
            QPushButton {
                background-color: #2a0000;
                color: #ff3333;
                border: 2px solid #660000;
                border-radius: 12px;
                font-size: 20px;
                font-weight: bold;
                padding: 20px;
                margin-bottom: 15px;
            }
            QPushButton:hover {
                background-color: #440000;
                border: 2px solid #cc0000;
                color: #ffffff;
            }
            QLabel#StatusLabel {
                font-size: 36px;
                font-weight: bold;
                color: #cc0000;
                margin-top: 10px;
                margin-bottom: 20px;
                border: none;
            }
            QLabel#FooterLabel {
                font-size: 16px;
                font-weight: bold;
                color: #550000;
                margin-top: 5px;
                border: none;
            }
        """)

        self.layout = QVBoxLayout()
        self.layout.setContentsMargins(40, 40, 40, 40)

        # KAGEVIRO BAŞLIĞI
        self.status_label = QLabel("KAGEVIRO")
        self.status_label.setObjectName("StatusLabel")
        self.status_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
        self.layout.addWidget(self.status_label)

        self.layout.addStretch()

        # EMULATE BUTONU
        self.emulate_button = QPushButton("START WITH EMULATE")
        self.emulate_button.clicked.connect(self.start_with_emulate_ui)
        self.layout.addWidget(self.emulate_button)

        # SAFE EXIT BUTONU
        self.safe_exit_button = QPushButton("SAFE EXIT")
        self.safe_exit_button.clicked.connect(self.safe_exit_ui)
        self.layout.addWidget(self.safe_exit_button)

        self.layout.addStretch()

        # FOOTER / İMZA
        self.footer_label = QLabel("Owned by Kageviro")
        self.footer_label.setObjectName("FooterLabel")
        self.footer_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
        self.layout.addWidget(self.footer_label)

        self.setLayout(self.layout)

    def mousePressEvent(self, event):
        if event.button() == Qt.MouseButton.LeftButton:
            self.old_pos = event.globalPosition().toPoint()

    def mouseMoveEvent(self, event):
        if self.old_pos is not None:
            delta = event.globalPosition().toPoint() - self.old_pos
            self.move(self.x() + delta.x(), self.y() + delta.y())
            self.old_pos = event.globalPosition().toPoint()

    def mouseReleaseEvent(self, event):
        self.old_pos = None

    def start_with_emulate_ui(self):
        self.status_label.setText("LOADING...")
        threading.Thread(target=start_with_emulate, daemon=True).start()
        # Durumu simüle etmek için kısa gecikme
        QTimer.singleShot(4000, lambda: self.status_label.setText("ACTIVE"))

    def safe_exit_ui(self):
        self.status_label.setText("EXITING...")
        threading.Thread(target=safe_exit, daemon=True).start()
        QTimer.singleShot(2000, lambda: self.status_label.setText("KAGEVIRO"))

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = ValorantBypassApp()
    window.setFixedSize(500, 400) # Boyut 500x400 yapıldı
    window.show()
    sys.exit(app.exec())

normalde paylasmam arkın oldugu ıcın paylasdım .D
paylasıldı bu amk pastelenmıs ama sanırım
 

Şuanda konuyu görüntüleyen kullanıcılar

Geri
Üst Alt