yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.63k forks source link

.crproj #100

Closed ghost closed 9 years ago

ghost commented 10 years ago

HI, the configuration file is hard to catch.

I have :

<project outputDir="FilesSwitcher\Confused" baseDir="FilesSwitcher" xmlns="http://confuser.codeplex.com">
  <module path="bin\Debug\FileSwitcher.exe">
    <rule pattern="true" preset="maximum">
      <protection id="anti ildasm" />
      <protection id="anti tamper" />
      <protection id="constants" />
      <protection id="ctrl flow" />
      <protection id="anti dump" />
      <protection id="anti debug" />
      <protection id="invalid metadata" />
      <protection id="ref proxy" />
      <protection id="resources" />
      <protection id="rename" />
    </rule>
  </module>
</project>

What is a rule pattern? 1 - For me, a rule should be defined under Project as Preset containing protections to use. 2 - A preset should be a property of the project and module, so home presets could be reuse with other modules.

The modified configuration file could be like this :

<project outputDir="FilesSwitcher\Confused" baseDir="FilesSwitcher" preset="myCustomPreset">
  <module path="bin\Debug\FileSwitcher.core.exe" preset="myCustomPreset" rules="rule1, rule2"/>
  <module path="bin\Debug\FileSwitcher.gui.exe" />
  <presets>
    <preset id="myCustomPreset">
      <protection id="anti ildasm" />
      <protection id="anti tamper" />
      <protection id="constants" />
      <protection id="ctrl flow" />
      <protection id="anti dump" />
      <protection id="anti debug" />
      <protection id="invalid metadata" />
      <protection id="ref proxy" />
      <protection id="resources" />
      <protection id="rename" />
    </preset>
  </presets>
  <rules>
    <rule id="rule1" pattern="true"></rule>
    <rule id="rule2" pattern="true"></rule>
  </rules>
</project>

I would be more then happy to help you with this PS : YOU ABSOLUTLTY NEED A FORUM!! Later

ghost commented 10 years ago

Ok i've found : https://github.com/yck1509/ConfuserEx/blob/master/docs/ProjectFormat.md

But you need a website + forum. What do you think?

CoolOppo commented 9 years ago

There is no need for a forum at all. The issues section is for that, and the wiki is for the docs to be posted in. I agree that there needs to be more documentation though pertaining to the .crproj format. I have been sitting here for 20 minutes trying to test out the extra parameters for Anti Debug Protection. I can't figure it out.

Edit: AH HAH! Thanks to an issue posted by @master131, I found the proper way of using the antinet mode for the Anti-Debug protection! Here's an example .cfrproj:

<project outputDir="Confused" baseDir="." xmlns="http://confuser.codeplex.com">
  <rule pattern="true" preset="maximum">
    <protection id="anti debug">
      <argument name="mode" value="antinet" />
    </protection>
  </rule>
  <module path="hi.exe" />
</project>

The original issue was #31