{"id":18055326,"url":"https://github.com/analogfeelings/hookplusplus","last_synced_at":"2025-08-18T23:32:13.020Z","repository":{"id":65497770,"uuid":"593434163","full_name":"AnalogFeelings/HookPlusPlus","owner":"AnalogFeelings","description":"HookPlusPlus is a lightweight 2-file C++ library for hooking in Windows-based systems, licensed under GPL v3.0.","archived":false,"fork":false,"pushed_at":"2024-02-20T03:27:17.000Z","size":31,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T13:36:05.192Z","etag":null,"topics":["cpp","easy-to-use","example-code","gpl3","gplv3","hooks","library","trampoline","trampoline-hooking","win32","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnalogFeelings.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-26T01:15:38.000Z","updated_at":"2024-08-05T05:55:12.000Z","dependencies_parsed_at":"2024-02-20T04:28:55.199Z","dependency_job_id":null,"html_url":"https://github.com/AnalogFeelings/HookPlusPlus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AnalogFeelings/HookPlusPlus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnalogFeelings%2FHookPlusPlus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnalogFeelings%2FHookPlusPlus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnalogFeelings%2FHookPlusPlus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnalogFeelings%2FHookPlusPlus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnalogFeelings","download_url":"https://codeload.github.com/AnalogFeelings/HookPlusPlus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnalogFeelings%2FHookPlusPlus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271075801,"owners_count":24695071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","easy-to-use","example-code","gpl3","gplv3","hooks","library","trampoline","trampoline-hooking","win32","windows"],"created_at":"2024-10-31T00:14:36.602Z","updated_at":"2025-08-18T23:32:12.643Z","avatar_url":"https://github.com/AnalogFeelings.png","language":"C++","readme":"# HookPlusPlus - Hooking made easy.\n![Lines of code](https://img.shields.io/tokei/lines/github/AestheticalZ/hookplusplus?label=Lines%20of%20Code\u0026style=flat-square)\n![GitHub repo file count (custom path)](https://img.shields.io/github/directory-file-count/aestheticalz/hookplusplus/src?color=brightgreen\u0026label=Library%20Files\u0026style=flat-square)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/aestheticalz/hookplusplus?color=green\u0026label=Code%20Size\u0026style=flat-square)\n![GitHub issues](https://img.shields.io/github/issues/aestheticalz/hookplusplus?label=Issues\u0026style=flat-square)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/aestheticalz/hookplusplus?label=Pull%20Requests\u0026style=flat-square)\n![GitHub](https://img.shields.io/github/license/aestheticalz/hookplusplus?label=License\u0026style=flat-square)\n![GitHub Repo stars](https://img.shields.io/github/stars/aestheticalz/hookplusplus?label=Stargazers\u0026style=flat-square)\n\nHookPlusPlus is a lightweight 2-file C++ library for hooking in Windows-based systems! No more looking around Google for any way to hook under both x86_64 and x86, because HookPlusPlus does both.\n\n\u003e [!IMPORTANT]  \n\u003e Please read [SECURITY.md](SECURITY.md) before using.\n\nUsage is very simple, and below you can find some example code.\n\n## Example\nSay you have a DLL you want to attach whenever you want to debug something. In this case, here's the example code, with comments for your leisure.\n\n```cpp\n#include \"hookplusplus.h\"\n\n// Define hooks.\nHookPlusPlus::Hook* MessageBoxHookW = NULL;\nHookPlusPlus::Hook* MessageBoxHookA = NULL;\n\n// REMEMBER! The impostor function's signature must match 1:1 the function you're trying to hook!\nDWORD WINAPI HookedMessageBowW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType)\n{\n    // Unperform patch to be able to call the original function.\n    MessageBoxHookW-\u003eUnperformPatch();\n\n    DWORD returnCode = MessageBoxW(hWnd, L\"Ah sorry mate, I just hooked this message box!\\n- HookPlusPlus\", L\"Sorry!\", uType);\n\n    // Perform it again.\n    MessageBoxHookW-\u003ePerformPatch();\n    \n    return returnCode;\n}\n\n// REMEMBER! The impostor function's signature must match 1:1 the function you're trying to hook!\nDWORD WINAPI HookedMessageBowA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType)\n{\n    // Unperform patch to be able to call the original function.\n    MessageBoxHookA-\u003eUnperformPatch();\n\n    DWORD returnCode = MessageBoxA(hWnd, \"Ah sorry mate, I just hooked this message box!\\n- HookPlusPlus\", \"Sorry!\", uType);\n\n    // Perform it again.\n    MessageBoxHookA-\u003ePerformPatch();\n\n    return returnCode;\n}\n\nBOOL APIENTRY DllMain(HMODULE hModule, DWORD callReason, LPVOID lpReserved)\n{\n    switch (callReason)\n    {\n    case DLL_PROCESS_ATTACH:\n        // Create the hooks.\n        MessageBoxHookW = new HookPlusPlus::Hook(\"user32.dll\", \"MessageBoxW\", \u0026HookedMessageBowW);\n        MessageBoxHookA = new HookPlusPlus::Hook(\"user32.dll\", \"MessageBoxA\", \u0026HookedMessageBowA);\n\n        // Perform the patches.\n        MessageBoxHookW-\u003ePerformPatch();\n        MessageBoxHookA-\u003ePerformPatch();\n\n        break;\n    case DLL_PROCESS_DETACH:\n        // Remember: deleting hooks automatically unperforms patches.\n        delete MessageBoxHookW;\n        delete MessageBoxHookA;\n\n        break;\n    }\n\n    return TRUE;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanalogfeelings%2Fhookplusplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanalogfeelings%2Fhookplusplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanalogfeelings%2Fhookplusplus/lists"}