All Projects → MSDN-WhiteKnight → CilTools

MSDN-WhiteKnight / CilTools

Licence: BSD-3-Clause license
A set of tools to work with CIL in .NET applications

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to CilTools

analysis-net
Static analysis framework for .NET programs.
Stars: ✭ 19 (+0%)
Mutual labels:  analysis, cil
ExhaustiveMatching
C# Analyzer Adding Exhaustive Checking of Switch Statements and Expressions
Stars: ✭ 60 (+215.79%)
Mutual labels:  csharp-library
J2N
Java-like Components for .NET
Stars: ✭ 37 (+94.74%)
Mutual labels:  analysis
sharppcap
Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
Stars: ✭ 1,054 (+5447.37%)
Mutual labels:  analysis
shell-history
Visualize your shell usage with Highcharts!
Stars: ✭ 100 (+426.32%)
Mutual labels:  analysis
PowerSimulations.jl
Julia for optimization simulation and modeling of PowerSystems. Part of the Scalable Integrated Infrastructure Planning Initiative at the National Renewable Energy Lab.
Stars: ✭ 202 (+963.16%)
Mutual labels:  analysis
codacy-scalameta
Codacy tool for Scalameta
Stars: ✭ 35 (+84.21%)
Mutual labels:  analysis
sbt-findbugs
FindBugs static analysis plugin for sbt.
Stars: ✭ 47 (+147.37%)
Mutual labels:  analysis
yara-exporter
Exporting MISP event attributes to yara rules usable with Thor apt scanner
Stars: ✭ 22 (+15.79%)
Mutual labels:  analysis
textalyzer
Analyze key metrics like number of words, readability, complexity, etc. of any kind of text
Stars: ✭ 50 (+163.16%)
Mutual labels:  analysis
sbt-sonar
An sbt plugin which provides an easy way to integrate Scala projects with SonarQube.
Stars: ✭ 62 (+226.32%)
Mutual labels:  analysis
phisherprice
All In One Pentesting Tool For Recon & Auditing , Phone Number Lookup , Header , SSH Scan , SSL/TLS Scan & Much More.
Stars: ✭ 38 (+100%)
Mutual labels:  analysis
SDA
SDA is a rich cross-platform tool for reverse engineering that focused firstly on analysis of computer games. I'm trying to create a mix of the Ghidra, Cheat Engine and x64dbg. My tool will combine static and dynamic analysis of programs. Now SDA is being developed.
Stars: ✭ 98 (+415.79%)
Mutual labels:  analysis
seo-audits-toolkit
SEO & Security Audit for Websites. Lighthouse & Security Headers crawler, Sitemap/Keywords/Images Extractor, Summarizer, etc ...
Stars: ✭ 311 (+1536.84%)
Mutual labels:  analysis
PyEarthScience
The PyEarthScience repository created by DKRZ (German Climate Computing Center) provides Python scripts and Jupyter notebooks in particular for scientific data processing and visualization used in climate science. It contains scripts for visualization, I/O, and analysis using PyNGL, PyNIO, xarray, cfgrib, xesmf, cartopy, and others.
Stars: ✭ 56 (+194.74%)
Mutual labels:  analysis
leveldb-cli
CLI for LevelDB
Stars: ✭ 86 (+352.63%)
Mutual labels:  analysis
Social-Network-Analysis-in-Python
Social Network Facebook Analysis (Python, Networkx)
Stars: ✭ 26 (+36.84%)
Mutual labels:  analysis
napari-hub
Discover, install, and share napari plugins
Stars: ✭ 44 (+131.58%)
Mutual labels:  analysis
orb
Orb is a dynamic network observability platform
Stars: ✭ 437 (+2200%)
Mutual labels:  analysis
Cyotek.Data.Nbt
C# library for reading and writing NBT files
Stars: ✭ 31 (+63.16%)
Mutual labels:  csharp-library

CIL Tools

logo

License: BSD 2.0

Documentation | Examples

CIL tools is a set of software to work with Common Intermediate Language in .NET:

  • CilTools.BytecodeAnalysis - programmatically inspect bytecode of methods
  • CilTools.Runtime - load bytecode of methods in another process
  • CilTools.Metadata - inspect assembly via reflection without loading it into the current process
  • CilTools.CommandLine - cross-platform command line tool to display CIL code of methods
  • CilView - windows application to display CIL code of methods in the given assembly file or process

CilTools.BytecodeAnalysis (previously CilBytecodeParser)

Requirements: .NET Framework 3.5+ or .NET Standard 2.0+

Nuget   GitHub release (latest by date)

CilTools.BytecodeAnalysis reads .NET methods' Common Intermediate Language (CIL) bytecode and converts it into high-level objects or textual CIL representation so they can be easily studied and programmatically processed.

Usage

Add reference to CilTools.BytecodeAnalysis.dll, import CilTools.BytecodeAnalysis namespace. Use CilReader.GetInstructions to get the collection of instructions from method, CilGraph.Create to get a graph that represents a flow of control between method's instructions, or CilAnalysis.MethodToText when you need to output method's CIL code as text. CilTools.BytecodeAnalysis.Extensions namespace provides an alternative syntax via extension methods.

Example

using System;
using System.Collections.Generic;
using CilTools.BytecodeAnalysis;
using CilTools.BytecodeAnalysis.Extensions;

namespace CilToolsExample
{
    class Program
    {
        public static void Hello()
        {
            int a = 1;
            int b = 2;
            Console.WriteLine("Hello, World");
            Console.WriteLine("{0} + {1} = {2}",a,b,a+b);
        }

        static void Main(string[] args)
        {
            IEnumerable<CilInstruction> instructions = typeof(Program).GetMethod("Hello").GetInstructions();

            foreach (CilInstruction instr in instructions)
            {
                Console.WriteLine(instr.ToString());
            }
            Console.ReadKey();
        }

    }
}

/* Output:

nop
ldc.i4.1
stloc.0
ldc.i4.2
stloc.1
ldstr      "Hello, World"
call       void [mscorlib]System.Console::WriteLine(string)
nop
ldstr      "{0} \053 {1} \075 {2}"
ldloc.0
box        [mscorlib]System.Int32
ldloc.1
box        [mscorlib]System.Int32
ldloc.0
ldloc.1
add
box        [mscorlib]System.Int32
call       void [mscorlib]System.Console::WriteLine(string, object, object, object)
nop
ret
*/

CilTools.Runtime

Requirements: .NET Framework 4.5+

Nuget

CilTools.Runtime loads CIL bytecode of methods in external process's CLR instance using ClrMD. This enables processing bytecode from external process with CilTools.BytecodeAnalysis library.

CilTools.Metadata

Requirements: .NET Framework 4.5+ or .NET Standard 2.0+

Nuget

The library that supports inspecting the contents of .NET assembly via reflection without loading it into the current process. This enables inspecting assemblies for another target framework (such as .NET Standard assemblies when your application is on .NET Framework) or when some dependencies could not be resolved. This also means assemblies can be unloaded from memory when they are no longer needed.

CilTools.CommandLine

Requirements: .NET Core 3.1+

Nuget

Cross-platform command line tool to view disassembled CIL code of methods in .NET assemblies. The application runs on any operating system supported by .NET Core. CilTools.CommandLine could print disassembled CIL into the console (standard output) or .il file. Syntax highlighting is supported for console output as long as the target console implementation supports setting console colors.

Install as global .NET tool:

dotnet tool install --global CilTools.CommandLine

For more information see readme file.

CilView

Requirements: .NET Framework 4.5+

Download: ClickOnce installer, Releases

A windows application to display CIL code of methods in the given assembly file or process. Supports syntax highlighting and navigating to method code by clicking on its reference.

cilview


Copyright (c) 2022, MSDN.WhiteKnight

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].