Prehooking Get Hooking Points?

Please post any questions about developing your plugin here. Please use the search function before posting!
canibozz
Member
Posts: 32
Joined: Wed Apr 11, 2018 7:55 am

Prehooking Get Hooking Points?

Postby canibozz » Fri Apr 13, 2018 10:24 am

Hello guys,

browsing the forum iam seeing alot of the find_binary stuff like this:
Mikeemoo wrote:server = memory.find_binary('server', False)

PICK_AIM_SPOT = server['_ZN6CCSBot14PickNewAimSpotEv'].make_function(
Convention.THISCALL,
(DataType.POINTER,),
DataType.INT
)

@PostHook(PICK_AIM_SPOT)
def post_pick_aim_spot(args, return_value):




So in the doc it says server.symbols returns a dict containing all symbols and their addresses.
I thought i can print all available variables so i know where i must hook for let's say a _Z18CreateEntityByNamePKci hook.

This is my code so far:

Syntax: Select all

server = memory.find_binary('server', False)
for symbol in server.symbols:
print(symbol )


Prints:

Code: Select all

_ZTSN10__cxxabiv116__enum_type_infoE
_ZTVN10__cxxabiv115__forced_unwindE
_fini
_ZTVN9__gnu_cxx26__concurrence_unlock_errorE
CreateInterface
_ZTIN10__cxxabiv119__foreign_exceptionE
_ZTIN10__cxxabiv116__enum_type_infoE
_ZTSN10__cxxabiv119__foreign_exceptionE
_ZTVN10__cxxabiv119__foreign_exceptionE
_ZTSN8CryptoPP7Integer16RandomNumberTypeE
_ZTVN9__gnu_cxx20recursive_init_errorE
_ZTSN9__gnu_cxx20recursive_init_errorE
__new_handler
_ZTSN9__gnu_cxx26__concurrence_unlock_errorE
_init
s_pInterfaceRegs
_ZTIN9__gnu_cxx26__concurrence_unlock_errorE
_ZTIN10__cxxabiv115__forced_unwindE
_ZTSN9__gnu_cxx24__concurrence_lock_errorE
_ZTSN8CryptoPP21BlockPaddingSchemeDef18BlockPaddingSchemeE
_ZN9__gnu_cxx17__is_null_pointerIcEEbPT_
_ZTSN10__cxxabiv115__forced_unwindE
_ZTIN9__gnu_cxx24__concurrence_lock_errorE
_ZTIN8CryptoPP7Integer16RandomNumberTypeE
_ZTVN10__cxxabiv116__enum_type_infoE
_ZTIN8CryptoPP21BlockPaddingSchemeDef18BlockPaddingSchemeE
_ZTVN9__gnu_cxx24__concurrence_lock_errorE
_ZTIN9__gnu_cxx20recursive_init_errorE


Theres nothing about

Code: Select all

 server['_ZN6CCSBot14PickNewAimSpotEv']

nor

Code: Select all

 server['_Z18CreateEntityByNamePKci']


Do you see what iam missing?
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Prehooking Get Hooking Points?

Postby Ayuto » Fri Apr 13, 2018 10:42 am

Everything you said is correct. However, you can't find these symbols anymore, because Valve removed them in Novemer 2015 or 2016. The functions still exists in the server binary. They just don't have a name/symbol anymore.

You can still get the address of these functions by using a different approach, which is called signature scanning. What exactly do you want to do?
canibozz
Member
Posts: 32
Joined: Wed Apr 11, 2018 7:55 am

Re: Prehooking Get Hooking Points?

Postby canibozz » Fri Apr 13, 2018 10:45 am

I wanted to remove all weapons spawning at the round_start event.

How can i sig scan without using ollydbg?

Iam getting the error:

Code: Select all

ValueError: Could not find symbol: _Z18CreateEntityByNamePKci
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Prehooking Get Hooking Points?

Postby Ayuto » Sat Apr 14, 2018 10:06 am

You get the error, because the symbol simply doesn't exist anymore in CS:GO.

You can use IDA Pro instead of OllyDbg to find signatures. But if you are new to that topic I suggest to not use CS:GO, but CS:S. It's much easier to start with.

However, you don't need to utilize the memory module to remove all weapons. There are much easier approaches. E.g. you can simply loop through all weapon entities and remove them if you want. Another possibility would be to register an OnEntitySpawned listener.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 38 guests