CodeInject - Code Inject and Runtime Intelligence
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CInject.Engine Assembly Version Change Dec 13, 2015
CInject.Injections Assembly Version Change Dec 13, 2015
CInject.Plugin.Sample Upgrade to .NET 4.6 Dec 13, 2015
CInject.PluginInterface
CInject.SampleWPF Upgrade to .NET 4.6 Dec 13, 2015
CInject.SampleWinform Upgrade to .NET 4.6 Dec 13, 2015
CInject.TargetAssembly Upgrade to .NET 4.6 Dec 13, 2015
CInject
.gitignore Initial commit Dec 15, 2014
CInject.sln Sample WPF application added Jul 18, 2015
CInject.suo Initial Checkin May 22, 2013
CInject.vssscc Multiple changes - ObjectValueInjector, DependentFiles, Load Injector… Dec 21, 2013
LICENSE Initial commit Dec 15, 2014
README.md Build Status Dec 13, 2015

README.md

CodeInject

Build status

CodeInject - Code Inject and Runtime Intelligence

CInject (or CodeInject) allows code injection into any managed assembly without disassembling and recompiling it. It eases the inevitable task of injecting any code in single or multiple methods in one or many assemblies to intercept code for almost any purpose.

When using CInject, you do not require any knowledge of the target application. You can create your own injectors very easily and inject them in any target assembly/executable. An example is provided with this application. If you have an existing code which has no logging or no diagnostics, inject it with CInject and execute it as usual to generate log files. Helps you analyze any code and ease your reverse engineering exercise.

Provides runtime intelligence such as

  • Values of arguments to the called function
  • Object life time of a method / variables called within the method
  • Allows customization of logging or diagnostics
  • Allows extension of injectors to tailor your own solution as the need be
  • Measure the method execution time to check performance

Build your own plugins using CInject information

  • CInject supports building your own plugins
  • The plugin receives information from the application such as
    • Target assembly & method
    • Injector assembly & method
    • Processing details, results with timestamp
    • Exceptions and errors
  • Customized Plugin menu in CInject application

FAQ

Can I use it in my organization? Yes, you can use it.

I have some doubts, how can I ask? Please use the 'Issues' tab

Do I get to know the value of arguments at runtime? Yes, that's the actual beauty of CInject. It lets you know the value of arguments to a function at runtime.

Can I inject static methods? Yes. In the current release, you can call create a class that implements ICInject interface and call static methods. In later release, provision for calling static methods directly will be added as well.

What version of .NET is this built on? Can I use it with other versions? CInject is built on .NET 4.0 runtime. To use it with other versions, rebuild the Injectors, or create your own using .NET 2.0, 3.0, 3.5.

How do I distribute my plugin? You have many alternatives to distribute the plugin

  • Host the source code on CodePlex and link it with this project
  • Provide the source code, and get it hosted on this webpage & www.ganshani.com website
  • Host the source code on GitHub, or other repository websites and provide us the link for promotion purposes

How about code injection at compile time? If you are looking at dynamic injection based on the code you have written in an assembly, it would be worth while trying dI.Hook You can define the injections (or called hooks) in configuration file and invoke them wherever required.