Category : detours

My goal is to generate compile_commands.json for various projects on windows, which should support any kind of build system/environment. I am using tracebld (part of Microsoft’s Detours utility) to intercept the build commands, which dumps the information about the intercepted processes in miltiple xml files. I then parse those files and generate the compile_commands.json. This ..

Read more

I downloaded ms detours express from here: https://www.microsoft.com/en-us/download/details.aspx?id=52586 Its folder has a src folder, with these files inside: creatwth.cpp detours.cpp detours.h detver.h disasm.cpp disolarm.cpp disolarm64.cpp disolia64.cpp disolx64.cpp disolx86.cpp image.cpp Makefile modules.cpp uimports.cpp I have no idea how to import it into my vs project. I am making a dll and need it in the dll, ..

Read more

I am trying to use the detours library in a visual studio empty windows project. I cloned the repository (https://github.com/microsoft/Detours), I added the include directory into Project Properties / C/C++ / Additional Include Directories, and I added the lib.X86 directory into Project Properties / Linker / Additional Library Directories. I get no errors visible on ..

Read more

I’m trying to hook OpenSSL’s int SSL_connect(SSL *s) method. OpenSSL 1.0.2l version. Here’s the source code: SSL_connect SSL structure SSL_SESSION structure GOAL: Printing out any SSL_SESSION member (like ssl_version or master_key) THE PROBLEM: I get Access Violation Exception when trying to access the SSL *s parameter inside my hook method. Is there anything wrong with ..

Read more

I’m using MS Detours and everything is ok when I hook the function like this: int Detour_SSL_connect(SSL* s) { unsigned char* masterKey = s->session->master_key; char const* charConst = reinterpret_cast<char const*>(masterKey); MessageBoxA(HWND_DESKTOP, "everything is ok", "title", MB_OK); return Target_SSL_connect(s); } The message box is showing properly and the application works fine, but when I try to ..

Read more

I’m trying to write a DLL file that I can inject into a game. I’m pretty far but when I try to compile the code I always get the error Error LNK2001 Unresolved external symbol "" unsigned char * __cdecl Detours :: X86 :: DetourFunction (unsigned char *, unsigned char *, enum Detours :: X86Option) ..

Read more

I’m getting two errors when trying to use detours. I’m using that detours https://github.com/Nukem9/detours But in there in the Detours.h script im getting the error that a comma is missing because in that version of static_assert isn’t activated in that mode. the code line is static_assert(sizeof(uintptr_t) == sizeof(void *)); and also im getting the error ..

Read more