WPMGPRoSToTeMa / SafeNameAndChat

14 stars 4 forks source link

Stabilize finding the addresses of `gMsgBuffer` and `gMsgType` variables on ReHLDS #5

Open WPMGPRoSToTeMa opened 2 years ago

WPMGPRoSToTeMa commented 2 years ago

Currently we find the addresses of gMsgBuffer and gMsgType variables by using the memory pattern inside PF_MessageEnd_I function on ReHLDS: https://github.com/WPMGPRoSToTeMa/SafeNameAndChat/blob/83fc271222afb77a1e40034bbce3dd0276073e7d/Main.cpp#L380-L387 This is not reliable as the binary code may change when the PF_MessageEnd_I source code is refactored and also when the compiler version is changed (e.g. #1).

@s1lentq suggested to use the ELF symbol table for that instead of memory patterns. It should be implemented before releasing the final 1.2.