Jump to content

Recommended Posts

Posted

Ok since maxtor still didnt made those sections cuz i dunno why... or he dont want to make those sections whatever

but anyways

 

#include <detours.h>

//Prototype of the original ShellAboutW API
int (__stdcall *ShellAboutWD_o)( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);

//Hooked ShellAboutW API
int __stdcall ShellAboutWD(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
{
        return ShellAboutWD_o(hWnd, L"DragonHunter [LeetCoders]", L"The about API/Function is hooked by DragonHunter ;D!", hIcon); //Return to original api function
}

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        HANDLE ShellAboutWDProcessAddress; //Hold the ShellAboutW API memory address

        ShellAboutWDProcessAddress    =  GetProcAddress(
                                                        GetModuleHandle(L"Shell32"), //DLL Library
                                                        "ShellAboutW"                 //API/Function
                                                      );
        //Since we now have the memory address of ShellAboutW we can finally start the hook process :)


        if(ShellAboutWDProcessAddress != 0) //Check if memory address is found (Error-Handling)
        {
            ShellAboutWD_o = (            //Set the original API/Function
                int (__stdcall *)(        //Prototype
                HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)) //Prototype
                DetourFunction(                        //Api-Hook ShellAboutW
                (PBYTE)ShellAboutWDProcessAddress,    //Get memory address
                (PBYTE)ShellAboutWD);                //Set ShellAboutWD_o -> ShellAboutWD
        }
        break;
    case DLL_PROCESS_DETACH:
            if(ShellAboutWDProcessAddress != 0)
            {
                DetourRemove(
                    (PBYTE)ShellAboutWDProcessAddress,    //Unhook the API/Function
                    (PBYTE)ShellAboutWD);
            }
        break;
    }
    return TRUE;
}

 

And this is the output

2a92l1c.png

 

Have fun...

 

Coded by DragonHunter

Posted

i think a section like that would be nice indeed, tho you have dozens of forums dedicated to it.. like you can find the code above with a quick google search..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock