danielkrupinski / OneByteWallhack

CS:GO wallhack achieved by patching one byte of game memory. Written in Python 3.
MIT License
157 stars 34 forks source link

[Feature Request] Add Linux support #34

Open hamad12a opened 1 year ago

hamad12a commented 1 year ago

Could you point out what are the necessary adjustments should take place for the cheat to support Linux version of the game?

mrjshzk commented 1 year ago

Just compile your cheat to .so (shared object (pretty much the equivalent of dll in windows)) and instead of injecting client.dll, inject client.so

hamad12a commented 1 year ago

Just compile your cheat to .so (shared object (pretty much the equivalent of dll in windows)) and instead of injecting client.dll, inject client.so

you mean compiling the python file into a shared library file (.so)?

mrjshzk commented 1 year ago

No, your cheat. Compile it the same way you'd compile a DLL on windows, but a SO file.

hamad12a commented 1 year ago

I might misunderstood the functionality of this source code. Is it an injector? I mean I must have .so file somewhere else then I use this python file to inject it?

mrjshzk commented 1 year ago

Nevermind, I just realized what this code does and you should not use it. You will get VAC banned.

This is pretty much the same thing as having cheat engine attached to csgo and assembly editing.

mrjshzk commented 1 year ago

And also I just checked and PyMem is a windows only library, so you would have to use another library compatible with linux (if it exists)

hamad12a commented 1 year ago

Nevermind, I just realized what this code does and you should not use it. You will get VAC banned.

This is pretty much the same thing as having cheat engine attached to csgo and assembly editing.

Which means it must be running on Windows! But where client.dll must be found?

mrjshzk commented 1 year ago

I don't want to just say it to you, I want you to learn from this, so follow along. I went to the Pymem documentation and searched the 'module_from_name' function, which takes 2 arguments.

First argument is the 'process_handle' (int) and in this code that is 'pm.process_handle', being pm the csgo executable variable.

Now the second argument is 'module_name' (string) and in this code that is 'Client.dll'.

Also, the description of this function is the following 'Retrieve a module loaded by given process'.

So pretty much what this code does is -> Pulls Client.dll from csgo process; edits the assembly code from said DLL and boom, done

I hope you have learned something :)

hamad12a commented 1 year ago

Indeed, I did! Appreciated! Since the package pymem is available on Windows only it's pointless to have it on Linux which I run as my main OS that's why I opened a request for Linux support in the first place.


From: Miguel Silva @.> Sent: Thursday, March 30, 2023 2:35 PM To: danielkrupinski/OneByteWallhack @.> Cc: hamad12a @.>; Author @.> Subject: Re: [danielkrupinski/OneByteWallhack] [Feature Request] Add Linux support (Issue #34)

I don't want to just say it to you, I want you to learn from this, so follow along. I went to the Pymem documentation and searched the 'module_from_name' function, which takes 2 arguments.

First argument is the 'process_handle' (int) and in this code that is 'pm.process_handle', being pm the csgo executable variable.

Now the second argument is 'module_name' (string) and in this code that is 'Client.dll'.

Also, the description of this function is the following 'Retrieve a module loaded by given process'.

So pretty much what this code does is -> Pulls Client.dll from csgo process; edits the assembly code from said DLL and basically injectes the edited assembly into the original DLL

I hope you have learned something :)

— Reply to this email directly, view it on GitHubhttps://github.com/danielkrupinski/OneByteWallhack/issues/34#issuecomment-1490418069, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM6O7HXVQNGRUMFPETGEEOTW6WK23ANCNFSM6AAAAAAURLYLHQ. You are receiving this because you authored the thread.Message ID: @.***>