Giter Club home page Giter Club logo

veh_hooking's Introduction

veh_hooking

x64 Function Hooking through VectoredExceptionHandler (PAGE_GUARD method)

Anti-cheat safe and no impact on performance

How To Use

  • Call veh::Setup()
  • Hook functions through veh::Hook()
  • In the end unhook functions with veh::Unhook / veh::UnhookAll and call veh::Destroy()

To call the original function use veh::CallOriginal(original, args)

Example

bool hk(void* csgo_input, uint32_t a2, uint8_t a3)
{
    typedef bool(*create_move_t)(void*, uint32_t, uint8_t);
    static create_move_t create_move = FindPattern<create_move_t>("client.dll", "48 8B C4 48 89 48 08 55 53 41 56 41 57");
    
    bool result = veh::CallOriginal<bool>(create_move, csgo_input, a2, a3);

    std::cout << "hooked" << std::endl;

    return result;
}

int entry(HMODULE hModule)
{
    AllocConsole();
    FILE* file;
    freopen_s(&file, "CONOUT$", "w", stdout);

    void* create_move = FindPattern<void*>("client.dll", "48 8B C4 48 89 48 08 55 53 41 56 41 57");

    veh::Setup();
    veh::Hook(create_move, hk);

    Sleep(10000);

    veh::UnhookAll();
    veh::Destroy();

    fclose(stdout);
    FreeConsole();
    FreeLibraryAndExitThread(hModule, 0);
    return 0;
}

veh_hooking's People

Contributors

acroberto avatar

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.