AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Gamedata Offset Tester (1.4) [11-Dec-2022] (https://forums.alliedmods.net/showthread.php?t=317074)

Silvers 06-24-2019 23:46

[ANY] Gamedata Offset Tester (1.4) [11-Dec-2022]
 
7 Attachment(s)


About
  • Dump memory bytes to server console for finding offsets.
  • Uses signature bytes or gamedata for address.


Related Plugins

Thanks
  • Lux - Ideas for the plugin.
  • BHaType - Testing on Win/Linux.
  • Dragokas - Various major updates and additions.


Admin Commands
PHP Code:

sm_sig_off    // Usage: sm_sig_off <offset> <signature bytes> || <gamedata> <signature> [offset] [bytes]
sm_ptr        // Prints 250 bytes from the specified memory address. Usage: sm_ptr <address> [offset] [bytes]

// Examples:
sm_sig_offset_display 0sm_sig_offset_print 26
sm_sig_offset_display 1
sm_sig_offset_print 10
sm_sig_off 
"core.games/engine.csgo" EntInfosFinder 0 // Displays default 256 bytes from offset 0
sm_sig_off "sdkhooks.games/engine.csgo" EntityListenersFinder 0 128 // Displays 128 bytes from offset 0
sm_sig_off "sdktools.games/engine.csgo" CBaseTempEntity 75 128 // Displays 128 bytes from offset 75
sm_sig_off 0 "55 8B ? 81 ? ? ? ? ? 53 56 8B ? 8B ? ? ? ? ? 57 85" // First byte 0 is the offset, search by signature
sm_sig_off -15 "55 8B ? 83 ? ? 83 ? ? 83 ? ? ? ? ? ? 53 56 57 89 ? ? ? 8B" // First byte -15 is the offset, search by signature 


ConVars:

Saved to sm_sig_offset.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:

sm_sig_offset_bytes "240"    // How many bytes to print in total (by default).
sm_sig_offset_display "3"    // 0 = Dump all bytes space separated. 1 = Display offset number next to bytes. 2 = Display absolute address. 3 = 1+2.
sm_sig_offset_print "10"     // How many bytes to print per line in the console.
sm_sig_offset_style "16"     // Offset numbering style: 10 = Decimal, 16 = Hexadecimal
sm_sig_offset_library "1"    // Which library to search: 0 = Engine, 1 = Server. 


Changes
Code:

1.4 (11-Dec-2022)
    - Changes to fix compile warnings on SourceMod 1.11.

1.3.3 (24-Feb-2021) Dragokas
    - Added ability to enter address in reverse order, e.g. sm_ptr "03 02 01 00" to access sm_ptr 0x010203.
    - Added ability to enter hex values in lowercase.

1.3.2 (16-Dec-2020) Dragokas
    - Added ability to (optionally) specify the number of bytes to be printed with sm_ptr (useful, when leftover is inaccessible and cause a crash).
    - Added ability to print < 10 bytes - for sm_ptr.
    - Added ability to display absolute address next to each line.
    - Appended ConVar "sm_sig_offset_display" with options: 2 and 3.
    - Added ConVar "sm_sig_offset_bytes" - How many bytes to print in total (by default).
    - Added ConVar "sm_sig_offset_style" - Offset numbering style: 10 - Decimal, 16 - Hexadecimal.
    - Code simplification.
    - Default value for "sm_sig_offset_print" ConVar is increased to 16 bytes per line.
    - "+ 0xX offset" prompt is printed in Hex now.

1.3.1 (21-Nov-2020) Dragokas
    - Added ability to input values (offset and bytes count) in hex format (should be prefixed with 0x) - e.g. sm_ptr 0xFFABCD
    - Fixed bug with incorrect generating gamedata where original gamedata contains CRLF style line breaks or extra whitespaces after "Games".
    - Fixed problem where gamedata files are precached by SM and cannot be re-used - now, random file name is created/deleted
    (for convenience, common sm_sig_offset.txt gamedata file is still been created, and NOT deleted).
    - If the count of bytes is not multiple by sm_sig_offset_print value, the leftover is also printed now.

1.3 (10-May-2020)
    - Increased gamedata buffer size to 100kb.
    - Various changes to tidy up code.

1.2 (01-Dec-2019)
    - Added command "sm_ptr" to print bytes from the specified memory address.

1.1.1 (28-June-2019)
    - Allowed negative offset lookup.

1.1 (26-June-2019)
    - Added convar "sm_sig_offset_library" to determine which library to search.

1.0 (25-June-2019)
    - Initial release.


Installation
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

_GamerX 06-25-2019 01:41

Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
 
Great

404UserNotFound 06-25-2019 13:05

Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
 
Wooo, offsets! Hopefully one step closer to automated gamedata creation/updating. I'd love to see a system that generates gamedata (offsets & sigs) for everything in the game, all in one file. Would really make working with gamedata just that much easier.

Spirit_12 06-25-2019 13:37

Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
 
Another amazing contribution Silver. Keep it up.

I'll test this soon. One tiny thing that I noticed in the code would be to change syntax of one native.

PHP Code:

WriteFileLine(hFile

can be switched to newer syntax.

PHP Code:

hFile.WriteLine


Silvers 06-26-2019 06:07

Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
 
Quote:

Originally Posted by Spirit_12 (Post 2656739)
Another amazing contribution Silver. Keep it up.

I'll test this soon. One tiny thing that I noticed in the code would be to change syntax of one native.

PHP Code:

WriteFileLine(hFile

can be switched to newer syntax.

PHP Code:

hFile.WriteLine


Thanks, fixed.

Also added cvar to select library for search (engine/server).

Ejziponken 06-29-2019 14:27

Re: [ANY] Gamedata Offset Tester (1.1.1) [28-Jun-2019]
 
Can some explain to a noob how this works? How exactly (step by step) can I get the correct gamedata for example DM plugin for CSGO? Like for linux EntSelectSpawnPoint?

Dragokas 04-19-2020 06:04

Re: [ANY] Gamedata Offset Tester (1.2) [01-Dec-2019]
 
Thanks a much. Really very helpful.

Dragokas 11-21-2020 17:47

Re: [ANY] Gamedata Offset Tester (1.3) [10-May-2020]
 
1 Attachment(s)
Suggestion:

Quote:

- Added ability to input values (offset and bytes count) in hex format (should be prefixed with 0x) - e.g. sm_ptr 0xFFABCD
- Fixed bug with incorrect generating gamedata where original gamedata contains CRLF style line breaks or extra whitespaces after "Games".
- Fixed problem where gamedata files are precached by SM and cannot be re-used - now, random file name is created/deleted
(for convenience, common sm_sig_offset.txt gamedata file is still been created, and NOT deleted).
- If the count of bytes is not multiple by sm_sig_offset_print value, the leftover is also printed now.

Dragokas 12-08-2020 07:19

Re: [ANY] Gamedata Offset Tester (1.3) [10-May-2020]
 
Notice:

Quote:

Originally Posted by Dragokas
- Fixed problem where gamedata files are precached by SM and cannot be re-used

This is no more required since sm v.1.11.6629

Dragokas 12-16-2020 01:56

Re: [ANY] Gamedata Offset Tester (1.3) [10-May-2020]
 
1 Attachment(s)
Quote:

1.3.2 (16-Dec-2020) Dragokas
- Added ability to (optionally) specify the number of bytes to be printed with sm_ptr (useful, when leftover is inaccessible and cause a crash).
- Added ability to print < 10 bytes - for sm_ptr.
- Added ability to display absolute address next to each line.
- Appended ConVar "sm_sig_offset_display" with options: 2 and 3.
- Added ConVar "sm_sig_offset_bytes" - How many bytes to print in total (by default).
- Added ConVar "sm_sig_offset_style" - Offset numbering style: 10 - Decimal, 16 - Hexadecimal.
- Code simplification.
- Default value for "sm_sig_offset_print" ConVar is increased to 16 bytes per line.
- "+ 0xX offset" prompt is printed in Hex now.


All times are GMT -4. The time now is 18:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.