Вопрос DMA чит socketio

Новичок
Статус
Оффлайн
Регистрация
31 Июл 2023
Сообщения
1
Реакции[?]
0
Поинты[?]
0
python code:
import socketio
import time
import struct
import pymem, requests, pymem.process
import memprocfs
import os
import numpy as np
 
sio = socketio.Client()
url = 'https://raw.githubusercontent.com/frk1/hazedumper/master/csgo.json'
response = requests.get(url).json()
dwClientState = int(response['signatures']['dwClientState'])
dwClientState_Map = int(response['signatures']['dwClientState_Map'])
dwClientState_PlayerInfo = int(response["signatures"]["dwClientState_PlayerInfo"])
dwEntityList = int(response["signatures"]["dwEntityList"])
m_iTeamNum = int(response["netvars"]["m_iTeamNum"])
m_iHealth = int(response["netvars"]["m_iHealth"])
m_vecOrigin = int(response["netvars"]["m_vecOrigin"])
m_angEyeAnglesY = int(response["netvars"]["m_angEyeAnglesY"])
m_bDormant = int(response["signatures"]["m_bDormant"])
dwGameRulesProxy = int(response["signatures"]["dwGameRulesProxy"])
dwLocalPlayer = int(response["signatures"]["dwLocalPlayer"])
dwRadarBase = int(response["signatures"]["dwRadarBase"])
m_bSpotted = int(response["netvars"]["m_bSpotted"])
 
 
'''def read_vec3(process, address):
    data = process.memory.read(address, 12)  # 3 floats * 4 bytes/float = 12 bytes
    return struct.unpack("<fff", data)'''
 
def read_bool_memory(process, address):
    value = struct.unpack("<I", process.memory.read(address, 4))[0]
    return value != 0
 
def read_string_memory(process, address):
    data = b""
    try:
        while True:
            byte = process.memory.read(address, 1)
            if byte == b'\0':  # Verifica se é o terminador nulo
                break
            data += byte
            address += 1
        decoded_data = data.decode('utf-8')
        return decoded_data
    except UnicodeDecodeError:
        return data
def read_memory(process, address, size):
    return struct.unpack(f"<{size}B", process.memory.read(address, size))
def read_float_memory(process, address):
    return struct.unpack("<f", process.memory.read(address, 4))[0]
def read_int_memory(process, address):
    return struct.unpack("<I", process.memory.read(address, 4))[0]
 
def read_vec3(handle, address):
    bytes = handle.memory.read(address, struct.calcsize("3f"))
    bytes = struct.unpack("3f", bytes)
    return bytes[0], bytes[1]
 
def background_thread():
    vmm_args = ['-device', 'fpga']
    if os.path.isfile('mmap.txt'):
        vmm_args = ['-memmap', 'mmap.txt', '-device', 'fpga']
        print("mmap.txt found")
    vmm = memprocfs.Vmm(vmm_args)
    print("INI DMA SUCCESS")
    time.sleep(0.5)
    process_csgo = vmm.process('csgo.exe')
    print("csgo.exe found")
    time.sleep(0.5)
 
    module_client = process_csgo.module('client.dll')
    module_engine = process_csgo.module('engine.dll')
 
    client_dll_base = module_client.base
    engine_dll_base = module_engine.base
    dormant_time = {}
    while not sio.connected:
        sio.sleep(0.5)
 
    while True:
        data = {}
        data['map'] = ''
        data['players'] = []
        data['smokes'] = []
        data['bomb'] = {}
 
        #  Get local palyer instance
        local_player = read_int_memory(process_csgo, client_dll_base + dwLocalPlayer)
        if not local_player:
            sio.sleep(1.0)
            continue
 
        #  Get client state
        client_state = read_int_memory(process_csgo, engine_dll_base + dwClientState)
        if not client_state:
            sio.sleep(1.0)
            continue
 
        #  Read map name from client state
        data['map'] = read_string_memory(process_csgo, client_state + dwClientState_Map)
 
        #  Get player info table from client state
        userinfo = read_int_memory(process_csgo, client_state + dwClientState_PlayerInfo)
        if not userinfo:
            sio.sleep(1.0)
            continue
 
        #  Read items from player info table
        items = read_int_memory(process_csgo, read_int_memory(process_csgo, userinfo + 0x40) + 0xC)
        if not items:
            sio.sleep(1.0)
            continue
 
        for i in range(0,32):
            try:
                #  Create entity instance
                entity = read_int_memory(process_csgo, client_dll_base + dwEntityList + i * 0x10)
 
                if entity:
                    #  Lifestate check
                    alive = read_int_memory(process_csgo, entity + m_iHealth) > 0
                    if not alive:
                        continue
 
                    #  Team check
                    team = read_int_memory(process_csgo, entity + m_iTeamNum)
                    local_team = read_int_memory(process_csgo, local_player + m_iTeamNum)
                    if team == local_team:
                        continue
 
                    #  Collect player info data
                    struct_info = read_int_memory(process_csgo, items + 0x28 + (i * 0x34))
                    nickname = read_string_memory(process_csgo, struct_info + 0x0010)
                    steam_id = read_string_memory(process_csgo, struct_info + 0x0094)
 
                    #  Record player for dormant checks
                    if (nickname+steam_id) not in dormant_time:
                        dormant_time[nickname + steam_id] = 0
 
                    #  Dormant checks
                    dormant = read_bool_memory(process_csgo, entity + m_bDormant)
                    if not dormant:
                        dormant_time[nickname + steam_id] = time.time()
                    else:
                        if time.time() - dormant_time[nickname+steam_id] >= 3.0:
                            continue
 
                    dormant_alpha = int((3.0 - (time.time() - dormant_time[nickname+steam_id])) * 85)
                    angle = read_float_memory(process_csgo, entity + m_angEyeAnglesY)
                    x, y = read_vec3(process_csgo, entity + m_vecOrigin)
                    print(x,y)
            except KeyboardInterrupt:
                vmm.close()
                print("Stopped.")
                break
 
        sio.emit('data_client', data)
        sio.sleep(0.01)
 
 
if __name__ == '__main__':
    # threading.Thread(target=background_thread).start()
    sio.connect('http://127.0.0.1:2121/')
    sio.start_background_task(background_thread)
    # sio.wait()


у меня радар не плавный, крашатся игроки, появляются на радаре, но застревают, думаю это связано с моей функцией



function py:
def read_vec3(handle, address):
    bytes = handle.memory.read(address, struct.calcsize("3f"))
    bytes = struct.unpack("3f", bytes)
    return bytes[0], bytes[1]

any master to help?

Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Сверху Снизу