diff --git a/Maat.Data/Maat.Data.csproj b/Maat.Data/Maat.Data.csproj index f8c1cba..a8becef 100644 --- a/Maat.Data/Maat.Data.csproj +++ b/Maat.Data/Maat.Data.csproj @@ -20,6 +20,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Maat.Runner/Maat.Runner.csproj b/Maat.Runner/Maat.Runner.csproj index d31760f..c52d7cc 100644 --- a/Maat.Runner/Maat.Runner.csproj +++ b/Maat.Runner/Maat.Runner.csproj @@ -24,6 +24,7 @@ + diff --git a/Maat.Runner/Properties/PublishProfiles/SingleApp.pubxml.user b/Maat.Runner/Properties/PublishProfiles/SingleApp.pubxml.user index 11e16fe..97c6a48 100644 --- a/Maat.Runner/Properties/PublishProfiles/SingleApp.pubxml.user +++ b/Maat.Runner/Properties/PublishProfiles/SingleApp.pubxml.user @@ -1,6 +1,6 @@  - False|2024-04-03T16:54:46.2558736Z;False|2024-04-03T18:53:40.5084714+02:00;False|2024-04-03T18:52:58.5201680+02:00; + False|2024-04-04T07:20:19.1194551Z;False|2024-04-04T07:54:11.6078436+02:00;False|2024-04-03T18:57:56.8357860+02:00;False|2024-04-03T18:57:31.1394991+02:00;False|2024-04-03T18:56:30.3461610+02:00;False|2024-04-03T18:55:50.6292479+02:00;False|2024-04-03T18:54:46.2558736+02:00;False|2024-04-03T18:53:40.5084714+02:00;False|2024-04-03T18:52:58.5201680+02:00; \ No newline at end of file diff --git a/Maat.Runner/nuget.config b/Maat.Runner/nuget.config index 9061cfb..72b8195 100644 --- a/Maat.Runner/nuget.config +++ b/Maat.Runner/nuget.config @@ -1,14 +1,14 @@ - + - - + + - - + - - + + + - \ No newline at end of file + \ No newline at end of file diff --git a/obfuscar.orig.xml b/obfuscar.orig.xml new file mode 100644 index 0000000..68c8c6e --- /dev/null +++ b/obfuscar.orig.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/obfuscar.xml b/obfuscar.xml new file mode 100644 index 0000000..af04bf8 --- /dev/null +++ b/obfuscar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/obfuscate.ps1 b/obfuscate.ps1 new file mode 100644 index 0000000..384672f --- /dev/null +++ b/obfuscate.ps1 @@ -0,0 +1,48 @@ +param([string]$CurrConfig); + +#verifico se encessario installare come global tool +$testString = dotnet tool list -g | Select-String -Pattern "obfuscar.globaltool" +if($testString -eq $null) +{ + Write-Output("Installing obfuscar as global tool") + dotnet tool install --global Obfuscar.GlobalTool --version 2.2.33 +} +else +{ + Write-Output("Obfuscar already installed!") + #dotnet tool update --global Obfuscar.GlobalTool --version 2.2.33 +} + +# fix folder obf +$FolderName = "\bin\Debug\net6.0_obf\" +if (Test-Path $FolderName) { + + Write-Host "Folder Exists" +} +else { + + #PowerShell Create directory if not exists + New-Item $FolderName -ItemType Directory + Write-Host "Folder Created successfully" + +} + +# sistemo XML x usare la conf corrente +$OrigConfPath = "obfuscar.orig.xml" +$ConfigPath = "obfuscar.xml" +$configFile = Get-Content $OrigConfPath +$find = "{{CURR_CONFIG}}"; +$configFileUpd = $configFile -replace $find, $CurrConfig +Set-Content -Path $ConfigPath -Value $configFileUpd +Write-Output("Config File set:") +Write-Output($configFileUpd) + +# chiamo script principale +#C:\Users\samuele.steamw\.dotnet\tools\obfuscar.console.exe obfuscar.xml +obfuscar.console.exe obfuscar.xml +#obfuscar.console obfuscar.xml +Write-Output("Obfuscar completed!") + +# sovrascrivo dll originali con i file elaborati +Copy-Item .\bin\$CurrConfig\net6.0_obf\*.dll .\bin\$CurrConfig\net6.0\ +Write-Output("Obfuscated dll copy completed!")