Raised This Month: $12 Target: $400
 3% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6617
Plugin Version:
1.4
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    14 
    Plugin Description:
    Dump memory bytes to server console for finding offsets. Uses signature bytes or gamedata for address.
    Old 06-24-2019 , 23:46   [ANY] Gamedata Offset Tester (1.4) [11-Dec-2022]
    Reply With Quote #1



    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_sig_offset.sp - 248 views - 14.9 KB)
    __________________

    Last edited by Silvers; 12-11-2022 at 03:57.
    Silvers is offline
    _GamerX
    AlliedModders Donor
    Join Date: Jun 2011
    Location: Fun Server
    Old 06-25-2019 , 01:41   Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
    Reply With Quote #2

    Great
    __________________
    _GamerX is offline
    Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 06-25-2019 , 13:05   Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
    Reply With Quote #3

    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.

    Last edited by 404UserNotFound; 06-25-2019 at 13:18.
    404UserNotFound is offline
    Spirit_12
    Veteran Member
    Join Date: Dec 2012
    Location: Toronto, CA
    Old 06-25-2019 , 13:37   Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
    Reply With Quote #4

    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
    __________________
    Spirit_12 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-26-2019 , 06:07   Re: [ANY] Gamedata Offset Tester (1.0) [25-Jun-2019]
    Reply With Quote #5

    Quote:
    Originally Posted by Spirit_12 View Post
    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).
    __________________
    Silvers is offline
    Ejziponken
    AlliedModders Donor
    Join Date: Apr 2008
    Old 06-29-2019 , 14:27   Re: [ANY] Gamedata Offset Tester (1.1.1) [28-Jun-2019]
    Reply With Quote #6

    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?
    Ejziponken is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 04-19-2020 , 06:04   Re: [ANY] Gamedata Offset Tester (1.2) [01-Dec-2019]
    Reply With Quote #7

    Thanks a much. Really very helpful.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 04-19-2020 at 06:55.
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 11-21-2020 , 17:47   Re: [ANY] Gamedata Offset Tester (1.3) [10-May-2020]
    Reply With Quote #8

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_sig_offset.sp - 370 views - 12.7 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 12-08-2020 , 07:19   Re: [ANY] Gamedata Offset Tester (1.3) [10-May-2020]
    Reply With Quote #9

    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
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 12-16-2020 , 01:56   Re: [ANY] Gamedata Offset Tester (1.3) [10-May-2020]
    Reply With Quote #10

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_sig_offset.sp - 357 views - 13.3 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 13:50.


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