Counter-Strike 2 Offset Dumper

Overview

cs2-dumper

An external offsets/interfaces dumper for Counter-Strike 2, written in Rust.

Usage

You can either download the latest release from Releases or build it yourself. Note that building it yourself requires Rust's nightly toolchain.

If you want to see more detailed runtime messages, you can pass the --verbose flag.

For a complete list of all available flags, use --help.

Generated Files

By default, generated files are stored in the generated directory. However, this can be modified by specifying your desired output folder using the --output flag.

📂 Pre-generated Files

Running Tests

To run tests, use the following command: cargo test -- --nocapture.

License

Please refer to the LICENSE file for more details.

Comments
  • Strange error 0x8007012B

    Strange error 0x8007012B

    Hi, I downloaded via Release and running the game while trying to dump the offsets, but I encountered this error: image Then the Generated folder is created but nothing in there, I also tried --verbose, as well as run the program as Admin rights, but no use, any idea?

    opened by bphucc 8
  • wrong offsets?

    wrong offsets?

    some offsets dont work, i dont know if its my code but

                localEntity.addy = CS2.ReadPointer(Client, Offs.dwLocalPlayerPawn);
                IntPtr controller = CS2.ReadPointer(localEntity.addy, 0x1654);
                Console.WriteLine(CS2.ReadInt(controller, 0x7C8));
    

    this for exemple does not work, printing controller does work but that always returns 0 when it shouldnt

    opened by 8pmX8 5
  • Add Builder Whitelist & Output Path

    Add Builder Whitelist & Output Path

    ADDED:

    • Argument to specify only the builders we would like to use
    • Argument to specify an output folder
    • Table to readme.md

    This is the first time in my life developing with rust, if anything is programmed crappily I'd be happy to change it. Figured I'd submit for those who might find these features helpful.

    opened by pablo67340 3
  • GetLocalPlayer

    GetLocalPlayer

    Thank you for your release here! Would it be possible to request further investigation on the clientstate?

    Today I found at 0xF0 the PlayerSlot on Server dwNetworkGameClient = 0x48BAB0; int PlayerSlot = dwNetworkGameClient + 0xF0

    but I am still looking for GetLocalPlayer if you happend to find it could you please share? :-) Thank you

    enhancement 
    opened by externalkji 3
  • Failed to find pattern error afer 10/18/2023 update

    Failed to find pattern error afer 10/18/2023 update

    ERROR [cs2_dumper::dumpers::offsets] Failed to find pattern for dwForceAttack2. ERROR [cs2_dumper::dumpers::offsets] Failed to find pattern for dwPlantedC4.

    opened by SandFoxy 2
  • Question: Which flag do I need to use for checking if LocalPlayer is on the ground?

    Question: Which flag do I need to use for checking if LocalPlayer is on the ground?

    I am new to this and I am struggling with which flag I need to use for checking if localplayer is on the ground.

    This is the flag I used for "checking if the localplayer is on the ground" from C_BaseEntity: constexpr std::ptrdiff_t m_fFlags = 0x3C8; // uint32_t This offset for the LocalPlayer: constexpr std::ptrdiff_t dwLocalPlayerPawn = 0x187AC48; And this one for checking if the player is alive from CCSPlayerController: constexpr std::ptrdiff_t m_iPawnHealth = 0x808; // uint32_t

    But it dosen't work, so I assumed it is because of an incorrect flag offset

    I am also not sure what is the difference between dwLocalPlayerController and dwLocalPlayerPawn, if somebody can explain this to me I would appriciate it a lot.

    opened by MehPropy 2
  • Dump interfaces in OLEACC.dll crash

    Dump interfaces in OLEACC.dll crash

    OS Windows10 22H2 19045.3448 Rustc:rustc 1.72.0 (5680fa18f 2023-08-23) Cargo:cargo 1.72.0 (103a7ff2e 2023-08-15) Gameversion CS2 2000142/13948 debug with Visual Studio Code&rust-analyzer plugin

    2023-09-28T07:14:18.810Z INFO [cs2_dumper::dumpers::interfaces] Dumping interfaces in OLEACC.dll... module.rs line 123 let function_ordinal = *ordinal_table.offset(i as isize); Unhandled exception at 0x00007FF69D521963 in cs2-dumper.exe: 0xC0000005: Access violation reading location 0x0000024787E3B380.

    opened by sysrom 2
  • Possible incorrect offset of CTakeDamageInfo::m_iAmmoType after 13965

    Possible incorrect offset of CTakeDamageInfo::m_iAmmoType after 13965

    Got m_iAmmoType = 0x50; from generated header,

    namespace CTakeDamageInfo {
        constexpr std::ptrdiff_t m_vecDamageForce = 0x8; // Vector
        constexpr std::ptrdiff_t m_vecDamagePosition = 0x14; // Vector
        constexpr std::ptrdiff_t m_vecReportedPosition = 0x20; // Vector
        constexpr std::ptrdiff_t m_vecDamageDirection = 0x2C; // Vector
        constexpr std::ptrdiff_t m_hInflictor = 0x38; // CHandle<CBaseEntity>
        constexpr std::ptrdiff_t m_hAttacker = 0x3C; // CHandle<CBaseEntity>
        constexpr std::ptrdiff_t m_hAbility = 0x40; // CHandle<CBaseEntity>
        constexpr std::ptrdiff_t m_flDamage = 0x44; // float
        constexpr std::ptrdiff_t m_bitsDamageType = 0x48; // int32_t
        constexpr std::ptrdiff_t m_iDamageCustom = 0x4C; // int32_t
        constexpr std::ptrdiff_t m_iAmmoType = 0x50; // AmmoIndex_t
        constexpr std::ptrdiff_t m_flOriginalDamage = 0x60; // float
        constexpr std::ptrdiff_t m_bShouldBleed = 0x64; // bool
        constexpr std::ptrdiff_t m_bShouldSpark = 0x65; // bool
        constexpr std::ptrdiff_t m_nDamageFlags = 0x70; // TakeDamageFlags_t
        constexpr std::ptrdiff_t m_nNumObjectsPenetrated = 0x74; // int32_t
        constexpr std::ptrdiff_t m_hScriptInstance = 0x78; // HSCRIPT
        constexpr std::ptrdiff_t m_bInTakeDamageFlow = 0x94; // bool
    }
    

    But got 0x54 from reclass.

    image

    opened by hzqst 1
  • Question

    Question

    Is there a pointer already to the game entity system if so, how would I use it and which name does it have? second question: is there anything like it was in csgo the PlayerResource pointer or something maybe it gameplayerresource now?

    I ask because I try to filter the entities ingame but as of now I can iterate them but sometimes they dont show because I may fail to differeciate between them

    opened by externalkji 1
  • Update json structure, add comments for modules and small improvments

    Update json structure, add comments for modules and small improvments

    I updated json structure and generation a little because current one is lacking type information in comments. I also added comments for modules which in case of schema dumps include a parent name for a class. Also I fixed a few small issues such as current jmp didn't support a negative displacement.

    If necessary I can split this pr into multiple for each issue

    opened by mysty0 1
  • Where is dwGlowObjectManager?

    Where is dwGlowObjectManager?

    Where is dwGlowObjectManager offset? Is it called differently? As well as m_iGlowIndex.

    Edit: since I am dealing with glow, can anybody tell me how to get the glow struct offsets

    opened by MehPropy 1
Owner
null
Rust in-memory dumper

combine Check your windows local security authority credential's safety with this awesome tool. Coupled dump decoder @ https://github.com/ruggi99/comb

Gigi 51 Jul 26, 2023
A light-weight Anchor-Offset based 2D sprite rendering system for the bevy engine.

Bevy AoUI A light-weight anchor-offset based 2D sprite layout system for the bevy engine. Bevy AoUI provides a light-weight rectangular anchor-offset

Mincong Lu 4 Nov 22, 2023
Rust BOFs for Cobalt Strike

Cobalt Strike Beacon Object Files (BOFs) written in rust with rust core and alloc.

wumb0 155 Dec 26, 2022
💣 SMH – a computer vision project for automatic, precision mortar strike calculations in Squad

?? Squad Mortar Helper (SMH) SMH is a computer vision toy project aimed at automating mortar calculations in the game Squad Download demo.mp4 Requirem

William 18 Dec 26, 2022
async-alloc-counter measures max allocations in a future invocation

async-alloc-counter measures max allocations in a future invocation see examples/ for usage This allocator can be used as follows: use async_alloc_cou

Geoffroy Couprie 2 Dec 3, 2021
k-mer counter in Rust using the rust-bio and rayon crates

krust is a k-mer counter written in Rust and run from the command line that will output canonical k-mers and their frequency across the records in a f

null 14 Jan 7, 2023
Arduino Nano frequency counter with atomic clock accuracy

Arduino Nano frequency counter with atomic clock accuracy Project description and test setup With this project you can measure a frequency from less t

Frank Buss 24 Apr 3, 2022
Simple, thread-safe, counter based progress logging

?? proglog Documentation Crates.io This is a simple, thread-safe, count-based, progress logger. Synopsis proglog hooks into your existing log implemen

Seth 5 Nov 7, 2022