Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ jobs:
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
6.0.x
8.0.x
10.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
Expand All @@ -72,12 +70,12 @@ jobs:

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild ${{ env.SolutionPath }} /t:Restore /p:Configuration=${{ env.Configuration }} /p:Platform=x64 /v:m
run: msbuild ${{ env.SolutionPath }} /t:Restore /p:Configuration=${{ env.Configuration }} /p:Platform=x64 /v:m /bl:artifacts/logs/restore.binlog
env:
Configuration: Release

- name: Build
run: msbuild ${{ env.SolutionPath }} /p:Configuration=${{ env.Configuration }} /p:Platform=x64 /v:m
run: msbuild ${{ env.SolutionPath }} /p:Configuration=${{ env.Configuration }} /p:Platform=x64 /v:m /bl:artifacts/logs/build.binlog

- name: Setup VSTest
uses: Malcolmnixon/Setup-VSTest@v4
Expand Down Expand Up @@ -133,4 +131,24 @@ jobs:
artifacts\bin\ConfuserEx\${{ env.Configuration }}_net10.0-windows
!artifacts\bin\ConfuserEx\${{ env.Configuration }}_net10.0-windows\*.pdb
!artifacts\bin\ConfuserEx\${{ env.Configuration }}_net10.0-windows\*.xml

- name: Upload Build log artifacts
uses: actions/upload-artifact@v6
with:
name: logs
path: |
artifacts\logs\*.binlog

- name: push to NuGet
# Only push to NuGet if we're building a tag (optional)
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
shell: pwsh
# Loop through all the packages in the output folder and push them to
# nuget.org, using the NUGET_API_KEY generated by the previous login step
run: |
Get-ChildItem artifacts\package\${{ env.Configuration }} -Filter *.nupkg | ForEach-Object {
dotnet nuget push $_.FullName `
--api-key "${{ secrets.MYGET_CI_API_KEY }}" `
--source https://www.myget.org/F/obfuscation/api/v3/index.json
}

6 changes: 6 additions & 0 deletions Confuser.Core/Confuser.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
<PropertyGroup Label="Assembly Settings">
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
<Title>ConfuserEx Core</Title>
<Description>Core framework of ConfuserEx</Description>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Label="Nuget Dependencies">
<PackageReference Include="dnlib" Version="4.5.0" />
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.7.0" />
Expand Down
4 changes: 4 additions & 0 deletions Confuser.Core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Confuser.Core
================

Core framework of ConfuserEx. It contains the core services and obfuscation process support logic. Project support, compression using LZMA.
6 changes: 6 additions & 0 deletions Confuser.DynCipher/Confuser.DynCipher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
<PropertyGroup Label="Assembly Settings">
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
<Title>ConfuserEx Dynamic Cipher Library</Title>
<Description>Cipher generator of ConfuserEx</Description>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Label="Project Dependencies">
<ProjectReference Include="..\Confuser.Core\Confuser.Core.csproj" />
</ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions Confuser.DynCipher/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Confuser.DynCipher
================

Dynamic cipher library for ConfuserEx.
4 changes: 2 additions & 2 deletions Confuser.MSBuild.Tasks/Confuser.MSBuild.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Product>ConfuserEx - MSBuild Integration</Product>
<Description>This package contains the integration of ConfuserEx into the MSBuild build procedure. It allows automatically obfuscating the assemblies during the build.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/mkaring/ConfuserEx</PackageProjectUrl>
<PackageProjectUrl>https://github.com/kant2002/ConfuserEx</PackageProjectUrl>
<PackageTags>Obfuscation Confuser ConfuserEx</PackageTags>
<DevelopmentDependency>true</DevelopmentDependency>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand All @@ -30,7 +30,7 @@
<ProjectReference Include="..\Confuser.Core\Confuser.Core.csproj" PrivateAssets="all" />
<ProjectReference Include="..\Confuser.Protections\Confuser.Protections.csproj" PrivateAssets="all" />
<ProjectReference Include="..\Confuser.Renamer\Confuser.Renamer.csproj" PrivateAssets="all" />
<ProjectReference Include="..\Confuser.Runtime\Confuser.Runtime.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\Confuser.Runtime\Confuser.Runtime.csproj" ReferenceOutputAssembly="false" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
49 changes: 45 additions & 4 deletions Confuser.Protections/Confuser.Protections.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@
<PropertyGroup Label="Assembly Settings">
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<RuntimeProject>..\Confuser.Runtime\Confuser.Runtime.csproj</RuntimeProject>
<PackageReadmeFile>README.md</PackageReadmeFile>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeConfuserDependencyFiles</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
<Title>ConfuserEx Protections</Title>
<Description>Protections and packers of ConfuserEx</Description>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Label="Project Dependencies">
<ProjectReference Include="..\Confuser.DynCipher\Confuser.DynCipher.csproj" />
<ProjectReference Include="..\Confuser.Renamer\Confuser.Renamer.csproj" />
<ProjectReference Include="..\Confuser.Runtime\Confuser.Runtime.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\Confuser.Runtime\Confuser.Runtime.csproj" ReferenceOutputAssembly="false" PrivateAssets="all" />
</ItemGroup>

<Import Project="..\ConfuserEx.Common.targets" Condition="Exists('..\ConfuserEx.Common.targets')" />
Expand All @@ -26,11 +33,45 @@
<RuntimeProjectFramework Include="$(TargetFrameworks)" />
</ItemGroup>

<PropertyGroup>
<IncludeConfuserDependencyFilesDependsOn>
IncludeConfuserDependencyFilesFramework;
IncludeConfuserDependencyFilesStandard
</IncludeConfuserDependencyFilesDependsOn>
</PropertyGroup>

<Target Name="IncludeConfuserDependencyFiles" DependsOnTargets="$(IncludeConfuserDependencyFilesDependsOn)" />

<Target Name="IncludeConfuserDependencyFilesFramework"
DependsOnTargets="CollectRuntimeOutputs"
Condition="'$(TargetFramework)' == 'net472'">
<PropertyGroup>
<PTEST_11>$(BaseOutputPath)$(ArtifactsPivots)</PTEST_11>
</PropertyGroup>
<ItemGroup>
<ConfuserNetFrameworkDependencies Include="$(BaseOutputPath)$(ArtifactsPivots)\runtime\net8.0\*.dll" PackagePath="lib\net472\runtime\net8.0" />
<ConfuserNetFrameworkDependencies Include="$(BaseOutputPath)$(ArtifactsPivots)\runtime\net472\*.dll" PackagePath="lib\net472\runtime\net472" />
</ItemGroup>
<CreateItem Include="@(ConfuserNetFrameworkDependencies)">
<Output TaskParameter="Include" ItemName="TfmSpecificPackageFile" />
</CreateItem>
</Target>

<Target Name="IncludeConfuserDependencyFilesStandard"
DependsOnTargets="CollectRuntimeOutputs"
Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup>
<ConfuserNetDependencies Include="$(BaseOutputPath)$(ArtifactsPivots)\runtime\net8.0\*.dll" PackagePath="lib\net8.0\runtime\net8.0" />
<ConfuserNetDependencies Include="$(BaseOutputPath)$(ArtifactsPivots)\runtime\net472\*.dll" PackagePath="lib\net8.0\runtime\net472" />
</ItemGroup>
<CreateItem Include="@(ConfuserNetDependencies)">
<Output TaskParameter="Include" ItemName="TfmSpecificPackageFile" />
</CreateItem>
</Target>

<Target Name="BuildRuntimeProject" BeforeTargets="Build">

<MSBuild Projects="$(RuntimeProject)" Targets="Build"
Properties="Configuration=$(Configuration);TargetFramework=%(RuntimeProjectFramework.Identity)"
BuildInParallel="true" />
<MSBuild Projects="$(RuntimeProject)" Targets="Build" Properties="Configuration=$(Configuration);TargetFramework=%(RuntimeProjectFramework.Identity)" BuildInParallel="true" />

</Target>

Expand Down
4 changes: 4 additions & 0 deletions Confuser.Protections/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Confuser.Protection
================

Confuser.Protection is a library that contains the implementations of the protection logic for protecting .NET assemblies. It includes various protection techniques such as control flow obfuscation, anti-debugging, anti-tampering, and more. Each protection technique is implemented as a separate class that inherits from the `Protection` base class, allowing for easy integration and customization within the ConfuserEx framework.
6 changes: 6 additions & 0 deletions Confuser.Renamer/Confuser.Renamer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
<PropertyGroup Label="Assembly Settings">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
<Title>ConfuserEx Renamer</Title>
<Description>Renaming analysis of ConfuserEx</Description>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Web" Condition="'$(TargetFramework)' == 'net472'" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions Confuser.Renamer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Confuser.Renamer
================

Renaming analysis of ConfuserEx. It contains the implementations of the renaming logic for protecting .NET assemblies.

6 changes: 6 additions & 0 deletions Confuser.Runtime/Confuser.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
<Title>ConfuserEx Runtime</Title>
<Description>Runtime library of ConfuserEx</Description>
</PropertyGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" Condition="$(TargetFramework) == 'net472'">
<PrivateAssets>all</PrivateAssets>
Expand Down
4 changes: 4 additions & 0 deletions Confuser.Runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Confuser.Runtime
================

Runtime which is used by ConfuserEx to protect .NET assemblies. It contains the implementations of the anti-tamper and anti-debugging features, as well as the decryption logic for encrypted strings and resources.
6 changes: 3 additions & 3 deletions Confuser2.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
<Project Path="Confuser.Core/Confuser.Core.csproj" />
<Project Path="Confuser.DynCipher/Confuser.DynCipher.csproj" />
<Project Path="Confuser.MSBuild.Tasks/Confuser.MSBuild.Tasks.csproj" />
<Project Path="Confuser.Protections/Confuser.Protections.csproj" />
<Project Path="Confuser.Renamer/Confuser.Renamer.csproj" />
<Project Path="Confuser.Runtime/Confuser.Runtime.csproj">
<Project Path="Confuser.Protections/Confuser.Protections.csproj">
<BuildDependency Project="Confuser.Core/Confuser.Core.csproj" />
</Project>
<Project Path="Confuser.Renamer/Confuser.Renamer.csproj" />
<Project Path="Confuser.Runtime/Confuser.Runtime.csproj" />
<Project Path="ConfuserEx/ConfuserEx.csproj" />
</Solution>
6 changes: 6 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<UseArtifactsOutput>true</UseArtifactsOutput>
<!--<LangVersion>11.0</LangVersion>-->
<NoWarn>$(NoWarn);NU1702</NoWarn>
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
Expand All @@ -20,4 +21,9 @@
<SourceLinkServerType>GitHub</SourceLinkServerType>
<SourceLinkOriginUrl>$(RepositoryUrl)</SourceLinkOriginUrl>
</PropertyGroup>

<ItemGroup>
<NuGetAuditSuppress Include="https://www.myget.org/F/dnlib-kant2002/api/v3/index.json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Confuser.CLI\Confuser.CLI.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\Confuser.CLI\Confuser.CLI.csproj" ReferenceOutputAssembly="false" PrivateAssets="all"/>
<ProjectReference Include="..\Confuser.UnitTest\Confuser.UnitTest.csproj" />
<ProjectReference Include="..\..\Confuser.MSBuild.Tasks\Confuser.MSBuild.Tasks.csproj" />
</ItemGroup>
Expand Down
Loading