a2x / cs2-dumper

Counter-Strike: 2 Offset Dumper
MIT License
960 stars 126 forks source link

linux binary doesn't work #164

Open KebabLord opened 5 months ago

KebabLord commented 5 months ago

Since update:14006 linux binary doesn't work. It exits with error and outputs are not generated.

$ ./cs2-dumper 
16:54:01 [ERROR] unable to find signature for: dwGameRules
16:54:01 [ERROR] unable to find signature for: dwLocalPlayerController
16:54:02 [ERROR] unable to find signature for: dwViewMatrix
Error: Other("no schema system registrations found")

I'm aware of that linux branch is not actively maintained and it relies on pull-requests instead. However, I am creating this issue to document the problem for reference and potential future consideration.

AdverseMiller commented 5 months ago

Same problem here too

a2x commented 5 months ago

I don't have Linux installed currently, so I can't update the branch for the time being.

AstolfoIsVeryCute commented 5 months ago

I was able to get it to run by ripping out the schema system code, but then most of the output is missing and what is returned seems to be incorrect too :(

AbsurdumDaemonium commented 5 months ago

been having this issue too, anyone know what we can do while this isnt fixed?

arrayffs commented 5 months ago

been having this issue too, anyone know what we can do while this isnt fixed?

no offense but learn how to do it manually, automation is nice but getting offsets is a thing everyone should know

sadly this time its gonna take a bit to get them without the repo's help

AbsurdumDaemonium commented 5 months ago

been having this issue too, anyone know what we can do while this isnt fixed?

no offense but learn how to do it manually, automation is nice but getting offsets is a thing everyone should know

sadly this time its gonna take a bit to get them without the repo's help

no its valid but i wasnt able to find any resources to do it without sigs on linux, all the tutorials either need cheat engine or sigs :<

a2x commented 5 months ago

I'll try get to this tomorrow.

KebabLord commented 5 months ago

no its valid but i wasnt able to find any resources to do it without sigs on linux, all the tutorials either need cheat engine or sigs :<

agreed, getting offsets on linux is pain. but still we can run cheat engine using wine and connect it to cheatengine_linux server, it's a thing

a2x commented 5 months ago

Should be up-to-date now :smile:

a2x commented 4 months ago

I'll leave this open to see if anyone's interested on keeping it up to date. I very rarely use Linux so I can't promise to.

KebabLord commented 2 months ago

@a2x need your help with 14029 update. I'd like to help with the updates as a daily linux user but unlike windows, getting offsets on linux is painful because of the lack of tools. I really wonder what is your methodology

a2x commented 2 months ago

@a2x need your help with 14029 update. I'd like to help with the updates as a daily linux user but unlike windows, getting offsets on linux is painful because of the lack of tools. I really wonder what is your methodology

Sorry for the delay. What I did was I had both the Windows and Linux binaries side by side in IDA. I looked for string references in the Windows binaries, which I could use to find the relevant code in the Linux binaries. I also used PINCE and Cheat Engine under Wine (for dissecting data structures, although ReClass could also be used instead).

Hotz99 commented 2 months ago

@a2x the offset for dwLocalPlayerPawn on libclient.so is not correct the other offsets for the fields, like m_iHealth on CBaseEntity (0x49C) seem ok, at least I found that with IDA I thought you read libschemasystem.so to get the structure definitions for all classes ?

a2x commented 2 months ago

@a2x the offset for dwLocalPlayerPawn on libclient.so is not correct the other offsets for the fields, like m_iHealth on CBaseEntity (0x49C) seem ok, at least I found that with IDA I thought you read libschemasystem.so to get the structure definitions for all classes ?

I do, but its purpose is for reversing unknown structures and auto-identifying types (such as pointers). In this case, dwLocalPlayerPawn has been shifted by 24 bytes (same as Windows binary), so change:

{
    "name": "dwLocalPlayerPawn",
    "pattern": "48 8D 05 ? ? ? ? C3 0F 1F 84 00 ? ? ? ? C7 47 ? ? ? ? ? C7 47 ? ? ? ? ? C3",
    "operations": [
        {
            "type": "rip"
        },
        {
            "type": "add",
            "value": 328
        }
    ]
},

to

{
    "name": "dwLocalPlayerPawn",
    "pattern": "48 8D 05 ? ? ? ? C3 0F 1F 84 00 ? ? ? ? C7 47 ? ? ? ? ? C7 47 ? ? ? ? ? C3",
    "operations": [
        {
            "type": "rip"
        },
        {
            "type": "add",
            "value": 352
        }
    ]
},

So it's libclient.so + 0x389C860. 0x49C is correct for m_iHealth like you said.