Code Monkey home page Code Monkey logo

css_get-interface-list's Introduction

CS:S Get interface list

Just a quick example on how to get interface list from game modules with s_pInterfaceRegs (CreateInterfaceInternal), in CS:S. ๐Ÿ‘ฝ

Well you could sigscan for every interface pointer OR use exported "CreateInterface" (which is the easy way), but this way is easier/cleaner imo. (and gets everything you need basically)

Signatures btw:

client_interface_list;         /* 89 01 a1 ? ? ? ? 89 41 08 8b c1 (client.dll)   */
engine_interface_list;         /* a1 ? ? ? ? 89 41 08 8b c1 (engine.dll)         */
vguimatsurface_interface_list; /* a1 ? ? ? ? 89 41 08 8b c1 (vguimatsurface.dll) */
vstdlib_interface_list;        /* a1 ? ? ? ? 89 41 08 8b c1 (vstdlib.dll)        */
vgui2_interface_list;          /* a1 ? ? ? ? 89 41 08 8b c1 (vgui2.dll)          */

By getting the interface list, you can easily get a pointer to your desired interface.

InterfaceReg* client_interface_list         
      = **(InterfaceReg***)utils::find_pattern((char*)"\x89\x01\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1 ", (char*)"xxx????xxxxx", dll_client, 0x552EC8, 3);

InterfaceReg* engine_interface_list         
      = **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_engine, 0x243FF5 , 1);

InterfaceReg* vgui2_interface_list          
      = **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_vgui2, 0x1EE45 , 1);

InterfaceReg* vstdlib_interface_list        
      = **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_vstdlib, 0xBCDA , 1);

InterfaceReg* vguimatsurface_interface_list 
      = **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_vguimatsurface, 0x6DF51 , 1);
uintptr_t* client      = get_interface_ptr<uintptr_t*>("VClient017", client_interface_list);
uintptr_t* engine      = get_interface_ptr<uintptr_t*>("VEngineClient013", engine_interface_list);
uintptr_t* panel       = get_interface_ptr<uintptr_t*>("VGUI_Panel009", vgui2_interface_list); 
uintptr_t* entity_list = get_interface_ptr<uintptr_t*>("VClientEntityList003", client_interface_list);
uintptr_t* cvar        = get_interface_ptr<uintptr_t*>("VEngineCvar004", vstdlib_interface_list);
uintptr_t* surface     = get_interface_ptr<uintptr_t*>("VGUI_Surface030", vguimatsurface_interface_list);

alt text

If you want to debug all interfaces from the list, you can use this function:

debug_interface_list(InterfaceReg* interface_list);

alt text Now you can use interface pointers and do what you want! ๐Ÿ˜‰

Credits (really well explained here): https://aixxe.net/2017/03/walking-interface-list

css_get-interface-list's People

Contributors

roby2014 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

desumachii

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.