IntelSDM / RustDMACheat

Small DMA Cheat For Rust
MIT License
147 stars 45 forks source link

how do i check the entities found nearby? #67

Open mesaruk opened 1 week ago

mesaruk commented 1 week ago

`void BaseNetworkable::ItterateEntities() { //' std::cout << "[BaseNetworkable] Iterating Entities" << std::endl; for (uint32_t i = 0; i < ObjectListSize; i++) { uint64_t currentobject = TargetProcess.Read(ObjectList + (0x20 + (i * 8))); if (currentobject == 0) { std::cout << "[BaseNetworkable] Skipping invalid object at index " << i << std::endl; continue; // Skip if the object is invalid }

    uint64_t baseobject = TargetProcess.Read<uint64_t>(currentobject + 0x10);
    uint64_t object = TargetProcess.Read<uint64_t>(baseobject + 0x30);
    uint64_t prefab = TargetProcess.Read<uint64_t>(object + 0x60);
    WORD tag = TargetProcess.Read<WORD>(object + 0x54);

    char buff[256] = { 0 };
    if (!TargetProcess.Read(prefab, reinterpret_cast<void*>(buff), sizeof(buff)))
    {
        std::cerr << "[BaseNetworkable] Failed to read prefab name for object at index " << i << std::endl;
        continue;
    }

    std::string prefabname = buff;
    std::cout << "[BaseNetworkable] PrefabName: " << prefabname << std::endl;
    std::cout << "[BaseNetworkable] Tag: " << tag << std::endl;

    if (prefabname.find("metal") != std::string::npos)
    {
        std::cout << "[BaseNetworkable] Found entity with 'metal' in the name: " << prefabname << std::endl;
    }
}

}`

what am i doing wrong?

mesaruk commented 5 days ago

solved the issue incorrect memory address