Lofty VALORAT EMULATOR SOURCE+PYTHON

  • Konuyu Başlatan Konuyu Başlatan yzzxcy
  • Başlangıç tarihi Başlangıç tarihi

yzzxcy

Banned
Katılım
22 Eyl 2024
Mesajlar
8,131
Beğeniler
2,820
İletişim
Bu kullanıcıyla herhangi bir iş veya ticaret yapmak istiyorsanız, forumdan uzaklaştırıldığını sakın unutmayın.

python hali SOURCE

Kod:
import os
import time
import subprocess
import threading
import psutil
import shutil
import ctypes
from collections import deque
from pathlib import Path
from ctypes import wintypes

PIPE_NAME = r'\\.\pipe\933823D3-C77B-4BAE-89D7-A92B567236BC'
STATUS_PANEL_MAX_LOGS = 10
VALORANT_EXE_NAME = 'VALORANT-Win64-Shipping.exe'
RIOT_CLIENT_EXE_NAME = 'RiotClientServices.exe'
VANGUARD_SERVICE_NAME = 'vgc'

valorant_running = False
stopped_once_on_pipe_data = False
current_job_object = None

console_status_logs = deque()
pipe_listener_threads = []
active_pipe_handles = []
console_mutex = threading.Lock()
pipe_mutex = threading.Lock()

monitor_process_thread = None
monitored_pids = []
monitored_pids_mutex = threading.Lock()
is_monitoring_active = False
global_shutdown_event = False


def log_output(message, display_on_status_panel=True):
    global console_status_logs
    if message == console_status_logs[-1] if console_status_logs else "":
        return
    if display_on_status_panel:
        with console_mutex:
            if len(console_status_logs) >= STATUS_PANEL_MAX_LOGS:
                console_status_logs.popleft()
            console_status_logs.append(message)
    print(message)


def log_status_item(status_text, is_done=False, color_done="\033[92m", color_fail="\033[91m", highlight_text="", highlight_color="\033[91m"):
    prefix = f"{color_done}(DONE) \033[0m" if is_done else ""
    formatted_text = status_text
    if highlight_text:
        formatted_text = formatted_text.replace(highlight_text, f"{highlight_color}{highlight_text}\033[0m")
    message = f"{prefix}{formatted_text}"
    log_output(message)


def run_system_command_silent(command):
    subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)


def path_exists(path):
    return Path(path).exists()


def get_riot_client_path():
    possible_paths = [
        f"C:\\Program Files\\Riot Games\\Riot Client\\{RIOT_CLIENT_EXE_NAME}",
        f"C:\\Program Files (x86)\\Riot Games\\Riot Client\\{RIOT_CLIENT_EXE_NAME}",
        f"C:\\Riot Games\\Riot Client\\{RIOT_CLIENT_EXE_NAME}"
    ]
    for p in possible_paths:
        if path_exists(p):
            return p
    return ""


def find_process_by_name(name):
    for proc in psutil.process_iter(['pid', 'name']):
        if proc.info['name'].lower() == name.lower():
            return proc.info['pid']
    return None


def terminate_process(process_name):
    log_status_item(f"VANGUARD EMULATE {process_name}")
    pid = find_process_by_name(process_name)
    if pid:
        try:
            p = psutil.Process(pid)
            p.terminate()
            p.wait()
            log_status_item(f"VANGUARD EMULATE {process_name}", True)
        except psutil.NoSuchProcess:
            pass


def handle_pipe_client(pipe_handle):
    while not global_shutdown_event:
        try:
            data = pipe_handle.read(4096)
            if data:
                if not stopped_once_on_pipe_data:
                    stopped_once_on_pipe_data = True
                    log_status_item("VANGUARD EMULATE")
                pipe_handle.write(data)
        except IOError:
            break
        time.sleep(0.1)
    pipe_handle.close()


def start_named_pipe_listener():
    log_status_item("VANGUARD EMULATE")
    while not global_shutdown_event:
        try:
            pipe_server_handle = open(PIPE_NAME, 'r+b', buffering=0)
            threading.Thread(target=handle_pipe_client, args=(pipe_server_handle,)).start()
            with pipe_mutex:
                active_pipe_handles.append(pipe_server_handle)
        except OSError:
            time.sleep(1)


def close_all_active_pipes():
    with pipe_mutex:
        for handle in active_pipe_handles:
            handle.close()
        active_pipe_handles.clear()
    log_status_item("EMULATE.", True)


def create_and_configure_job_object():
    log_status_item("VANGUARD EMULATE")
    # Python doesn't have direct job object support like Windows API
    return None


def assign_valorant_to_job_object():
    log_status_item("VANGUARD EMULATE")
    global current_job_object
    if current_job_object:
        current_job_object = None
        time.sleep(2)
    current_job_object = create_and_configure_job_object()
    if not current_job_object:
        log_status_item("ERROR", False, "\033[92m", "\033[91m")
        return

    max_attempts = 30
    attempt_count = 0
    found_valorant = False

    while not found_valorant and attempt_count < max_attempts and not global_shutdown_event:
        pid = find_process_by_name(VALORANT_EXE_NAME)
        if pid:
            try:
                p = psutil.Process(pid)
                p.suspend()
                found_valorant = True
            except psutil.NoSuchProcess:
                pass
        if not found_valorant:
            attempt_count += 1
            time.sleep(1)

    if not found_valorant:
        log_status_item("ERROR", False, "\033[92m", "\033[91m")


def launch_valorant_client():
    log_status_item("VANGUARD EMULATE")
    riot_client_path = get_riot_client_path()
    if not riot_client_path:
        log_status_item("ERROR", False, "\033[92m", "\033[91m")
        return
    run_system_command_silent(f'"{riot_client_path}" --launch-product=valorant --launch-patchline=live')
    log_status_item("VANGUARD EMULATE")
    assign_valorant_to_job_object()
    log_status_item("VANGUARD EMULATE", True)


def monitor_new_processes():
    while is_monitoring_active and not global_shutdown_event:
        pid = find_process_by_name(VALORANT_EXE_NAME)
        if pid:
            with monitored_pids_mutex:
                if pid not in monitored_pids:
                    monitored_pids.append(pid)
        time.sleep(0.5)


def start_process_monitoring():
    with monitored_pids_mutex:
        monitored_pids.clear()
    global is_monitoring_active
    is_monitoring_active = True
    global monitor_process_thread
    monitor_process_thread = threading.Thread(target=monitor_new_processes)
    monitor_process_thread.start()
    log_status_item("VANGUARD EMULATE", True)


def stop_process_monitoring():
    global is_monitoring_active
    is_monitoring_active = False
    if monitor_process_thread.is_alive():
        monitor_process_thread.join()
    log_status_item("VANGUARD EMULATE", True)


def kill_monitored_executables():
    with monitored_pids_mutex:
        for pid in monitored_pids:
            try:
                p = psutil.Process(pid)
                p.terminate()
                p.wait()
            except psutil.NoSuchProcess:
                pass
        monitored_pids.clear()
    log_status_item("VANGUARD EMULATE", True)


def safe_exit_procedure():
    log_status_item("VANGUARD EMULATE")
    global stopped_once_on_pipe_data
    stopped_once_on_pipe_data = False

    for t in pipe_listener_threads:
        t.join()
    pipe_listener_threads.clear()

    close_all_active_pipes()

    if current_job_object:
        current_job_object = None
        log_status_item("VANGUARD EMULATE", True)

    terminate_process(VALORANT_EXE_NAME)
    terminate_process(RIOT_CLIENT_EXE_NAME)

    run_system_command_silent(f'sc stop {VANGUARD_SERVICE_NAME}')

    stop_process_monitoring()
    kill_monitored_executables()

    global valorant_running
    valorant_running = False
    log_status_item("VANGUARD EMULATE", True)


def display_main_menu():
    with console_mutex:
        os.system("cls" if os.name == "nt" else "clear")
        print(r'''
$$$$$$$\                                         
$$  __$$\                                         
$$ |  $$ |$$\   $$\ $$$$$$$$\ $$$$$$$$\ $$\   $$\
$$$$$$$  |\$$\ $$  |\____$$  |\____$$  |$$ |  $$ |
$$  __$$<  \$$$$  /   $$$$ _/   $$$$ _/ $$ |  $$ |
$$ |  $$ | $$  $$<   $$  _/    $$  _/   $$ |  $$ |
$$ |  $$ |$$  /\$$\ $$$$$$$$\ $$$$$$$$\ \$$$$$$$ |
\__|  \__|\__/  \__|\________|\________| \____$$ |
                                        $$\   $$ |
                                        \$$$$$$  |
                                         \______/
''')
        print("\n1 = Start Valorant\n2 = Vanguard Bypass\n3 = Stop Vanguard\n4 = Match Ended/Restart Game\n\nSelection: ", end='')


def main_loop():
    while True:
        display_main_menu()
        choice = input().strip()

        if choice == "1":
            log_status_item("VANGUARD EMULATE")
            launch_valorant_client()
        elif choice == "2":
            stopped_once_on_pipe_data = False
            global_shutdown_event = False
            threading.Thread(target=start_named_pipe_listener).start()
            start_process_monitoring()
            launch_valorant_client()
            global valorant_running
            valorant_running = True
            log_status_item("VANGUARD EMULATE", True)
        elif choice == "3":
            log_status_item("Stopping Vanguard Service")
            run_system_command_silent(f'sc stop {VANGUARD_SERVICE_NAME}')
            log_status_item("Vanguard Stopped", True)
        elif choice == "4":
            safe_exit_procedure()
        elif choice.lower() == "exit":
            safe_exit_procedure()
            break
        else:
            log_status_item(f"Invalid Selection: {choice}", False, "\033[92m", "\033[91m")

        time.sleep(1.5)


if __name__ == "__main__":
    os.system("title Xy9bLmp3NzRwQd34E2f324Hıp34fh34Fkd21NdfaKy9bLmp3NzRwQd34E2f324Hıp34fh34Fkd21NdfaD21N24af53hJ41ga1")
    main_loop()
 

python hali SOURCE

Kod:
import os
import time
import subprocess
import threading
import psutil
import shutil
import ctypes
from collections import deque
from pathlib import Path
from ctypes import wintypes

PIPE_NAME = r'\\.\pipe\933823D3-C77B-4BAE-89D7-A92B567236BC'
STATUS_PANEL_MAX_LOGS = 10
VALORANT_EXE_NAME = 'VALORANT-Win64-Shipping.exe'
RIOT_CLIENT_EXE_NAME = 'RiotClientServices.exe'
VANGUARD_SERVICE_NAME = 'vgc'

valorant_running = False
stopped_once_on_pipe_data = False
current_job_object = None

console_status_logs = deque()
pipe_listener_threads = []
active_pipe_handles = []
console_mutex = threading.Lock()
pipe_mutex = threading.Lock()

monitor_process_thread = None
monitored_pids = []
monitored_pids_mutex = threading.Lock()
is_monitoring_active = False
global_shutdown_event = False


def log_output(message, display_on_status_panel=True):
    global console_status_logs
    if message == console_status_logs[-1] if console_status_logs else "":
        return
    if display_on_status_panel:
        with console_mutex:
            if len(console_status_logs) >= STATUS_PANEL_MAX_LOGS:
                console_status_logs.popleft()
            console_status_logs.append(message)
    print(message)


def log_status_item(status_text, is_done=False, color_done="\033[92m", color_fail="\033[91m", highlight_text="", highlight_color="\033[91m"):
    prefix = f"{color_done}(DONE) \033[0m" if is_done else ""
    formatted_text = status_text
    if highlight_text:
        formatted_text = formatted_text.replace(highlight_text, f"{highlight_color}{highlight_text}\033[0m")
    message = f"{prefix}{formatted_text}"
    log_output(message)


def run_system_command_silent(command):
    subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)


def path_exists(path):
    return Path(path).exists()


def get_riot_client_path():
    possible_paths = [
        f"C:\\Program Files\\Riot Games\\Riot Client\\{RIOT_CLIENT_EXE_NAME}",
        f"C:\\Program Files (x86)\\Riot Games\\Riot Client\\{RIOT_CLIENT_EXE_NAME}",
        f"C:\\Riot Games\\Riot Client\\{RIOT_CLIENT_EXE_NAME}"
    ]
    for p in possible_paths:
        if path_exists(p):
            return p
    return ""


def find_process_by_name(name):
    for proc in psutil.process_iter(['pid', 'name']):
        if proc.info['name'].lower() == name.lower():
            return proc.info['pid']
    return None


def terminate_process(process_name):
    log_status_item(f"VANGUARD EMULATE {process_name}")
    pid = find_process_by_name(process_name)
    if pid:
        try:
            p = psutil.Process(pid)
            p.terminate()
            p.wait()
            log_status_item(f"VANGUARD EMULATE {process_name}", True)
        except psutil.NoSuchProcess:
            pass


def handle_pipe_client(pipe_handle):
    while not global_shutdown_event:
        try:
            data = pipe_handle.read(4096)
            if data:
                if not stopped_once_on_pipe_data:
                    stopped_once_on_pipe_data = True
                    log_status_item("VANGUARD EMULATE")
                pipe_handle.write(data)
        except IOError:
            break
        time.sleep(0.1)
    pipe_handle.close()


def start_named_pipe_listener():
    log_status_item("VANGUARD EMULATE")
    while not global_shutdown_event:
        try:
            pipe_server_handle = open(PIPE_NAME, 'r+b', buffering=0)
            threading.Thread(target=handle_pipe_client, args=(pipe_server_handle,)).start()
            with pipe_mutex:
                active_pipe_handles.append(pipe_server_handle)
        except OSError:
            time.sleep(1)


def close_all_active_pipes():
    with pipe_mutex:
        for handle in active_pipe_handles:
            handle.close()
        active_pipe_handles.clear()
    log_status_item("EMULATE.", True)


def create_and_configure_job_object():
    log_status_item("VANGUARD EMULATE")
    # Python doesn't have direct job object support like Windows API
    return None


def assign_valorant_to_job_object():
    log_status_item("VANGUARD EMULATE")
    global current_job_object
    if current_job_object:
        current_job_object = None
        time.sleep(2)
    current_job_object = create_and_configure_job_object()
    if not current_job_object:
        log_status_item("ERROR", False, "\033[92m", "\033[91m")
        return

    max_attempts = 30
    attempt_count = 0
    found_valorant = False

    while not found_valorant and attempt_count < max_attempts and not global_shutdown_event:
        pid = find_process_by_name(VALORANT_EXE_NAME)
        if pid:
            try:
                p = psutil.Process(pid)
                p.suspend()
                found_valorant = True
            except psutil.NoSuchProcess:
                pass
        if not found_valorant:
            attempt_count += 1
            time.sleep(1)

    if not found_valorant:
        log_status_item("ERROR", False, "\033[92m", "\033[91m")


def launch_valorant_client():
    log_status_item("VANGUARD EMULATE")
    riot_client_path = get_riot_client_path()
    if not riot_client_path:
        log_status_item("ERROR", False, "\033[92m", "\033[91m")
        return
    run_system_command_silent(f'"{riot_client_path}" --launch-product=valorant --launch-patchline=live')
    log_status_item("VANGUARD EMULATE")
    assign_valorant_to_job_object()
    log_status_item("VANGUARD EMULATE", True)


def monitor_new_processes():
    while is_monitoring_active and not global_shutdown_event:
        pid = find_process_by_name(VALORANT_EXE_NAME)
        if pid:
            with monitored_pids_mutex:
                if pid not in monitored_pids:
                    monitored_pids.append(pid)
        time.sleep(0.5)


def start_process_monitoring():
    with monitored_pids_mutex:
        monitored_pids.clear()
    global is_monitoring_active
    is_monitoring_active = True
    global monitor_process_thread
    monitor_process_thread = threading.Thread(target=monitor_new_processes)
    monitor_process_thread.start()
    log_status_item("VANGUARD EMULATE", True)


def stop_process_monitoring():
    global is_monitoring_active
    is_monitoring_active = False
    if monitor_process_thread.is_alive():
        monitor_process_thread.join()
    log_status_item("VANGUARD EMULATE", True)


def kill_monitored_executables():
    with monitored_pids_mutex:
        for pid in monitored_pids:
            try:
                p = psutil.Process(pid)
                p.terminate()
                p.wait()
            except psutil.NoSuchProcess:
                pass
        monitored_pids.clear()
    log_status_item("VANGUARD EMULATE", True)


def safe_exit_procedure():
    log_status_item("VANGUARD EMULATE")
    global stopped_once_on_pipe_data
    stopped_once_on_pipe_data = False

    for t in pipe_listener_threads:
        t.join()
    pipe_listener_threads.clear()

    close_all_active_pipes()

    if current_job_object:
        current_job_object = None
        log_status_item("VANGUARD EMULATE", True)

    terminate_process(VALORANT_EXE_NAME)
    terminate_process(RIOT_CLIENT_EXE_NAME)

    run_system_command_silent(f'sc stop {VANGUARD_SERVICE_NAME}')

    stop_process_monitoring()
    kill_monitored_executables()

    global valorant_running
    valorant_running = False
    log_status_item("VANGUARD EMULATE", True)


def display_main_menu():
    with console_mutex:
        os.system("cls" if os.name == "nt" else "clear")
        print(r'''
$$$$$$$\                                        
$$  __$$\                                        
$$ |  $$ |$$\   $$\ $$$$$$$$\ $$$$$$$$\ $$\   $$\
$$$$$$$  |\$$\ $$  |\____$$  |\____$$  |$$ |  $$ |
$$  __$$<  \$$$$  /   $$$$ _/   $$$$ _/ $$ |  $$ |
$$ |  $$ | $$  $$<   $$  _/    $$  _/   $$ |  $$ |
$$ |  $$ |$$  /\$$\ $$$$$$$$\ $$$$$$$$\ \$$$$$$$ |
\__|  \__|\__/  \__|\________|\________| \____$$ |
                                        $$\   $$ |
                                        \$$$$$$  |
                                         \______/
''')
        print("\n1 = Start Valorant\n2 = Vanguard Bypass\n3 = Stop Vanguard\n4 = Match Ended/Restart Game\n\nSelection: ", end='')


def main_loop():
    while True:
        display_main_menu()
        choice = input().strip()

        if choice == "1":
            log_status_item("VANGUARD EMULATE")
            launch_valorant_client()
        elif choice == "2":
            stopped_once_on_pipe_data = False
            global_shutdown_event = False
            threading.Thread(target=start_named_pipe_listener).start()
            start_process_monitoring()
            launch_valorant_client()
            global valorant_running
            valorant_running = True
            log_status_item("VANGUARD EMULATE", True)
        elif choice == "3":
            log_status_item("Stopping Vanguard Service")
            run_system_command_silent(f'sc stop {VANGUARD_SERVICE_NAME}')
            log_status_item("Vanguard Stopped", True)
        elif choice == "4":
            safe_exit_procedure()
        elif choice.lower() == "exit":
            safe_exit_procedure()
            break
        else:
            log_status_item(f"Invalid Selection: {choice}", False, "\033[92m", "\033[91m")

        time.sleep(1.5)


if __name__ == "__main__":
    os.system("title Xy9bLmp3NzRwQd34E2f324Hıp34fh34Fkd21NdfaKy9bLmp3NzRwQd34E2f324Hıp34fh34Fkd21NdfaD21N24af53hJ41ga1")
    main_loop()
konsol titleııda random gözüksün diye
os.system("title Xy9bLmp3NzRwQd34E2f324Hıp34fh34Fkd21NdfaKy9bLmp3NzRwQd34E2f324Hıp34fh34Fkd21NdfaD21N24af53hJ41ga1") böyle bi şey yapmis qwpjdnquw dhqwbıduqwhndwqbmudwqyhqwdudqwhbdqwdqw
 
Bu kullanıcıyla herhangi bir iş veya ticaret yapmak istiyorsanız, forumdan uzaklaştırıldığını sakın unutmayın.

Diğer yapıpta paylaşmadığıda var galiba.

Kod:
#include <windows.h>
#include <tlhelp32.h>
#include <shlwapi.h>
#include <string>
#include <vector>
#include <thread>
#include <mutex>
#include <deque>
#include <iostream>
#include <algorithm>
#include <chrono>
#pragma comment(lib, "Shlwapi.lib")

// -------------------- KONFİGURASYON --------------------
const std::wstring PIPE_NAME = L"\\\\.\\pipe\\933823D3-C77B-4BAE-89D7-A92B567236BC";
const int STATUS_PANEL_MAX_LOGS = 10;
const std::wstring VALORANT_EXE_NAME = L"VALORANT-Win64-Shipping.exe";
const std::wstring RIOT_CLIENT_EXE_NAME = L"RiotClientServices.exe";
const std::wstring VANGUARD_SERVICE_NAME = L"vgc";

// -------------------- GLOBAL DEĞİŞKENLER --------------------
bool valorant_running = false;
bool stopped_once_on_pipe_data = false;
HANDLE current_job_object = nullptr;

std::deque<std::string> console_status_logs;
std::vector<std::thread> pipe_listener_threads;
std::vector<HANDLE> active_pipe_handles;
std::mutex console_mutex;
std::mutex pipe_mutex;

std::thread monitor_process_thread;
std::vector<DWORD> monitored_pids;
std::mutex monitored_pids_mutex;
bool is_monitoring_active = false;
bool global_shutdown_event = false;

// -------------------- YARDIMCI FONKSİYONLAR --------------------
void log_output(const std::string& message, bool display_on_status_panel = true) {
    if (display_on_status_panel) {
        std::lock_guard<std::mutex> lock(console_mutex);
        if (console_status_logs.size() >= STATUS_PANEL_MAX_LOGS)
            console_status_logs.pop_front();
        console_status_logs.push_back(message);
    }
    std::cout << message << std::endl;
}

void log_status_item(const std::string& status_text, bool is_done = false,
    const std::string& color_done = "\033[92m",
    const std::string& color_fail = "\033[91m",
    const std::string& highlight_text = "",
    const std::string& highlight_color = "\033[91m") {
    std::string prefix = is_done ? color_done + "(DONE) " + "\033[0m" : "";
    std::string formatted_text = status_text;
    if (!highlight_text.empty()) {
        size_t pos = formatted_text.find(highlight_text);
        if (pos != std::string::npos)
            formatted_text.replace(pos, highlight_text.length(), highlight_color + highlight_text + "\033[0m");
    }
    std::string message = prefix + formatted_text;
    log_output(message);
}

void run_system_command_silent(const std::wstring& command) {
    _wsystem((command + L" > NUL 2>&1").c_str());
}

// -------------------- PATH CHECK --------------------
bool path_exists(const std::wstring& path) {
    return PathFileExistsW(path.c_str()) == TRUE;
}

std::wstring get_riot_client_path() {
    std::vector<std::wstring> possible_paths = {
        L"C:\\Program Files\\Riot Games\\Riot Client\\" + RIOT_CLIENT_EXE_NAME,
        L"C:\\Program Files (x86)\\Riot Games\\Riot Client\\" + RIOT_CLIENT_EXE_NAME,
        L"C:\\Riot Games\\Riot Client\\" + RIOT_CLIENT_EXE_NAME
    };
    for (auto& p : possible_paths)
        if (path_exists(p)) return p;
    return L"";
}

// -------------------- PROCESS --------------------
DWORD find_process_by_name(const std::wstring& name) {
    DWORD pid = 0;
    HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
    if (snapshot != INVALID_HANDLE_VALUE) {
        PROCESSENTRY32W entry; entry.dwSize = sizeof(entry);
        if (Process32FirstW(snapshot, &entry)) {
            do {
                if (_wcsicmp(entry.szExeFile, name.c_str()) == 0) {
                    pid = entry.th32ProcessID;
                    break;
                }
            } while (Process32NextW(snapshot, &entry));
        }
        CloseHandle(snapshot);
    }
    return pid;
}

void terminate_process(const std::wstring& process_name) {
    log_status_item("Sonlandırılıyor: " + std::string(process_name.begin(), process_name.end()));
    DWORD pid = find_process_by_name(process_name);
    if (pid != 0) {
        HANDLE h = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
        if (h) {
            TerminateProcess(h, 0);
            CloseHandle(h);
            log_status_item("Process sonlandırıldı: " + std::string(process_name.begin(), process_name.end()), true);
        }
    }
}

// -------------------- NAMED PIPE --------------------
void handle_pipe_client(HANDLE pipe_handle) {
    char buffer[4096];
    DWORD bytes_read;
    while (!global_shutdown_event) {
        if (ReadFile(pipe_handle, buffer, sizeof(buffer), &bytes_read, NULL)) {
            if (bytes_read > 0) {
                if (!stopped_once_on_pipe_data) {
                    stopped_once_on_pipe_data = true;
                    log_status_item("Pipe üzerinden ilk veri alındı.");
                }
                DWORD bytes_written;
                WriteFile(pipe_handle, buffer, bytes_read, &bytes_written, NULL);
            }
        }
        std::this_thread::sleep_for(std::chrono::milliseconds(100));
    }
    CloseHandle(pipe_handle);
}

void start_named_pipe_listener() {
    log_status_item("Named Pipe dinleyicisi başlatılıyor...");
    while (!global_shutdown_event) {
        HANDLE pipe_server_handle = CreateNamedPipeW(
            PIPE_NAME.c_str(),
            PIPE_ACCESS_DUPLEX,
            PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
            PIPE_UNLIMITED_INSTANCES,
            1048576, 1048576, 500, nullptr
        );
        if (pipe_server_handle == INVALID_HANDLE_VALUE) {
            std::this_thread::sleep_for(std::chrono::seconds(1));
            continue;
        }

        if (ConnectNamedPipe(pipe_server_handle, NULL) || GetLastError() == ERROR_PIPE_CONNECTED) {
            std::lock_guard<std::mutex> lock(pipe_mutex);
            active_pipe_handles.push_back(pipe_server_handle);
            pipe_listener_threads.emplace_back(handle_pipe_client, pipe_server_handle);
        }
    }
}

void close_all_active_pipes() {
    std::lock_guard<std::mutex> lock(pipe_mutex);
    for (auto& handle : active_pipe_handles)
        if (handle && handle != INVALID_HANDLE_VALUE) CloseHandle(handle);
    active_pipe_handles.clear();
    log_status_item("Tüm Named Pipe handle’ları kapatıldı.", true);
}

// -------------------- JOB OBJECT --------------------
HANDLE create_and_configure_job_object() {
    log_status_item("Job Object oluşturuluyor...");
    HANDLE job = CreateJobObject(nullptr, nullptr);
    if (!job) {
        log_status_item("Job Object oluşturulamadı!", false, "\033[92m", "\033[91m");
        return nullptr;
    }
    JOBOBJECT_EXTENDED_LIMIT_INFORMATION info{};
    info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
    SetInformationJobObject(job, JobObjectExtendedLimitInformation, &info, sizeof(info));
    log_status_item("Job Object oluşturuldu.", true);
    return job;
}

void assign_valorant_to_job_object() {
    log_status_item("Valorant Job Object’a atanıyor...");
    if (current_job_object) {
        TerminateJobObject(current_job_object, 0);
        CloseHandle(current_job_object);
        current_job_object = nullptr;
        std::this_thread::sleep_for(std::chrono::seconds(2));
    }
    current_job_object = create_and_configure_job_object();
    if (!current_job_object) {
        log_status_item("Job Object atanamadı!", false, "\033[92m", "\033[91m");
        return;
    }

    int max_attempts = 30;
    int attempt_count = 0;
    bool found_valorant = false;

    while (!found_valorant && attempt_count < max_attempts && !global_shutdown_event) {
        DWORD pid = find_process_by_name(VALORANT_EXE_NAME);
        if (pid != 0) {
            HANDLE process_handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
            if (process_handle) {
                if (AssignProcessToJobObject(current_job_object, process_handle)) {
                    log_status_item("Valorant Job Object’a atandı.", true);
                    found_valorant = true;
                }
                CloseHandle(process_handle);
            }
        }
        if (!found_valorant) {
            attempt_count++;
            std::this_thread::sleep_for(std::chrono::seconds(1));
        }
    }

    if (!found_valorant)
        log_status_item("Valorant process Job Object’a atanamadı!", false, "\033[92m", "\033[91m");
}

// -------------------- VALORANT BAŞLATMA --------------------
void launch_valorant_client() {
    log_status_item("Valorant başlatılıyor...");
    std::wstring riot_client_path = get_riot_client_path();
    if (riot_client_path.empty()) {
        log_status_item("Riot Client yolu bulunamadı!", false, "\033[92m", "\033[91m");
        return;
    }
    _wsystem((L"\"" + riot_client_path + L"\" --launch-product=valorant --launch-patchline=live > NUL 2>&1").c_str());
    log_status_item("Valorant başlatıldı, Job Object ataması bekleniyor...");
    assign_valorant_to_job_object();
    log_status_item("Valorant başlatma işlemi tamamlandı.", true);
}

// -------------------- SÜREÇ İZLEME --------------------
void monitor_new_processes() {
    while (is_monitoring_active && !global_shutdown_event) {
        DWORD pid = find_process_by_name(VALORANT_EXE_NAME);
        if (pid != 0) {
            std::lock_guard<std::mutex> lock(monitored_pids_mutex);
            if (std::find(monitored_pids.begin(), monitored_pids.end(), pid) == monitored_pids.end())
                monitored_pids.push_back(pid);
        }
        std::this_thread::sleep_for(std::chrono::milliseconds(500));
    }
}

void start_process_monitoring() {
    std::lock_guard<std::mutex> lock(monitored_pids_mutex);
    monitored_pids.clear();
    is_monitoring_active = true;
    monitor_process_thread = std::thread(monitor_new_processes);
    log_status_item("Süreç izleme başlatıldı.", true);
}

void stop_process_monitoring() {
    is_monitoring_active = false;
    if (monitor_process_thread.joinable())
        monitor_process_thread.join();
    log_status_item("Süreç izleme durduruldu.", true);
}

void kill_monitored_executables() {
    std::lock_guard<std::mutex> lock(monitored_pids_mutex);
    for (DWORD pid : monitored_pids) {
        HANDLE h = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
        if (h) TerminateProcess(h, 0);
        if (h) CloseHandle(h);
    }
    monitored_pids.clear();
    log_status_item("Tüm izlenen süreçler sonlandırıldı.", true);
}

// -------------------- SAFE EXIT --------------------
void safe_exit_procedure() {
    log_status_item("Güvenli çıkış prosedürü başlatılıyor...");
    global_shutdown_event = true;
    stopped_once_on_pipe_data = false;

    for (auto& t : pipe_listener_threads)
        if (t.joinable()) t.join();
    pipe_listener_threads.clear();

    close_all_active_pipes();

    if (current_job_object) {
        TerminateJobObject(current_job_object, 0);
        CloseHandle(current_job_object);
        current_job_object = nullptr;
        log_status_item("Job Object sonlandırıldı ve kapatıldı.", true);
    }

    terminate_process(VALORANT_EXE_NAME);
    terminate_process(RIOT_CLIENT_EXE_NAME);

    run_system_command_silent(L"sc stop " + VANGUARD_SERVICE_NAME);

    stop_process_monitoring();
    kill_monitored_executables();

    valorant_running = false;
    log_status_item("Güvenli çıkış tamamlandı.", true);
}

// -------------------- ANA MENÜ --------------------
void display_main_menu() {
    std::lock_guard<std::mutex> lock(console_mutex);
    system("cls");
    std::cout << R"( 
██╗░░░░░░█████╗░███████╗████████╗██╗░░░██╗
██║░░░░░██╔══██╗██╔════╝╚══██╔══╝╚██╗░██╔╝
██║░░░░░██║░░██║█████╗░░░░░██║░░░░╚████╔╝░
██║░░░░░██║░░██║██╔══╝░░░░░██║░░░░░╚██╔╝░░
███████╗╚█████╔╝██║░░░░░░░░██║░░░░░░██║░░░
╚══════╝░╚════╝░╚═╝░░░░░░░░╚═╝░░░░░░╚═╝░░░
)" << "\n";

    std::cout << "\n1) Start Valorant\n2) VGC Bypass\n3) Match Ended Restart Game\nexit) Exit\n";

    if (!console_status_logs.empty()) {
        std::cout << "\n--- STATUS PANEL ---\n";
        for (auto& l0g : console_status_logs) std::cout << "> " << l0g << "\n";
        std::cout << "-------------------\n";
    }
}

void main_loop() {
    valorant_running = false;
    while (!global_shutdown_event) {
        display_main_menu();
        std::string choice;
        std::getline(std::cin, choice);

        console_status_logs.clear();

        if (choice == "1") {
            log_status_item("Valorant başlatma komutu alındı.");
            launch_valorant_client();
        }
        else if (choice == "2") {
            stopped_once_on_pipe_data = false;
            global_shutdown_event = false;
            std::thread(start_named_pipe_listener).detach();
            start_process_monitoring();
            launch_valorant_client();
            valorant_running = true;
            log_status_item("Bypass başlatma tamamlandı.", true);
        }
        else if (choice == "3") safe_exit_procedure();
        else if (choice == "exit") {
            safe_exit_procedure();
            break;
        }
        else log_status_item("Geçersiz seçim: " + choice, false, "\033[92m", "\033[91m");

        std::this_thread::sleep_for(std::chrono::seconds(2));
    }
}

// -------------------- MAIN --------------------
int main() {
    system("title Lofty Software VGC Bypass");
    try {
        main_loop();
    }
    catch (...) {
        log_output("Beklenmedik hata oluştu. Çıkılıyor...");
    }
    return 0;
}
 
Bu kullanıcıyla herhangi bir iş veya ticaret yapmak istiyorsanız, forumdan uzaklaştırıldığını sakın unutmayın.
Animated GIF
 

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

Geri
Üst Alt