├── README.md ├── finder.py ├── finder.ps1 └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # BYOVDFinder 2 | BYOVDFinder helps you check which drivers from loldrivers.io are not blocked by the current HVCI (Hypervisor Code Integrity) blocklist on your system. This is particularly useful for BYOVD (Bring Your Own Vulnerable Driver) attack paths where vulnerable drivers are permitted to load despite HVCI being enabled. 3 | 4 | > This project has also been updated with real-time analysis of LOLDrivers against Microsoft's HVCI blocklist. You can find the project here: [byovd-watchdog](https://github.com/pwnfuzz/byovd-watchdog). For a better viewing experience, visit: [https://byovd-watchdog.pwnfuzz.com](https://byovd-watchdog.pwnfuzz.com/). 5 | 6 | ### Why HVCI Blocks Drivers? 7 | HVCI is a security feature in Windows that helps protect against attacks like kernel exploits by verifying the integrity of code running at the kernel level. It blocks drivers that are unsigned or known to be malicious by checking them against an internal blocklist. If a driver is not recognized, it will be blocked to prevent possible exploitation. However, according to [Microsoft](https://learn.microsoft.com/en-us/windows/security/application-security/application-control/app-control-for-business/design/microsoft-recommended-driver-block-rules#microsoft-vulnerable-driver-blocklist), the list is updated once or twice a year, giving us plenty of time to use drivers that haven't yet been blocked. 8 | 9 | ### Requirements 10 | **Option 1: Python Script** 11 | - Python 3.x 12 | - `driversipolicy.p7b` file containing HVCI blocklist data (optional) 13 | 14 | **Option 2: PowerShell Script** 15 | - PowerShell 5.1+ (Windows) 16 | 17 | ## Usage 18 | 19 | ### Option 1: Python Script (`finder.py`) 20 | 21 | The Python script requires a local XML file containing the HVCI blocklist. 22 | 23 | **Step 1: Extract driversipolicy.p7b to XML** 24 | You can obtain the XML in one of two ways: 25 | - To extract the `driversipolicy.p7b` file into XML format, you can use the script from [Mattifestation](https://gist.github.com/mattifestation/92e545bf1ee5b68eeb71d254cec2f78e)'s Gist. 26 | ```powershell 27 | IEX(New-Object net.WebClient).DownloadString("https://gist.githubusercontent.com/mattifestation/92e545bf1ee5b68eeb71d254cec2f78e/raw/a9b55d31075f91b467a8a37b9d8b2d84a0aa856b/CIPolicyParser.ps1") 28 | ConvertTo-CIPolicy -BinaryFilePath 'C:\Windows\System32\CodeIntegrity\driversipolicy.p7b' -XmlFilePath (Join-Path $env:USERPROFILE 'Desktop\driversipolicy.xml') 29 | ``` 30 | 31 | - Alternatively, you can get the Microsoft Vulnerable Driver Blocklist XML directly from [Microsoft's Vulnerable Driver Blocklist page](https://learn.microsoft.com/en-us/windows/security/application-security/application-control/app-control-for-business/design/microsoft-recommended-driver-block-rules#vulnerable-driver-blocklist-xml). Copy the XML contents and use it directly without the need to parse the .p7b file. 32 | 33 | **Step 2: Run the Python Script** 34 | - After extracting the `driversipolicy.p7b` file to XML format, run the Python script with the following command: 35 | ```bash 36 | python3 finder.py driversipolicy.xml 37 | ``` 38 | 39 | ### Option 2: PowerShell Script (`finder.ps1`) 40 | 41 | The PowerShell script gives you two ways to run it: 42 | 43 | - No input required: It will attempt to fetch the blocklist from your machine or download the latest one from Microsoft. 44 | ```powershell 45 | .\finder.ps1 46 | ``` 47 | 48 | - With input: Provide a custom XML file as input. You can generate this file using the method described in the Python script section above. 49 | ```powershell 50 | .\finder.ps1 -XmlFile "C:\Path\To\driversipolicy.xml" 51 | ``` 52 | 53 | - Or just run it directly via one-liner. 54 | ``` 55 | IEX(New-Object net.WebClient).DownloadString("https://raw.githubusercontent.com/ghostbyt3/BYOVDFinder/refs/heads/main/finder.ps1") 56 | ``` 57 | 58 | ## Output 59 | 60 | ```bash 61 | $ python3 finder.py driversipolicy.xml 62 | 63 | _____ _______ _____ ___ _ _ 64 | | _ ) \ / / _ \ \ / / \| __(_)_ _ __| |___ _ _ 65 | | _ \\ V / (_) \ V /| |) | _|| | ' \/ _` / -_) '_| 66 | |___/ |_| \___/ \_/ |___/|_| |_|_||_\__,_\___|_| 67 | 68 | DRIVER: .sys 69 | Link: https://www.loldrivers.io/drivers/ 70 | MD5: 71 | SHA1: 72 | SHA256: 73 | -------------------------------------------------------------------------------- 74 | DRIVER: .sys 75 | Link: https://www.loldrivers.io/drivers/ 76 | MD5: 77 | SHA1: 78 | SHA256: 79 | -------------------------------------------------------------------------------- 80 | 81 | [::] 82 | 83 | [+] Number of Blocked Drivers: XXXX 84 | [+] Number of Allowed Drivers: XX 85 | 86 | ``` 87 | - Retrieves the latest list of Bring Your Own Vulnerable Driver (BYOVD) entries from loldrivers.io API, including hashes, signatures, and metadata. 88 | - Parses Microsoft's Hypervisor-Protected Code Integrity (HVCI) policy XML to detect which vulnerable drivers are actively blocked by hash or certificate rules, providing clear allow/block classification. 89 | - Cross-checks driver hashes (MD5/SHA1/SHA256) and certificates from loldrivers.io against deny rules in HVCI policy XML to identify vulnerable drivers that are not blocked. 90 | 91 | -------------------------------------------------------------------------------- /finder.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Tool Name: BYOVDFinder 5 | # Description: Checks which drivers from loldrivers.io are NOT blocked by the current HVCI blocklist. 6 | # Usage: python3 finder.py driversipolicy.xml 7 | # 8 | # Author: Nikhil John Thomas (@ghostbyt3) 9 | # Contributors: Robin (@D4mianWayne) 10 | # License: Apache License 2.0 11 | # URL: https://github.com/ghostbyt3/BYOVDFinder 12 | 13 | import argparse 14 | import requests 15 | from colorama import init, Fore, Back, Style 16 | import xml.etree.ElementTree as ET 17 | from packaging import version 18 | 19 | init(autoreset=True) 20 | 21 | LOLDIVERS_URL = "https://www.loldrivers.io/api/drivers.json" 22 | 23 | def load_loldrivers(): 24 | response = requests.get(LOLDIVERS_URL) 25 | data = response.json() 26 | known_vulnerable_samples = [] 27 | 28 | for entry in data: 29 | if "KnownVulnerableSamples" in entry: 30 | for sample in entry["KnownVulnerableSamples"]: 31 | sample['_parent_driver'] = { 32 | 'Id': entry.get('Id'), 33 | 'Tags': entry.get('Tags', []) 34 | } 35 | known_vulnerable_samples.append(sample) 36 | 37 | return known_vulnerable_samples 38 | 39 | def load_policy(xml_path): 40 | namespaces = {'ns': 'urn:schemas-microsoft-com:sipolicy'} 41 | tree = ET.parse(xml_path) 42 | root = tree.getroot() 43 | 44 | file_rules = root.find("ns:FileRules", namespaces) 45 | signers = root.find("ns:Signers", namespaces) 46 | 47 | # Collect deny rules (hash and file version based) 48 | deny_hashes = set() 49 | deny_file_versions = {} 50 | if file_rules is not None: 51 | for rule in file_rules.findall("ns:Deny", namespaces): 52 | hash_value = rule.get("Hash", "").lower() 53 | if hash_value: 54 | deny_hashes.add(hash_value) 55 | 56 | file_name = rule.get("FileName", "") 57 | max_version = rule.get("MaximumFileVersion", "") 58 | if file_name and max_version: 59 | deny_file_versions[file_name.lower()] = max_version 60 | 61 | # Collect signer information with file attrib refs 62 | signer_info = [] 63 | if signers is not None: 64 | for signer in signers.findall("ns:Signer", namespaces): 65 | cert_roots = [] 66 | for cert in signer.findall("ns:CertRoot", namespaces): 67 | cert_value = cert.get("Value", "").lower() 68 | if cert_value: 69 | cert_roots.append(cert_value) 70 | 71 | file_attrib_refs = [] 72 | for ref in signer.findall("ns:FileAttribRef", namespaces): 73 | rule_id = ref.get("RuleID", "") 74 | if rule_id: 75 | file_attrib_refs.append(rule_id) 76 | 77 | if cert_roots: 78 | signer_info.append({ 79 | 'cert_roots': cert_roots, 80 | 'file_attrib_refs': file_attrib_refs 81 | }) 82 | 83 | # Collect file attribute rules 84 | file_attribs = {} 85 | if file_rules is not None: 86 | for attrib in file_rules.findall("ns:FileAttrib", namespaces): 87 | file_name = attrib.get("FileName", "").lower() 88 | rule_id = attrib.get("ID", "") 89 | if file_name and rule_id: 90 | file_attribs[file_name] = rule_id 91 | 92 | return deny_hashes, deny_file_versions, signer_info, file_attribs 93 | 94 | def has_blocked_hash(driver, deny_hashes): 95 | hashes_to_check = set() 96 | 97 | # Add direct hashes 98 | for hash_type in ['MD5', 'SHA1', 'SHA256']: 99 | h = driver.get(hash_type, "").lower() 100 | if h: 101 | hashes_to_check.add(h) 102 | 103 | # Add authenticode hashes 104 | if "Authentihash" in driver: 105 | auth_hash = driver["Authentihash"] 106 | for hash_type in ['MD5', 'SHA1', 'SHA256']: 107 | h = auth_hash.get(hash_type, "").lower() 108 | if h: 109 | hashes_to_check.add(h) 110 | 111 | return len(hashes_to_check & deny_hashes) > 0 112 | 113 | def has_blocked_version(driver, deny_file_versions, file_attribs): 114 | original_filename = driver.get("OriginalFilename", "").lower() 115 | if not original_filename: 116 | return False 117 | 118 | max_version = deny_file_versions.get(original_filename) 119 | if not max_version: 120 | return False 121 | 122 | driver_version = driver.get("FileVersion", "") 123 | if not driver_version: 124 | return False 125 | 126 | try: 127 | version_parts = driver_version.replace(',', '.').split() 128 | clean_version = version_parts[0] if version_parts else "" 129 | 130 | if clean_version and version.parse(clean_version) <= version.parse(max_version): 131 | return True 132 | except version.InvalidVersion: 133 | pass 134 | 135 | return False 136 | 137 | def has_blocked_signer(driver, signer_info, file_attribs): 138 | if "Signatures" not in driver: 139 | return False 140 | 141 | original_filename = driver.get("OriginalFilename", "").lower() 142 | file_attrib_id = file_attribs.get(original_filename) if original_filename else None 143 | 144 | for sig in driver["Signatures"]: 145 | if "Certificates" not in sig: 146 | continue 147 | 148 | for cert in sig["Certificates"]: 149 | if "TBS" not in cert: 150 | continue 151 | 152 | tbs = cert["TBS"] 153 | for hash_type in ["MD5", "SHA1", "SHA256", "SHA384"]: 154 | if hash_type not in tbs: 155 | continue 156 | 157 | cert_hash = tbs[hash_type].lower() 158 | for signer in signer_info: 159 | if cert_hash in signer['cert_roots']: 160 | if (not signer['file_attrib_refs'] or 161 | (file_attrib_id and file_attrib_id in signer['file_attrib_refs'])): 162 | return True 163 | return False 164 | 165 | def print_driver(driver): 166 | parent_info = driver.get('_parent_driver', {}) 167 | driver_id = parent_info.get('Id', '') 168 | driver_link = f"https://www.loldrivers.io/drivers/{driver_id}" if driver_id else "N/A" 169 | 170 | filename = driver.get('Filename') or ''.join(parent_info.get('Tags', [])) 171 | print(Fore.RED + Style.BRIGHT + f"DRIVER: {filename if filename else 'Unknown'}") 172 | print(Fore.GREEN + f" Link: {driver_link}") 173 | 174 | md5 = driver.get('MD5') 175 | sha1 = driver.get('SHA1') 176 | sha256 = driver.get('SHA256') 177 | 178 | if md5: 179 | print(f" MD5: {md5}") 180 | if sha1: 181 | print(f" SHA1: {sha1}") 182 | if sha256: 183 | print(f" SHA256: {sha256}") 184 | 185 | if any([md5, sha1, sha256]): 186 | print("-"*80) 187 | 188 | def main(xml_path): 189 | print(Fore.CYAN + r""" 190 | _____ _______ _____ ___ _ _ 191 | | _ ) \ / / _ \ \ / / \| __(_)_ _ __| |___ _ _ 192 | | _ \\ V / (_) \ V /| |) | _|| | ' \/ _` / -_) '_| 193 | |___/ |_| \___/ \_/ |___/|_| |_|_||_\__,_\___|_| 194 | """ 195 | ) 196 | 197 | loldrivers = load_loldrivers() 198 | deny_hashes, deny_file_versions, signer_info, file_attribs = load_policy(xml_path) 199 | blocked_count = 0 200 | allowed_count = 0 201 | for driver in loldrivers: 202 | if (has_blocked_hash(driver, deny_hashes) or 203 | has_blocked_version(driver, deny_file_versions, file_attribs) or 204 | has_blocked_signer(driver, signer_info, file_attribs)): 205 | blocked_count += 1 206 | else: 207 | allowed_count += 1 208 | print_driver(driver) 209 | 210 | print() 211 | print(Fore.MAGENTA + f"[+] Number of Blocked Drivers: {blocked_count}") 212 | print(Fore.MAGENTA + f"[+] Number of Allowed Drivers: {allowed_count}") 213 | 214 | if __name__ == "__main__": 215 | parser = argparse.ArgumentParser(description="Check allowed drivers against the HVCI block list.") 216 | parser.add_argument("xml_path", help="Path to the HVCI policy XML file.") 217 | args = parser.parse_args() 218 | 219 | main(args.xml_path) -------------------------------------------------------------------------------- /finder.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Checks which drivers from loldrivers.io are NOT blocked by the current HVCI blocklist. 4 | .DESCRIPTION 5 | This script helps you check which drivers from loldrivers.io are not blocked by the current HVCI (Hypervisor Code Integrity) blocklist on your system. 6 | This is particularly useful for BYOVD (Bring Your Own Vulnerable Driver) attack paths where vulnerable drivers are permitted to load despite HVCI being enabled. 7 | .AUTHOR 8 | Nikhil John Thomas (@ghostbyt3) 9 | .LINK 10 | https://github.com/ghostbyt3/BYOVDFinder 11 | .LICENSE 12 | Apache License 2.0 13 | .PARAMETER XmlFile 14 | Optional path to the HVCI policy XML file to analyze. If not provided, the script 15 | will download CIPolicyParser and convert the system's current driversipolicy.p7b. 16 | .EXAMPLE 17 | .\Finder.ps1 -XmlFile "C:\temp\driversipolicy.xml" 18 | .EXAMPLE 19 | .\Finder.ps1 20 | #> 21 | 22 | param ( 23 | [Parameter(Mandatory=$false)] 24 | [string]$XmlFile 25 | ) 26 | 27 | $LOLDIVERS_URL = "https://www.loldrivers.io/api/drivers.json" 28 | $CIPolicyParserUrl = "https://gist.githubusercontent.com/mattifestation/92e545bf1ee5b68eeb71d254cec2f78e/raw/a9b55d31075f91b467a8a37b9d8b2d84a0aa856b/CIPolicyParser.ps1" 29 | $TempXmlFile = "$env:TEMP\driversipolicy.xml" 30 | 31 | Write-Host @" 32 | 33 | _____ _______ _____ ___ _ _ 34 | | _ ) \ / / _ \ \ / / \| __(_)_ _ __| |___ _ _ 35 | | _ \\ V / (_) \ V /| |) | _|| | ' \/ _` / -_) '_| 36 | |___/ |_| \___/ \_/ |___/|_| |_|_||_\__,_\___|_| 37 | 38 | "@ -ForegroundColor Cyan 39 | 40 | function Get-LolDrivers { 41 | try { 42 | Write-Host "[*] Downloading driver data from loldrivers.io..." -ForegroundColor Yellow 43 | $json = (New-Object System.Net.WebClient).DownloadString($LOLDIVERS_URL) 44 | Add-Type -AssemblyName System.Web.Extensions 45 | $serializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer 46 | $serializer.MaxJsonLength = [int]::MaxValue 47 | $response = $serializer.DeserializeObject($json) 48 | 49 | $vulnerableSamples = @() 50 | 51 | foreach ($entry in $response) { 52 | if ($entry.ContainsKey('KnownVulnerableSamples') -and 53 | $entry['KnownVulnerableSamples'] -and 54 | $entry['KnownVulnerableSamples'].Count -gt 0) { 55 | 56 | foreach ($sample in $entry['KnownVulnerableSamples']) { 57 | $sampleObj = [PSCustomObject]@{ 58 | MD5 = $sample['MD5'] 59 | SHA1 = $sample['SHA1'] 60 | SHA256 = $sample['SHA256'] 61 | OriginalFilename = $sample['OriginalFilename'] 62 | FileVersion = $sample['FileVersion'] 63 | Authentihash = $sample['Authentihash'] 64 | Signatures = $sample['Signatures'] 65 | _parent_driver = [PSCustomObject]@{ 66 | Id = $entry['Id'] 67 | Tags = $entry['Tags'] 68 | Category = $entry['Category'] 69 | MitreID = $entry['MitreID'] 70 | } 71 | } 72 | $vulnerableSamples += $sampleObj 73 | } 74 | } 75 | } 76 | 77 | return $vulnerableSamples 78 | } 79 | catch { 80 | Write-Host "[-] Error fetching loldrivers.io data: $_" -ForegroundColor Red 81 | exit 1 82 | } 83 | } 84 | 85 | function Get-PolicyData { 86 | param ( 87 | [string]$XmlFile 88 | ) 89 | 90 | try { 91 | if (-not (Test-Path $XmlFile)) { 92 | throw "[-] XML file not found at path: $XmlFile" 93 | } 94 | 95 | # Load and clean the XML content 96 | $content = Get-Content -Path $XmlFile -Raw 97 | $content = $content -replace 'xmlns(:ns)?="[^"]+"','' 98 | $xml = [xml]$content 99 | 100 | # Get file rules and signers from policy 101 | $file_rules = $xml.SiPolicy.FileRules 102 | $signers = $xml.SiPolicy.Signers.Signer 103 | 104 | return $file_rules, $signers 105 | } 106 | catch { 107 | Write-Host "[-] Error reading policy XML: $_" -ForegroundColor Red 108 | exit 1 109 | } 110 | } 111 | 112 | function Test-BlockedHash { 113 | param ( 114 | [PSObject]$Driver, 115 | [System.Xml.XmlElement]$FileRules 116 | ) 117 | 118 | foreach($hash in $file_rules.Deny.Hash){ 119 | if(($hash) -and ( 120 | ($hash -eq $Driver.Authentihash.SHA256) -or 121 | ($hash -eq $Driver.Authentihash.SHA1) -or 122 | ($hash -eq $Driver.Authentihash.MD5) -or 123 | ($hash -eq $Driver.SHA256) -or 124 | ($hash -eq $Driver.SHA1) -or 125 | ($hash -eq $Driver.MD5))) 126 | { 127 | return $true 128 | } 129 | } 130 | return $false 131 | } 132 | 133 | function Test-BlockedSigner { 134 | param ( 135 | [PSObject]$Driver, 136 | [System.Xml.XmlElement]$FileRules, 137 | [System.Xml.XmlElement[]]$Signers 138 | ) 139 | 140 | $file_attrib = $file_rules.FileAttrib | Where-Object {$_.FileName -eq $Driver.OriginalFilename} 141 | 142 | foreach($signer in $Signers){ 143 | $tbs = $signer.CertRoot.Value.ToLower() 144 | if(($Driver.Signatures.Certificates.TBS.MD5 -contains $tbs) -or 145 | ($Driver.Signatures.Certificates.TBS.SHA1 -contains $tbs) -or 146 | ($Driver.Signatures.Certificates.TBS.SHA256 -contains $tbs) -or 147 | ($Driver.Signatures.Certificates.TBS.SHA384 -contains $tbs)){ 148 | $blocked_files = $signer.FileAttribRef 149 | if(!$blocked_files -or ($blocked_files.RuleID -contains $file_attrib.ID)){ 150 | return $true 151 | } 152 | } 153 | } 154 | return $false 155 | } 156 | 157 | function Test-BlockedVersion { 158 | param ( 159 | [PSObject]$Driver, 160 | [System.Xml.XmlElement]$FileRules 161 | ) 162 | 163 | $file_max_version = ($file_rules.Deny | Where-Object {$_.FileName -eq $Driver.OriginalFilename}).MaximumFileVersion 164 | $version = (-split ($Driver.FileVersion -replace ',\s*', '.'))[0] 165 | 166 | if($file_max_version -and $version -and ([version]$version -le $file_max_version)){ 167 | return $true 168 | } 169 | return $false 170 | } 171 | 172 | function Write-DriverInfo { 173 | param ( 174 | [PSObject]$Driver 175 | ) 176 | 177 | $parent = $Driver._parent_driver 178 | $link = if ($parent.Id) { "https://www.loldrivers.io/drivers/$($parent.Id)" } else { "N/A" } 179 | $name = if ($Driver.OriginalFilename) { $Driver.OriginalFilename } else { $parent.Tags -join '' } 180 | 181 | Write-Host "DRIVER: $(if ($name) { $name } else { 'Unknown' })" -ForegroundColor Red 182 | Write-Host " Link: $link" -ForegroundColor Green 183 | 184 | if ($Driver.MD5) { Write-Host " MD5: $($Driver.MD5)" } 185 | if ($Driver.SHA1) { Write-Host " SHA1: $($Driver.SHA1)" } 186 | if ($Driver.SHA256) { Write-Host " SHA256: $($Driver.SHA256)" } 187 | 188 | if ($Driver.FileVersion) { Write-Host " Version: $($Driver.FileVersion)" } 189 | 190 | Write-Host ("-" * 80) 191 | } 192 | 193 | # Main execution 194 | try { 195 | # Get driver data 196 | $drivers = Get-LolDrivers 197 | 198 | # Get policy data 199 | if (-not $XmlFile) { 200 | Write-Host "[*] No XML file provided, using system policy..." -ForegroundColor Yellow 201 | 202 | $policyScript = "$env:TEMP\CIPolicyParser.ps1" 203 | try { 204 | (New-Object System.Net.WebClient).DownloadString($CIPolicyParserUrl) | Out-File $policyScript 205 | . $policyScript 206 | ConvertTo-CIPolicy -BinaryFilePath 'C:\Windows\System32\CodeIntegrity\driversipolicy.p7b' -XmlFilePath $TempXmlFile | Out-Null 207 | $XmlFile = $TempXmlFile 208 | } 209 | finally { 210 | if (Test-Path $policyScript) { 211 | Remove-Item $policyScript -Force -ErrorAction SilentlyContinue | Out-Null 212 | } 213 | } 214 | } 215 | 216 | $file_rules, $signers = Get-PolicyData $XmlFile 217 | 218 | # Analyze drivers 219 | $blocked = 0 220 | $allowed = 0 221 | $allowed_drivers = @() 222 | 223 | foreach ($driver in $drivers) { 224 | if ((Test-BlockedHash $driver $file_rules) -or 225 | (Test-BlockedSigner $driver $file_rules $signers) -or 226 | (Test-BlockedVersion $driver $file_rules)) { 227 | $blocked++ 228 | } 229 | else { 230 | $allowed++ 231 | $allowed_drivers += $driver 232 | } 233 | } 234 | 235 | Write-Host "`n" 236 | foreach ($driver in $allowed_drivers) { 237 | Write-DriverInfo $driver 238 | } 239 | 240 | # Display results 241 | Write-Host "`n[+] Number of Blocked Drivers: $blocked" -ForegroundColor Cyan 242 | Write-Host "[+] Number of Allowed (Potentially Vulnerable) Drivers: $allowed`n" -ForegroundColor Cyan 243 | } 244 | finally { 245 | # Clean up temporary files 246 | $filesToRemove = @( 247 | $TempXmlFile 248 | "$env:TEMP\CIPolicyParser.ps1" 249 | ) 250 | 251 | foreach ($file in $filesToRemove) { 252 | if (Test-Path $file) { 253 | Remove-Item $file -Force -ErrorAction SilentlyContinue 254 | } 255 | } 256 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------