Library for analyzing executable files

There are tools like Dependency Walker , dumpbin, ildasm for searching in DLL / EXE files on Windows. I would like to parse DLLs out of code, especially dependent and managed and unmanaged. Are there any (.NET) libraries for analysis with similar functionality?

I want to use this to make sure that we install the correct DLLs in the setup program created by my company. We have over 200 DLLs.

+3
source share
4 answers

You can use the Cecil library to analyze managed executables. And you can use Gendarme , which uses Cecil, if you want the rules engine to validate your application.

+3
source

NDepend is indeed the tool you are looking for, but you should also consider reducing the number of assemblies, as described here: Recommendations for sectioning code through .NET assemblies

+3
source

, Code Analysis (FxCop) Visual Studio .

, :

+1

, , , , . : https://sourceforge.net/projects/processhacker/files. ProcessHacker.Common ProcessHacker.Native, .

Here's how to use it:

using ProcessHacker.Native.Image;

MappedImage image = new MappedImage("file.exe");

for (int i = 0; i < image.Imports.Count; i++)
{
    Console.WriteLine("Imports for " + image.Imports[i].Name + ":");

    for (int j = 0; j < image.Imports[i].Count; j++)
        Console.WriteLine(image.Imports[i][j].Name);
}

I do not know how to work with .NET links.

+1
source

Source: https://habr.com/ru/post/1727980/


All Articles