dotscope 0.6.0

A high-performance, cross-platform framework for analyzing and reverse engineering .NET PE executables
Documentation
[package]
name = "dotscope"
version = "0.6.0"
authors = ["Johann Kempter <admin@binflip.rs>"]
edition.workspace = true
description = "A high-performance, cross-platform framework for analyzing and reverse engineering .NET PE executables"
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/dotscope"
keywords = ["dotnet", "cil", "assembly", "reverse-engineering", "metadata"]
categories = ["parsing", "development-tools", "encoding"]
readme = "../README.md"
# Exclude tests, docs, and working artifacts from crates.io package.
# Users don't run tests on library dependencies - they just use the compiled code.
# Tests and samples are available in the repository for contributors.
exclude = [
    "tests/",
    "docs/",
    "*.log",
    "*.exe",
]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
thiserror = "2.0.18"
uguid = "2.2.1"
widestring = "1.2.1"
strum = { version = "0.27.2", features = ["derive"]}
memmap2 = "0.9.9"
tempfile = "3.25.0"
goblin = "0.10.4"
ouroboros = "0.18.5"
sha1 = { version = "0.10.6", optional = true }
sha2 = "0.10.9"
md-5 = { version = "0.10.6", optional = true }
hmac = "0.12.1"
imbl = { version = "7.0.0", optional = true }
pbkdf2 = "0.12.2"
aes = "0.8.4"
des = { version = "0.8.1", optional = true }
cbc = "0.1.2"
bitflags = "2.10.0"
dashmap = "6.1.0"
crossbeam-skiplist = "0.1.3"
rayon = "1.11.0"
rustc-hash = "2.1.1"
boxcar = "0.2.14"
quick-xml = "0.39.0"
hex = "0.4.3"
log = "0.4.29"
num_cpus = "1.17.0"
flate2 = "1.1.9"
lzma-rs = "0.3.0"
z3 = { version = "0.19.7", optional = true }
iced-x86 = { version = "1.21", default-features = false, features = ["std", "decoder", "instr_info"], optional = true }

[dev-dependencies]
criterion = "0.8.2"
clap = { version = "4.5.58", features = ["derive"] }
ctrlc = "3.5.2"

[features]
default = ["legacy-crypto", "emulation", "x86", "deobfuscation"]

# Include legacy cryptographic algorithms for full .NET compatibility.
# Required for: public key token computation (SHA1), assembly hash verification (MD5/SHA1),
# and deobfuscation of .NET code using DES/3DES encryption.
# Disable with `default-features = false` if you need to exclude these from your dependency tree.
legacy-crypto = ["dep:sha1", "dep:md-5", "dep:des"]

# CIL bytecode emulation engine.
# Enables: controlled CIL execution, BCL method hooks, heap/stack emulation.
# Used by deobfuscation for runtime value computation and string decryption.
emulation = ["dep:imbl"]

# Compiler infrastructure: SSA optimization passes, code generation, pass scheduler.
# Enables: interprocedural analysis, inlining, constant propagation, SSA-to-CIL codegen.
compiler = []

# x86/x64 native code analysis: instruction decoding, CFG construction, SSA translation.
# Enables: native method stub analysis, mixed-mode binary support in PE writer.
x86 = ["dep:iced-x86"]

# Z3 symbolic constraint solver for advanced analysis.
# Enables: symbolic expression solving, satisfiability checking, constraint inversion.
# Optional enhancement — not required by any other feature.
z3 = ["dep:z3"]

# Deobfuscation framework: transformation passes, obfuscator detection, assembly rewriting.
# Automatically enables compiler, x86, and emulation features.
# Optionally enhanced by the `z3` feature for symbolic constraint solving.
deobfuscation = ["compiler", "x86", "emulation"]

# Skip expensive validation tests that use ProjectLoader with dependency resolution.
# These tests are slow on CI runners with limited cores/IO. Use this feature on slow runners (e.g., macOS/Windows CI).
skip-expensive-tests = []

[[example]]
name = "deobfuscate"
required-features = ["deobfuscation"]

[[example]]
name = "analysis"
required-features = ["deobfuscation"]

[[bench]]
name = "cilobject"
harness = false

[[bench]]
name = "cilassemblyview"
harness = false

[[bench]]
name = "assembly"
harness = false

[[bench]]
name = "resources"
harness = false

[[bench]]
name = "method_body"
harness = false

[[bench]]
name = "signatures"
harness = false

[[bench]]
name = "streams"
harness = false

[[bench]]
name = "cor20"
harness = false

[[bench]]
name = "security"
harness = false