From 498454b28fdc2d6626e42f4d08816d8ffd594f45 Mon Sep 17 00:00:00 2001 From: "J. Fronny" <6260391-JFronny@users.noreply.gitlab.com> Date: Thu, 18 Jun 2020 16:26:53 +0000 Subject: [PATCH 1/7] Add .gitlab-ci.yml --- .gitlab-ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b8351f1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,44 @@ +.shared_windows_runners: + tags: + - shared-windows + - windows + - windows-1809 + +image: mcr.microsoft.com/dotnet/core/sdk + +before_script: + - dotnet restore + +uptool: + extends: + - .shared_windows_runners + stage: deploy + script: | + $(new-object System.Net.WebClient).DownloadFile("https://www.github.com/JFronny/UpTool2/releases/latest/download/Tools.zip", "$($(pwd).Path)\Tools.zip") + & "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip + rm Tools.zip + rm Install.bat + rm Remove.bat + mkdir .\build + dotnet publish -o .\build -c Release + $file = Get-Item $(Resolve-Path .\build\*.exe).Path + .\Data\pkgtool.exe build --binDir build --mainBin $file --packageFile .\package.zip --noLogo + $asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".dll")) + $asmver = $asm.GetName().Version.ToString() + [System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument + [System.XML.XMLElement]$app=$xml.CreateElement("app") + $xml.appendChild($app) + $app.appendChild($xml.CreateElement("Name")).InnerText = $asm.GetName().Name + $app.appendChild($xml.CreateElement("Description")).InnerText = "Tools for protecting applications written in .NET" + $app.appendChild($xml.CreateElement("Version")).InnerText = $asmver + $app.appendChild($xml.CreateElement("ID")).InnerText = "5a2bf095-2b8e-47dc-8ada-993385b2a7d7" + $app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/package.zip" + $app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\package.zip).Hash + echo NULL > app.xml + $xml.save($(gi .\app.xml).Fullname) + artifacts: + paths: + - package.zip + - app.xml + only: + - master From 439692ed91a391f97d45bff11412a344ee345de2 Mon Sep 17 00:00:00 2001 From: "J. Fronny" <6260391-JFronny@users.noreply.gitlab.com> Date: Thu, 18 Jun 2020 16:56:16 +0000 Subject: [PATCH 2/7] Update .gitlab-ci.yml --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b8351f1..b9134aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,10 +20,12 @@ uptool: rm Install.bat rm Remove.bat mkdir .\build - dotnet publish -o .\build -c Release + cd PostCompile + dotnet publish -o ..\build -c Release + cd .. $file = Get-Item $(Resolve-Path .\build\*.exe).Path .\Data\pkgtool.exe build --binDir build --mainBin $file --packageFile .\package.zip --noLogo - $asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".dll")) + $asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".exe")) $asmver = $asm.GetName().Version.ToString() [System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument [System.XML.XMLElement]$app=$xml.CreateElement("app") From dbfc4630bc02f94af9f796d372e08dd4255bd502 Mon Sep 17 00:00:00 2001 From: "J. Fronny" <6260391-JFronny@users.noreply.gitlab.com> Date: Thu, 18 Jun 2020 17:02:19 +0000 Subject: [PATCH 3/7] Update PostCompile.csproj --- PostCompile/PostCompile.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PostCompile/PostCompile.csproj b/PostCompile/PostCompile.csproj index 7b8da64..4e19186 100644 --- a/PostCompile/PostCompile.csproj +++ b/PostCompile/PostCompile.csproj @@ -4,6 +4,8 @@ Exe net472 8 + false + 1.0.* From 1572fd9dcc5ba210442a5498ec45c28adb9877a4 Mon Sep 17 00:00:00 2001 From: "J. Fronny" <6260391-JFronny@users.noreply.gitlab.com> Date: Thu, 18 Jun 2020 17:07:21 +0000 Subject: [PATCH 4/7] Delete .gitlab-ci.yml --- .gitlab-ci.yml | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b9134aa..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,46 +0,0 @@ -.shared_windows_runners: - tags: - - shared-windows - - windows - - windows-1809 - -image: mcr.microsoft.com/dotnet/core/sdk - -before_script: - - dotnet restore - -uptool: - extends: - - .shared_windows_runners - stage: deploy - script: | - $(new-object System.Net.WebClient).DownloadFile("https://www.github.com/JFronny/UpTool2/releases/latest/download/Tools.zip", "$($(pwd).Path)\Tools.zip") - & "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip - rm Tools.zip - rm Install.bat - rm Remove.bat - mkdir .\build - cd PostCompile - dotnet publish -o ..\build -c Release - cd .. - $file = Get-Item $(Resolve-Path .\build\*.exe).Path - .\Data\pkgtool.exe build --binDir build --mainBin $file --packageFile .\package.zip --noLogo - $asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".exe")) - $asmver = $asm.GetName().Version.ToString() - [System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument - [System.XML.XMLElement]$app=$xml.CreateElement("app") - $xml.appendChild($app) - $app.appendChild($xml.CreateElement("Name")).InnerText = $asm.GetName().Name - $app.appendChild($xml.CreateElement("Description")).InnerText = "Tools for protecting applications written in .NET" - $app.appendChild($xml.CreateElement("Version")).InnerText = $asmver - $app.appendChild($xml.CreateElement("ID")).InnerText = "5a2bf095-2b8e-47dc-8ada-993385b2a7d7" - $app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/package.zip" - $app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\package.zip).Hash - echo NULL > app.xml - $xml.save($(gi .\app.xml).Fullname) - artifacts: - paths: - - package.zip - - app.xml - only: - - master From 81cf2047302b4a8b5872c3a6dbe5157c573cf9c3 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 23 Jun 2020 08:58:12 +0000 Subject: [PATCH 5/7] Add renovate.json --- renovate.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..f45d8f1 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base" + ] +} From d9455af4396440dd881e379381214f1cd14608f6 Mon Sep 17 00:00:00 2001 From: "J. Fronny" <6260391-JFronny@users.noreply.gitlab.com> Date: Sat, 27 Jun 2020 16:29:14 +0000 Subject: [PATCH 6/7] Add LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8b3f41c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 J. Fronny + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From d9d368925f3e09a5c2136c973f82f7ead857d26d Mon Sep 17 00:00:00 2001 From: "J. Fronny" <6260391-JFronny@users.noreply.gitlab.com> Date: Wed, 1 Jul 2020 12:49:22 +0000 Subject: [PATCH 7/7] Add .gitlab-ci.yml --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..860c584 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ +.shared_windows_runners: + tags: + - windows + +before_script: + - dotnet restore + +uptool: + extends: + - .shared_windows_runners + stage: deploy + script: | + $(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Tools.zip?job=uptool", "$($(pwd).Path)\Tools.zip") + & "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip + rm Tools.zip + rm Install.bat + rm Remove.bat + mkdir .\build + #dotnet publish -o .\build -c Release + & "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe" -noLogo -verbosity:m -p:Configuration=Release + cp .\\PostCompile\bin\Release\net461\* .\build\ + cp .\build\package.zip .\ + $file = Get-Item $(Resolve-Path .\build\*.exe).Path + [timespan]$span = [System.DateTime]::Now - [datetime]'01/01/2000' + [System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument + [System.XML.XMLElement]$app=$xml.CreateElement("app") + $xml.appendChild($app) + $app.appendChild($xml.CreateElement("Name")).InnerText = "PostCrypt" + $app.appendChild($xml.CreateElement("Description")).InnerText = "Pack .NET FX applications in encrypted EXEs to prevent decompilation (quite easy to bypass)" + $app.appendChild($xml.CreateElement("Version")).InnerText = "1.0." + $span.Days.ToString() + "." + [math]::Round(($span.Seconds + ($span.Minutes + $span.Hours * 60) * 60) / 2).ToString() + $app.appendChild($xml.CreateElement("ID")).InnerText = "ec7cf340-c332-4f67-aa51-42b85b16381c" + $app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/package.zip" + $app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\package.zip).Hash + $app.appendChild($xml.CreateElement("MainFile")).InnerText = "PostCompile.exe" + echo NULL > app.xml + $xml.save($(gi .\app.xml).Fullname) + artifacts: + paths: + - package.zip + - app.xml + only: + - master