-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from VAllens/develop
Merge first version
- Loading branch information
Showing
23 changed files
with
773 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: .NET Build | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore Obfuscation.Fody project dependencies | ||
run: dotnet restore src/Obfuscation.Fody/Obfuscation.Fody.csproj | ||
- name: Restore Obfuscation.Fody.NuGet project dependencies | ||
run: dotnet restore src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj | ||
- name: Build Obfuscation.Fody project | ||
run: dotnet build src/Obfuscation.Fody/Obfuscation.Fody.csproj --no-restore --configuration Release | ||
- name: Build Obfuscation.Fody.NuGet project | ||
run: dotnet build src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj --no-restore --configuration Release | ||
- name: Pack Obfuscation.Fody.NuGet project | ||
run: dotnet pack src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj --no-build --configuration Release | ||
- name: Test | ||
run: dotnet test --no-build --verbosity normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: NuGet publish | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore Obfuscation.Fody project dependencies | ||
run: dotnet restore src/Obfuscation.Fody/Obfuscation.Fody.csproj | ||
- name: Restore Obfuscation.Fody.NuGet project dependencies | ||
run: dotnet restore src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj | ||
- name: Build Obfuscation.Fody project | ||
run: dotnet build src/Obfuscation.Fody/Obfuscation.Fody.csproj --no-restore --configuration Release | ||
- name: Build Obfuscation.Fody.NuGet project | ||
run: dotnet build src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj --no-restore --configuration Release | ||
- name: Pack Obfuscation.Fody.NuGet project | ||
run: dotnet pack src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj --no-build --configuration Release | ||
- name: publish nuget package on version change | ||
uses: rohith/publish-nuget@v2 | ||
with: | ||
PROJECT_FILE_PATH: src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<LangVersion>latest</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<RootNamespace>Obfuscation.Fody</RootNamespace> | ||
<Product>Obfuscation.Fody</Product> | ||
<Description>Fody extension to modify ObfuscationAttribute</Description> | ||
<Copyright>Copyright © Allen All Rights Reserved</Copyright> | ||
<Authors>Allen</Authors> | ||
<Version>1.0.0</Version> | ||
<RepositoryUrl>https://github.com/VAllens/Obfuscation.Fody</RepositoryUrl> | ||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<SolutionDir Condition=" '$(SolutionDir)' == '' ">$(ProjectDir)..\..\</SolutionDir> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# Obfuscation.Fody | ||
Fody extension to modify ObfuscationAttribute | ||
|
||
## This is a [Fody](https://github.com/Fody/Fody) extension to modify `ObfuscationAttribute`. | ||
|
||
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: | ||
|
||
```xml | ||
<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. | ||
|
||
[Attribute targets](https://docs.microsoft.com/en-us/dotnet/api/system.attributetargets) Support: | ||
|
||
- 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) |
Oops, something went wrong.