Category : dll

I have a couple of PE files (DLL and EXE) and notice that their .text sections are not identical when comparing their file hash to their runtime post-load memory hash. Doing a char-by-char analysis I see that most of them are identical, but certain addresses have been changed at runtime. It’s my understanding that the ..

Read more

I need to get the file version from a DLL/EXE file. I primarily wrote my code from this answer. #ifdef _WIN32 #include <winver.h> #include <windows.h> void getFileVersion(LPCTSTR szVersionFile) { DWORD verHandle = 0; UINT size = 0; LPBYTE lpBuffer = nullptr; DWORD verSize = GetFileVersionInfoSize( szVersionFile, &verHandle); if (verSize != 0) { LPSTR verData = ..

Read more

I’m trying to prepare a helper proxy dll that can read packets sent from a client on the my computer to the server and change the packet contents before the packet is sent or sometimes stop the packet sending. By doing research on this, I prepared a working proxy dll. But since the proxy dll ..

Read more

As a result, it turned out to pass through int [], with char[] it doesn’t work: dll: file string_emplary.cpp #include "pch.h" #include "string_emplary.h" #include <iostream> #include <string> void FillArrayInt(int a[], int n) { const char* b = &"Emplary"[0]; for (size_t i = 0; i < n; i++) { a[i] = b[i]; } } void bool_input(char ..

Read more

I have written the following code as a sample: #include <stdio.h> #include <windows.h> #include <tchar.h> extern "C" BOOL WINAPI DllMain(HINSTANCE arg_instance, DWORD arg_reason, LPVOID arg_reserved) { switch(arg_reason) { case DLL_PROCESS_ATTACH: puts("DllMain called for DLL_PROCESS_ATTACH"); break; case DLL_PROCESS_DETACH: puts("DllMain called for DLL_PROCESS_DETACH"); break; } return TRUE; } Then I try to link it with the following ..

Read more