Resource Sanitization

Eazfuscator.NET

Resource Sanitization

Introduction

<request id="1">
  <reference>REQ-D2867DBE</reference>
  <destination>Contoso Headquarters</destination>
  <!-- For the full list of types see https://example.net/internal/docs/contoso-protocol-doc.html -->
  <type>43</type>
</request>
<request id="1">
  <reference>REQ-D2867DBE</reference>
  <destination>Contoso Headquarters</destination>
  <type>43</type>
</request>

Instructions

To enable resource sanitization you should apply an attribute to your assembly. In order to do that you can use the instructions below.
  1. Open obfuscatable project inside the IDE
  2. Add new source file to the project and call it ObfuscationSettings.cs (for C#) or ObfuscationSettings.vb (for Visual Basic .NET). You may prefer to use another name instead of ObfuscationSettings.cs or ObfuscationSettings.vb
  3. using System;
    using System.Reflection;
    
    [assembly: Obfuscation(Feature = "sanitize resources", Exclude = false)]
    Imports System
    Imports System.Reflection
    
    <Assembly: Obfuscation(Feature:="sanitize resources", Exclude:=False)> 
    

Minification

<request id="1">
  <reference>REQ-D2867DBE</reference>
  <destination>Contoso Headquarters</destination>
  <type>43</type>
</request>
<request id="1"><reference>REQ-D2867DBE</reference><destination>Contoso Headquarters</destination><type>43</type></request>
using System;
using System.Reflection;

[assembly: Obfuscation(Feature = "sanitize resources [minify]", Exclude = false)]

Selective Resource Sanitization

using System;
using System.Reflection;

[assembly: Obfuscation(Feature = "sanitize resources", Exclude = false)]
[assembly: Obfuscation(Feature = "sanitize resources [exclude] *.png", Exclude = false)]
using System;
using System.Reflection;

[assembly: Obfuscation(Feature = "sanitize resources secret.xml", Exclude = false)]
[assembly: Obfuscation(Feature = "sanitize resources *.jpg", Exclude = false)]

Options are Combinable

using System;
using System.Reflection;

[assembly: Obfuscation(Feature = "sanitize resources", Exclude = false)]
[assembly: Obfuscation(Feature = "sanitize resources [exclude] *.png", Exclude = false)]
[assembly: Obfuscation(Feature = "sanitize resources [exclude] *.jpg", Exclude = false)]
[assembly: Obfuscation(Feature = "sanitize resources [minify] License.xml", Exclude = false)]
[assembly: Obfuscation(Feature = "sanitize resources [minify] Help.xml", Exclude = false)]