【问题标题】:InstallShield and ConfuserExInstallShield 和 ConfuserEx
【发布时间】:2015-05-07 07:32:07
【问题描述】:

我想使用 ConfuserEx 混淆我的源代码,所以我创建了一个 ConfuserEx 项目文件,如下所示:

<project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
    <rule pattern="true" inherit="false">
        <protection id="rename" />
        <protection id="ctrl flow" />
        <protection id="ref proxy" />
        <protection id="anti debug" />
        <protection id="anti dump" />
        <protection id="constants" />
        <protection id="resources" />
        <protection id="anti tamper" />
      </rule>
     <module path="MainApplication\bin\Release\MainApplication.exe" />
     <module path="MainApplication\bin\Release\Component.Hardware.dll" />
     <module path="MainApplication\bin\Release\Component.Log.dll" />
     <module path="MainApplication\bin\Release\Component.Service.dll" />
     <module path="MainApplication\bin\Release\Component.Software.dll" />
     <module path="MainApplication\bin\Release\AsynchronousSocket.dll" />
     <module path="MainApplication\bin\Release\Instrumentation.dll" />  
</project>

由于我想通过设置来部署我的应用程序,因此我为我的 MainApplication-Project 创建了一个 InstallShield 设置。我选择初级输出。

在 Visual Studio 的 Postbuild-Event 中,我使用 crproj 文件作为参数调用 Confuser.CLI.exe。但是,只有MainApplication.exeAsynchronousSocket.dll + Instrumentation.dll 已使用ConfuserEx 进行了修改。 4 Component.*.dll 文件不是。 我不得不说所有的程序集都是不同的项目。所以我的项目解决方案结构是这样的:

MyProject
    MyProject.MainApplication
    MyProject.Component.Hardware
    MyProject.Component.Software
    MyProject.Component.Log
    MyProject.Component.Service
    MyProject.AsynchronousSocket
    MyProject.Instrumentation
    MyProject.Setup
    MyProject.sln
    MyProject.crpoj

我的猜测是我使用了 InstallShield 使用的错误程序集。我还尝试使用MyProject.Component.Service\bin\ReleaseMyProject.Component.Service\obj\Release 中的程序集,但这些选项都不起作用。 我不认为使用MainApplication\obj\Release 有效,因为只有MainApplication.exe 位于。

谁能告诉我 InstallShield 从哪里获取主要输出,或者我是否遗漏了其他内容?

【问题讨论】:

    标签: c# .net obfuscation installshield


    【解决方案1】:

    一种可能的解决方案是多个 crproj 文件,每个二进制文件一个,并在每个项目的后期构建步骤中指定项目特定的 crproj 文件。 MainApplication.crproj

    <project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
        <rule pattern="true" inherit="false">
            <protection id="rename" />
            <protection id="ctrl flow" />
            <protection id="ref proxy" />
            <protection id="anti debug" />
            <protection id="anti dump" />
            <protection id="constants" />
            <protection id="resources" />
            <protection id="anti tamper" />
          </rule>
         <module path="MainApplication\bin\Release\MainApplication.exe" />
    </project>
    

    Component.Hardware.dll.crproj

    <project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
        <rule pattern="true" inherit="false">
            <protection id="rename" />
            <protection id="ctrl flow" />
            <protection id="ref proxy" />
            <protection id="anti debug" />
            <protection id="anti dump" />
            <protection id="constants" />
            <protection id="resources" />
            <protection id="anti tamper" />
          </rule>
         <module path="MainApplication\bin\Release\Component.Hardware.dll" />
    </project>
    

    【讨论】:

      猜你喜欢
      • 2014-08-01
      • 2017-01-08
      • 2018-07-25
      • 1970-01-01
      • 2017-07-18
      • 2019-01-08
      • 2018-03-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多