Fix DeObfuscate command InvalidCastException + put de4dot in sub dir of data.

This commit is contained in:
Cj 2024-08-09 14:35:18 -04:00
parent b6e7280929
commit f7543672fc
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(SolutionDir)Templates&quot; &quot;$(TargetDir)Data&quot; /E /I /Y" /> <Exec Command="xcopy &quot;$(SolutionDir)Templates&quot; &quot;$(TargetDir)Data&quot; /E /I /Y" />
<Exec Command="xcopy &quot;$(SolutionDir)de4dot&quot; &quot;$(TargetDir)Data&quot; /E /I /Y" /> <Exec Command="xcopy &quot;$(SolutionDir)de4dot&quot; &quot;$(TargetDir)Data/de4dot&quot; /E /I /Y" />
</Target> </Target>
<ItemGroup> <ItemGroup>

View File

@ -33,7 +33,7 @@ public static class Deobfuscator
if (!method.Body.Instructions.Any(x => if (!method.Body.Instructions.Any(x =>
x.OpCode.Code == Code.Callvirt && x.OpCode.Code == Code.Callvirt &&
((MethodDef)x.Operand).FullName == "System.Object System.AppDomain::GetData(System.String)")) ((IMethodDefOrRef)x.Operand).FullName == "System.Object System.AppDomain::GetData(System.String)"))
{ {
continue; continue;
} }