unidecompiler-plugin-dotnet-cli 0.1.4__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/PKG-INFO +2 -2
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/pyproject.toml +2 -2
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli/lifter.py +14 -2
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli/plugin.py +6 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli.egg-info/PKG-INFO +2 -2
- unidecompiler_plugin_dotnet_cli-0.2.0/src/unidecompiler_plugin_dotnet_cli.egg-info/requires.txt +2 -0
- unidecompiler_plugin_dotnet_cli-0.1.4/src/unidecompiler_plugin_dotnet_cli.egg-info/requires.txt +0 -2
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/README.md +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/setup.cfg +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli/__init__.py +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli/assembly.py +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli/simulation.py +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli/support.py +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli.egg-info/SOURCES.txt +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli.egg-info/dependency_links.txt +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli.egg-info/entry_points.txt +0 -0
- {unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/src/unidecompiler_plugin_dotnet_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: unidecompiler-plugin-dotnet-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: .NET CLI assembly frontend plugin for unidecompiler
|
|
5
5
|
Author-email: Wker <1670133844@qq.com>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/Wker666/unidecompiler
|
|
|
9
9
|
Project-URL: Issues, https://github.com/Wker666/unidecompiler/issues
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
-
Requires-Dist: unidecompiler<0.
|
|
12
|
+
Requires-Dist: unidecompiler<0.3.0,>=0.2.0
|
|
13
13
|
Requires-Dist: dnfile<1,>=0.15
|
|
14
14
|
|
|
15
15
|
# unidecompiler-plugin-dotnet-cli
|
{unidecompiler_plugin_dotnet_cli-0.1.4 → unidecompiler_plugin_dotnet_cli-0.2.0}/pyproject.toml
RENAMED
|
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "unidecompiler-plugin-dotnet-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.2.0"
|
|
8
8
|
description = ".NET CLI assembly frontend plugin for unidecompiler"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "AGPL-3.0-or-later"
|
|
11
11
|
authors = [{ name = "Wker", email = "1670133844@qq.com" }]
|
|
12
12
|
requires-python = ">=3.11"
|
|
13
|
-
dependencies = ["unidecompiler>=0.
|
|
13
|
+
dependencies = ["unidecompiler>=0.2.0,<0.3.0", "dnfile>=0.15,<1"]
|
|
14
14
|
|
|
15
15
|
[project.urls]
|
|
16
16
|
Homepage = "https://github.com/Wker666/unidecompiler"
|
|
@@ -40,6 +40,7 @@ from unidecompiler.core.vm_region import (
|
|
|
40
40
|
VMStatefulCallbacks,
|
|
41
41
|
build_hint_region_profile,
|
|
42
42
|
)
|
|
43
|
+
from unidecompiler.progress import ProgressReporter, report_progress
|
|
43
44
|
from unidecompiler_plugin_dotnet_cli.assembly import (
|
|
44
45
|
DotNetAssembly,
|
|
45
46
|
DotNetInstruction,
|
|
@@ -406,12 +407,23 @@ DOTNET_EFFECT_TABLE = VMEffectTable(
|
|
|
406
407
|
)
|
|
407
408
|
|
|
408
409
|
|
|
409
|
-
def lift_dotnet_assembly(
|
|
410
|
+
def lift_dotnet_assembly(
|
|
411
|
+
assembly: DotNetAssembly,
|
|
412
|
+
metadata: dict,
|
|
413
|
+
*,
|
|
414
|
+
reporter: ProgressReporter | None = None,
|
|
415
|
+
) -> "ModuleIR":
|
|
416
|
+
total = len(assembly.methods)
|
|
417
|
+
report_progress(reporter, phase="lift", status="started", completed=0, total=total, unit="function", message="lifting .NET functions")
|
|
418
|
+
functions = []
|
|
419
|
+
for index, method in enumerate(assembly.methods, start=1):
|
|
420
|
+
functions.append(_recover_dotnet_method(method))
|
|
421
|
+
report_progress(reporter, phase="lift", completed=index, total=total, unit="function", message=f"lifting function {index}/{total}")
|
|
410
422
|
return assemble_vm_module(
|
|
411
423
|
name=assembly.name,
|
|
412
424
|
source_language="dotnet",
|
|
413
425
|
metadata={"frontend": metadata, "bytecode_format": "cli-assembly"},
|
|
414
|
-
functions=tuple(
|
|
426
|
+
functions=tuple(functions),
|
|
415
427
|
)
|
|
416
428
|
|
|
417
429
|
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from unidecompiler.core.ir import ModuleIR
|
|
4
4
|
from unidecompiler.plugins import FrontendModule
|
|
5
|
+
from unidecompiler.progress import ProgressReporter
|
|
5
6
|
from unidecompiler_plugin_dotnet_cli.assembly import (
|
|
6
7
|
DnfileAssemblyDecoder,
|
|
7
8
|
DotNetAssemblyDecoder,
|
|
@@ -52,3 +53,8 @@ class DotNetFrontendPlugin:
|
|
|
52
53
|
)
|
|
53
54
|
|
|
54
55
|
return lift_dotnet_assembly(module.payload, module.metadata)
|
|
56
|
+
|
|
57
|
+
def lift_with_progress(self, module: FrontendModule, reporter: ProgressReporter) -> ModuleIR:
|
|
58
|
+
if module.frontend_id != self.id:
|
|
59
|
+
raise TypeError(f".NET frontend cannot lift module from {module.frontend_id!r}")
|
|
60
|
+
return lift_dotnet_assembly(module.payload, module.metadata, reporter=reporter)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: unidecompiler-plugin-dotnet-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: .NET CLI assembly frontend plugin for unidecompiler
|
|
5
5
|
Author-email: Wker <1670133844@qq.com>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/Wker666/unidecompiler
|
|
|
9
9
|
Project-URL: Issues, https://github.com/Wker666/unidecompiler/issues
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
-
Requires-Dist: unidecompiler<0.
|
|
12
|
+
Requires-Dist: unidecompiler<0.3.0,>=0.2.0
|
|
13
13
|
Requires-Dist: dnfile<1,>=0.15
|
|
14
14
|
|
|
15
15
|
# unidecompiler-plugin-dotnet-cli
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|