Giter Club home page Giter Club logo

Comments (5)

samuelgr avatar samuelgr commented on July 30, 2024 1

Could you please provide an example to help me understand what you mean by passing arguments to DLLs at injection time?

from hookshot.

YouKnow-sys avatar YouKnow-sys commented on July 30, 2024

Could you please provide an example to help me understand what you mean by passing arguments to DLLs at injection time?

I mean something like this tutorial I found
thank you

from hookshot.

samuelgr avatar samuelgr commented on July 30, 2024

If I understand correctly, the idea is to:

  • Inject a DLL (by specifying it on an Inject = line in a Hookshot configuration file).
  • After the DLL is injected, call a function in the DLL and pass arguments to that function.

Is this right?

from hookshot.

YouKnow-sys avatar YouKnow-sys commented on July 30, 2024

If I understand correctly, the idea is to:

  • Inject a DLL (by specifying it on an Inject = line in a Hookshot configuration file).
  • After the DLL is injected, call a function in the DLL and pass arguments to that function.

Is this right?

Yes, This is exactly what I have in mind


and also I think its good Idea to create some kind of library with HookShot to be able to use it inside of program
for now HookShot working very well, but its not good in term of easy use, because for that you need to include compiled binary to project... and its not ideal
you think its possible?

from hookshot.

samuelgr avatar samuelgr commented on July 30, 2024

Yes, This is exactly what I have in mind

Based on this use case, I suggest creating a hook module rather than relying on Inject = to load your DLL. The Inject = functionality is intended as a quick and convenient way for a user to inject a DLL that does not need much in the way of interaction.

Suppose you are trying to inject FancyLibrary.dll into a program called App.exe. Rather than using Inject = FancyLibrary.dll to do it, you can write a hook module called (for example) FancyLibraryWrapper. In the hook module's entry point, you could:

  • Call the Windows API function LoadLibrary and pass FancyLibrary.dll as an argument.
  • Use GetProcAddress (or some other means) to locate the address of the function in FancyLibrary.dll that you want to call.
  • Invoke the function with whatever arguments you want.
  • Set up some IPC channels, spawn new threads, and do basically anything you want to make it possible to call functions in FancyLibrary.dll in App.exe from some other program, perhaps another program you wrote.

While hook modules are intended to set hooks using the Hookshot API, this is not strictly a requirement. The hook module entry point gives you an opportunity to run whatever code you want inside the space of App.exe.

for that you need to include compiled binary to project... and its not ideal

Could you please explain this issue a little bit more? What "compiled binary" are you referring to, and why is including it not ideal?

from hookshot.

Related Issues (2)

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.