Skip to content

VAllens/Obfuscation.Fody

Repository files navigation

Obfuscation.Fody Obfuscation.Fody

.NET Build NuGet Publish CodeQL

Summary

This is a Fody extension to modify ObfuscationAttribute.

Usage

.NET CLI:

dotnet add package Obfuscation.Fody --version 1.0.0

or PowerShell:

Install-Package Obfuscation.Fody -Version 1.0.0

or Edit project items:

<ItemGroup>
  <PackageReference Include="Obfuscation.Fody" Version="1.0.0" />
</ItemGroup>

It will get the attribute target that contains ObfuscationAttribute, and filter out the attribute target whose Exclude property value is equal to true, and modify the eligible Feature property value. Other properties remain the same.

It has one configuration element:

<Obfuscation Feature="EXCLUDE:NECROBIT,STRINGENCRYPTION,ANTITAMP,CONTROLFLOW,SNREMOVAL;INCLUDE:OBFUSCATION" Append="true" />

The Feature configuration item will be used to modify the Feature property of the ObfuscationAttribute. The Feature configuration item is required, otherwise the Obfuscation.Fody extension does not work.

The Append configuration item will decide whether to override the original Feature property value or append it. The Append default value is false, it is optional.

Support

Attribute targets:

  • Assembly
  • Class
  • Struct
  • Enum
  • Method
  • Property
  • Field
  • Event
  • Interface
  • Parameter
  • Delegate
  • Record (a special class)
  • Indexer (a special property)
  • Destructor (a special method)
  • Constructor parameters (The Constructor is a special method)

Samples

Authors

License