From d69908e427d5f2a68842348a82b1e6f03c805276 Mon Sep 17 00:00:00 2001 From: makikvues Date: Tue, 6 Jul 2021 14:08:03 +0200 Subject: [PATCH 1/6] - CI-winpeas_test.yml updates --- .github/workflows/CI-winpeas_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI-winpeas_test.yml b/.github/workflows/CI-winpeas_test.yml index 5889b7c..3373ad6 100644 --- a/.github/workflows/CI-winpeas_test.yml +++ b/.github/workflows/CI-winpeas_test.yml @@ -25,11 +25,11 @@ jobs: - name: Checkout uses: actions/checkout@v2 - # Install the .NET Core workload - - name: Install .NET 4.x.x + # Install the .NET + - name: Install .NET 4.5.2 uses: actions/setup-dotnet@v1 with: - dotnet-version: 4.5.2 + dotnet-version: '4.5.2' # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe From 6acb8a29f8458af9eb77826eb30bb44efd1a506a Mon Sep 17 00:00:00 2001 From: makikvues Date: Tue, 6 Jul 2021 14:18:31 +0200 Subject: [PATCH 2/6] - added source-url --- .github/workflows/CI-winpeas_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI-winpeas_test.yml b/.github/workflows/CI-winpeas_test.yml index 3373ad6..52c74b8 100644 --- a/.github/workflows/CI-winpeas_test.yml +++ b/.github/workflows/CI-winpeas_test.yml @@ -30,6 +30,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: '4.5.2' + source-url: https://www.nuget.org/packages/rb.DotNet4.5.2 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe From da4862f85a4fe5d3b7db3df4c41ac3b5b26b4002 Mon Sep 17 00:00:00 2001 From: makikvues Date: Tue, 6 Jul 2021 14:24:18 +0200 Subject: [PATCH 3/6] - removed .net installation from github action --- .github/workflows/CI-winpeas_test.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/CI-winpeas_test.yml b/.github/workflows/CI-winpeas_test.yml index 52c74b8..bb35a64 100644 --- a/.github/workflows/CI-winpeas_test.yml +++ b/.github/workflows/CI-winpeas_test.yml @@ -24,13 +24,7 @@ jobs: # checkout - name: Checkout uses: actions/checkout@v2 - - # Install the .NET - - name: Install .NET 4.5.2 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '4.5.2' - source-url: https://www.nuget.org/packages/rb.DotNet4.5.2 + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe From f1316db5f384b33e5a2a50c5086a934281731724 Mon Sep 17 00:00:00 2001 From: makikvues Date: Tue, 6 Jul 2021 14:34:12 +0200 Subject: [PATCH 4/6] - replaced packages.config with PackageReference --- .../winPEASexe/winPEAS.Tests/packages.config | 7 ---- .../winPEAS.Tests/winPEAS.Tests.csproj | 40 +++++-------------- 2 files changed, 11 insertions(+), 36 deletions(-) delete mode 100644 winPEAS/winPEASexe/winPEAS.Tests/packages.config diff --git a/winPEAS/winPEASexe/winPEAS.Tests/packages.config b/winPEAS/winPEASexe/winPEAS.Tests/packages.config deleted file mode 100644 index 630c1de..0000000 --- a/winPEAS/winPEASexe/winPEAS.Tests/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj b/winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj index e424d5c..6564538 100644 --- a/winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj +++ b/winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj @@ -1,8 +1,5 @@  - - - Debug @@ -42,15 +39,6 @@ 4 - - ..\packages\Microsoft.CodeCoverage.16.10.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll - - - ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - @@ -58,29 +46,23 @@ - - - {d934058e-a7db-493f-a741-ae8e3df867f4} winPEAS + + + 16.10.0 + + + 2.1.2 + + + 2.1.2 + + - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - \ No newline at end of file From 1af100d9c495396cf6722719c704ff7cf6351cda Mon Sep 17 00:00:00 2001 From: makikvues Date: Tue, 6 Jul 2021 15:19:49 +0200 Subject: [PATCH 5/6] - updates tests project - updated github action --- .github/workflows/CI-winpeas_test.yml | 8 +- winPEAS/winPEASexe/Tests/App.config | 6 ++ winPEAS/winPEASexe/Tests/Program.cs | 15 ++++ .../Tests/Properties/AssemblyInfo.cs | 36 ++++++++ .../{winPEAS.Tests => Tests}/SmokeTests.cs | 0 winPEAS/winPEASexe/Tests/packages.config | 7 ++ winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj | 89 +++++++++++++++++++ .../winPEAS.Tests/Properties/AssemblyInfo.cs | 20 ----- .../winPEAS.Tests/winPEAS.Tests.csproj | 68 -------------- winPEAS/winPEASexe/winPEAS.sln | 26 +++--- 10 files changed, 172 insertions(+), 103 deletions(-) create mode 100644 winPEAS/winPEASexe/Tests/App.config create mode 100644 winPEAS/winPEASexe/Tests/Program.cs create mode 100644 winPEAS/winPEASexe/Tests/Properties/AssemblyInfo.cs rename winPEAS/winPEASexe/{winPEAS.Tests => Tests}/SmokeTests.cs (100%) create mode 100644 winPEAS/winPEASexe/Tests/packages.config create mode 100644 winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj delete mode 100644 winPEAS/winPEASexe/winPEAS.Tests/Properties/AssemblyInfo.cs delete mode 100644 winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj diff --git a/.github/workflows/CI-winpeas_test.yml b/.github/workflows/CI-winpeas_test.yml index bb35a64..daa92a4 100644 --- a/.github/workflows/CI-winpeas_test.yml +++ b/.github/workflows/CI-winpeas_test.yml @@ -24,15 +24,19 @@ jobs: # checkout - name: Checkout uses: actions/checkout@v2 - # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.0.2 + + # Setup NuGet + - name: Setup NuGet.exe + uses: nuget/setup-nuget@v1 # Restore the packages for testing - name: Restore the application - run: msbuild -m $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration + # run: msbuild -m $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration + run: nuget restore $env:Solution_Path # build - name: run MSBuild diff --git a/winPEAS/winPEASexe/Tests/App.config b/winPEAS/winPEASexe/Tests/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/winPEAS/winPEASexe/Tests/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/Tests/Program.cs b/winPEAS/winPEASexe/Tests/Program.cs new file mode 100644 index 0000000..1cb78d4 --- /dev/null +++ b/winPEAS/winPEASexe/Tests/Program.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tests +{ + class Program + { + static void Main(string[] args) + { + } + } +} diff --git a/winPEAS/winPEASexe/Tests/Properties/AssemblyInfo.cs b/winPEAS/winPEASexe/Tests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4f5cbeb --- /dev/null +++ b/winPEAS/winPEASexe/Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tests")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("66aa4619-4d0f-4226-9d96-298870e9bb50")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/winPEAS/winPEASexe/winPEAS.Tests/SmokeTests.cs b/winPEAS/winPEASexe/Tests/SmokeTests.cs similarity index 100% rename from winPEAS/winPEASexe/winPEAS.Tests/SmokeTests.cs rename to winPEAS/winPEASexe/Tests/SmokeTests.cs diff --git a/winPEAS/winPEASexe/Tests/packages.config b/winPEAS/winPEASexe/Tests/packages.config new file mode 100644 index 0000000..fce08e4 --- /dev/null +++ b/winPEAS/winPEASexe/Tests/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj b/winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj new file mode 100644 index 0000000..4c8f64f --- /dev/null +++ b/winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj @@ -0,0 +1,89 @@ + + + + + + + + Debug + AnyCPU + {66AA4619-4D0F-4226-9D96-298870E9BB50} + Exe + Tests + Tests + v4.5.2 + 512 + true + true + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Microsoft.CodeCoverage.16.10.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll + + + ..\packages\MSTest.TestFramework.2.2.5\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + ..\packages\MSTest.TestFramework.2.2.5\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + + + + + + + + + + + + + + + + + + + + {d934058e-a7db-493f-a741-ae8e3df867f4} + winPEAS + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/winPEAS.Tests/Properties/AssemblyInfo.cs b/winPEAS/winPEASexe/winPEAS.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 4a29b7d..0000000 --- a/winPEAS/winPEASexe/winPEAS.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("winPEAS.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("winPEAS.Tests")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("52a3b7ff-a1ad-4b41-ab4c-21c7f95ce42f")] - -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj b/winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj deleted file mode 100644 index 6564538..0000000 --- a/winPEAS/winPEASexe/winPEAS.Tests/winPEAS.Tests.csproj +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Debug - AnyCPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F} - Library - Properties - winPEAS.Tests - winPEAS.Tests - v4.5.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - {d934058e-a7db-493f-a741-ae8e3df867f4} - winPEAS - - - - - 16.10.0 - - - 2.1.2 - - - 2.1.2 - - - - - \ No newline at end of file diff --git a/winPEAS/winPEASexe/winPEAS.sln b/winPEAS/winPEASexe/winPEAS.sln index 13c82b3..516c817 100755 --- a/winPEAS/winPEASexe/winPEAS.sln +++ b/winPEAS/winPEASexe/winPEAS.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.29326.143 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winPEAS", "winPEAS\winPEAS.csproj", "{D934058E-A7DB-493F-A741-AE8E3DF867F4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winPEAS.Tests", "winPEAS.Tests\winPEAS.Tests.csproj", "{52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winPEAS.Tests", "Tests\winPEAS.Tests.csproj", "{66AA4619-4D0F-4226-9D96-298870E9BB50}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -29,18 +29,18 @@ Global {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x64.Build.0 = Release|x64 {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x86.ActiveCfg = Release|x86 {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x86.Build.0 = Release|x86 - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Debug|x64.ActiveCfg = Debug|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Debug|x64.Build.0 = Debug|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Debug|x86.ActiveCfg = Debug|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Debug|x86.Build.0 = Debug|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Release|Any CPU.Build.0 = Release|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Release|x64.ActiveCfg = Release|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Release|x64.Build.0 = Release|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Release|x86.ActiveCfg = Release|Any CPU - {52A3B7FF-A1AD-4B41-AB4C-21C7F95CE42F}.Release|x86.Build.0 = Release|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x64.ActiveCfg = Debug|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x64.Build.0 = Debug|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x86.ActiveCfg = Debug|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x86.Build.0 = Debug|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|Any CPU.Build.0 = Release|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x64.ActiveCfg = Release|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x64.Build.0 = Release|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x86.ActiveCfg = Release|Any CPU + {66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From f4bb5dcb9d7999877320578810f4420876ad1da6 Mon Sep 17 00:00:00 2001 From: makikvues Date: Tue, 6 Jul 2021 16:56:28 +0200 Subject: [PATCH 6/6] - tests update --- winPEAS/winPEASexe/Tests/Program.cs | 15 --------------- winPEAS/winPEASexe/Tests/SmokeTests.cs | 2 +- winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj | 6 ++++-- 3 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 winPEAS/winPEASexe/Tests/Program.cs diff --git a/winPEAS/winPEASexe/Tests/Program.cs b/winPEAS/winPEASexe/Tests/Program.cs deleted file mode 100644 index 1cb78d4..0000000 --- a/winPEAS/winPEASexe/Tests/Program.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tests -{ - class Program - { - static void Main(string[] args) - { - } - } -} diff --git a/winPEAS/winPEASexe/Tests/SmokeTests.cs b/winPEAS/winPEASexe/Tests/SmokeTests.cs index 1cc6dd4..d869952 100644 --- a/winPEAS/winPEASexe/Tests/SmokeTests.cs +++ b/winPEAS/winPEASexe/Tests/SmokeTests.cs @@ -11,7 +11,7 @@ namespace winPEAS.Tests { try { - string[] args = new string[0]; + string[] args = new string[] { "systeminfo", "userinfo", "networkinfo", "servicesinfo","processinfo" }; Program.Main(args); } catch (Exception e) diff --git a/winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj b/winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj index 4c8f64f..aa6e8bc 100644 --- a/winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj +++ b/winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj @@ -8,7 +8,7 @@ Debug AnyCPU {66AA4619-4D0F-4226-9D96-298870E9BB50} - Exe + Library Tests Tests v4.5.2 @@ -37,6 +37,9 @@ prompt 4 + + + ..\packages\Microsoft.CodeCoverage.16.10.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll @@ -57,7 +60,6 @@ -