├── Source └── Scripts │ ├── ip-addresses │ ├── Remove-Service.ps1 │ ├── Clear-DiagTrackLog.ps1 │ ├── Set-OneDrive.ps1 │ ├── Set-Telemetry.ps1 │ ├── Set-TrackingServerIpAddressEntries.ps1 │ ├── windows-10-tracking.ps1 │ ├── Set-TrackingServerHostsEntries.ps1 │ ├── Set-Services.ps1 │ └── hosts ├── README.md └── LICENSE.md /Source/Scripts/ip-addresses: -------------------------------------------------------------------------------- 1 | 65.55.108.23 2 | 65.39.117.230 3 | 23.218.212.69 4 | 134.170.30.202 5 | 137.116.81.24 6 | 204.79.197.200 7 | -------------------------------------------------------------------------------- /Source/Scripts/Remove-Service.ps1: -------------------------------------------------------------------------------- 1 | function Remove-Service { 2 | [CmdletBinding()] 3 | param( 4 | [Parameter(Mandatory=$true)] 5 | [string] $Name) 6 | 7 | $Service = Get-WmiObject -Class Win32_Service -Filter "Name='$Name'" 8 | if ($Service) { 9 | Write-Verbose "Removing $Name service" 10 | 11 | $Service.Delete() 12 | } 13 | } -------------------------------------------------------------------------------- /Source/Scripts/Clear-DiagTrackLog.ps1: -------------------------------------------------------------------------------- 1 | function Clear-DiagTrackLog { 2 | [CmdletBinding()] 3 | param() 4 | 5 | $IsStarted = (Get-Service DiagTrack).Status -eq "Started" 6 | 7 | Write-Verbose "Stopping DiagTrack service" 8 | 9 | Stop-Service DiagTrack -Force 10 | 11 | $Path = "$env:SystemDrive\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" 12 | 13 | if (Test-Path $Path -PathType Leaf) { 14 | Write-Verbose "Clearing DiagTrack log" 15 | 16 | [IO.File]::WriteAllText($Path, "") 17 | } 18 | 19 | if ($IsStarted) { 20 | Write-Verbose "Starting DiagTrack service" 21 | 22 | Start-Service DiagTrack 23 | } 24 | } -------------------------------------------------------------------------------- /Source/Scripts/Set-OneDrive.ps1: -------------------------------------------------------------------------------- 1 | function Set-OneDrive { 2 | [CmdletBinding()] 3 | param( 4 | [Parameter(Mandatory=$true)] 5 | [ValidateSet("Enable","Disable")] 6 | [string] $Action) 7 | 8 | $Path = "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive" 9 | 10 | if (Test-Path $Path\DisableFileSyncNGSC -PathType Leaf) { 11 | switch ($Action) { 12 | "Enable" { 13 | Write-Verbose "Enabling OneDrive" 14 | 15 | Set-ItemProperty $Path DisableFileSyncNGSC 0 -Type DWord -Force 16 | } 17 | "Disable" { 18 | Write-Verbose "Disabling OneDrive" 19 | 20 | Set-ItemProperty $Path DisableFileSyncNGSC 1 -Type DWord -Force 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Source/Scripts/Set-Telemetry.ps1: -------------------------------------------------------------------------------- 1 | function Set-Telemetry { 2 | [CmdletBinding()] 3 | param( 4 | [Parameter(Mandatory=$true)] 5 | [ValidateSet("Enable","Disable")] 6 | [string] $Action) 7 | 8 | $Paths = @("HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection","HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\DataCollection") 9 | 10 | switch ($Action) { 11 | "Enable" { 12 | Write-Verbose "Enabling telemetry" 13 | 14 | foreach ($Path in $Paths) { 15 | if (Test-Path $Path\AllowTelemetry -PathType Leaf) { 16 | Remove-ItemProperty $Path AllowTelemetry -Force 17 | } 18 | } 19 | } 20 | "Disable" { 21 | Write-Verbose "Disabling telemetry" 22 | 23 | foreach ($Path in $Paths) { 24 | Set-ItemProperty $Path AllowTelemetry "0" -Type String -Force 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/Scripts/Set-TrackingServerIpAddressEntries.ps1: -------------------------------------------------------------------------------- 1 | function Set-TrackingServerIpAddressEntries { 2 | [CmdletBinding()] 3 | param( 4 | [Parameter(Mandatory=$true)] 5 | [ValidateSet("Add","Remove")] 6 | [string] $Action, 7 | [string[]] $IpAddresses) 8 | 9 | if (!$IpAddresses) { 10 | $IpAddresses = Get-Content (Join-Path $PSScriptRoot "ip-addresses") 11 | } 12 | 13 | switch ($Action) { 14 | "Add" { 15 | Write-Verbose "Blocking tracking server ip addresses in firewall" 16 | foreach ($IpAddress in $IpAddresses) { 17 | New-NetFirewallRule -DisplayName "Block $IpAddress" -Group "Windows 10 Tracking" -Action block -Direction out -Profile Any -Protocol Any -RemoteAddress $IpAddress 18 | } 19 | } 20 | "Remove" { 21 | Write-Verbose "Removing tracking server ip address rules from firewall" 22 | foreach ($IpAddress in $IpAddresses) { 23 | Remove-NetFirewallRule -DisplayName "Block $IpAddress" 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Source/Scripts/windows-10-tracking.ps1: -------------------------------------------------------------------------------- 1 | #Require Version 4 2 | 3 | [CmdletBinding()] 4 | param( 5 | [Parameter(Mandatory=$true)] 6 | [ValidateSet("EnableTracking","DisableTracking","DisableTrackingAndDeleteServices")] 7 | [string] $Action) 8 | 9 | Set-StrictMode -Version Latest 10 | 11 | . $PSScriptRoot\Clear-DiagTrackLog.ps1 12 | . $PSScriptRoot\Set-OneDrive.ps1 13 | . $PSScriptRoot\Set-Services.ps1 14 | . $PSScriptRoot\Set-Telemetry.ps1 15 | . $PSScriptRoot\Set-TrackingServerHostsEntries.ps1 16 | . $PSScriptRoot\Set-TrackingServerIpAddressEntries.ps1 17 | 18 | switch ($Action) { 19 | "EnableTracking" { 20 | Set-Telemetry Enable 21 | Set-Services Enable 22 | Set-TrackingServerHostsEntries Remove 23 | Set-TrackingServerIpAddressEntries Remove 24 | Set-OneDrive Enable 25 | } 26 | "DisableTracking" { 27 | Set-Telemetry Disable 28 | Set-Services Disable 29 | Clear-DiagTrackLog 30 | Set-TrackingServerHostsEntries Add 31 | Set-TrackingServerIpAddressEntries Add 32 | Set-OneDrive Disable 33 | } 34 | "DisableTrackingAndDeleteServices" { 35 | Set-Telemetry Disable 36 | Set-Services Delete 37 | Clear-DiagTrackLog 38 | Set-TrackingServerHostsEntries Add 39 | Set-TrackingServerIpAddressEntries Add 40 | Set-OneDrive Disable 41 | } 42 | } -------------------------------------------------------------------------------- /Source/Scripts/Set-TrackingServerHostsEntries.ps1: -------------------------------------------------------------------------------- 1 | function Set-TrackingServerHostsEntries { 2 | [CmdletBinding()] 3 | param( 4 | [Parameter(Mandatory=$true)] 5 | [ValidateSet("Add","Remove")] 6 | [string] $Action, 7 | [string[]] $Hosts) 8 | 9 | if (!$Hosts) { 10 | $Hosts = Get-Content (Join-Path $PSScriptRoot hosts) 11 | } 12 | 13 | $Path = [IO.Path]::Combine([Environment]::SystemDirectory, "drivers", "etc", "HOSTS") 14 | $BeginLine = Select-String -Path $Path -Pattern "^# BEGIN windows-10-tracking\.ps1$" 15 | $EndLine = Select-String -Path $Path -Pattern "^# END windows-10-tracking\.ps1$" 16 | 17 | switch ($Action) { 18 | "Add" { 19 | if (!$BeginLine -and !$EndLine) { 20 | Write-Verbose "Adding tracking server HOSTS file entries" 21 | 22 | $StringBuilder = New-Object Text.StringBuilder 23 | [void]$StringBuilder.AppendLine() 24 | [void]$StringBuilder.AppendLine() 25 | [void]$StringBuilder.AppendLine("# BEGIN windows-10-tracking.ps1") 26 | foreach ($HostEntry in $Hosts) { 27 | [void]$StringBuilder.AppendLine("0.0.0.0 $HostEntry") 28 | } 29 | [void]$StringBuilder.Append("# END windows-10-tracking.ps1") 30 | 31 | Add-Content $Path $StringBuilder.ToString() -NoNewline -Force 32 | } 33 | } 34 | "Remove" { 35 | if ($BeginLine -and $EndLine) { 36 | Write-Verbose "Removing tracking server HOSTS file entries" 37 | 38 | $Contents = Get-Content $Path 39 | ($Contents | Select-Object -First ($BeginLine.LineNumber - 1)) + ($Contents | Select-Object -Skip $EndLine.LineNumber) | Set-Content $Path -Force 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Source/Scripts/Set-Services.ps1: -------------------------------------------------------------------------------- 1 | function Set-Services { 2 | [CmdletBinding()] 3 | param( 4 | [Parameter(Mandatory=$true)] 5 | [ValidateSet("Enable","Disable","Delete")] 6 | [string] $Action) 7 | 8 | function Remove-Service { 9 | [CmdletBinding()] 10 | param( 11 | [Parameter(Mandatory=$true)] 12 | [string] $Name) 13 | 14 | $Service = Get-WmiObject -Class Win32_Service -Filter "Name='$Name'" 15 | if ($Service) { 16 | Write-Verbose "Removing $Name service" 17 | 18 | $Service.Delete() 19 | } 20 | } 21 | 22 | switch ($Action) { 23 | "Enable" { 24 | Write-Verbose "Setting startup type to Automatic for DiagTrack service" 25 | 26 | Set-Service DiagTrack -StartupType Automatic 27 | 28 | Write-Verbose "Starting DiagTrack service" 29 | 30 | Start-Service DiagTrack 31 | 32 | Write-Verbose "Setting startup type to Automatic (Delayed) for dmwappushservice service" 33 | 34 | & sc.exe config dmwappushservice start= delayed-auto 35 | 36 | Write-Verbose "Starting dmwappushservice service" 37 | 38 | Start-Service dmwappushservice 39 | } 40 | "Disable" { 41 | Write-Verbose "Setting startup type to Disabled for DiagTrack service" 42 | 43 | Set-Service DiagTrack -StartupType Disabled 44 | 45 | Write-Verbose "Stopping DiagTrack service" 46 | 47 | Stop-Service DiagTrack -Force 48 | 49 | Write-Verbose "Setting startup type to Disabled for dmwappushservice service" 50 | 51 | Set-Service dmwappushservice -StartupType Disabled 52 | 53 | Write-Verbose "Stopping dmwappushservice service" 54 | 55 | Stop-Service dmwappushservice -Force 56 | } 57 | "Delete" { 58 | Write-Verbose "Stopping DiagTrack service" 59 | 60 | Stop-Service DiagTrack -Force 61 | 62 | Remove-Service DiagTrack 63 | 64 | Write-Verbose "Stopping dmwappushservice service" 65 | 66 | Stop-Service dmwappushservice -Force 67 | 68 | Remove-Service dmwappushservice 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | These PowerShell scripts enable or disable various tracking components in Windows 10. They can be used from the PowerShell command line or in an automated environment; they do not require user input. These scripts are **not intended** to remove all tracking in Windows 10; they only manipulate certain tracking components. 4 | 5 | This project was inspired by https://github.com/10se1ucgo/DisableWinTracking. 6 | 7 | # Warnings 8 | 9 | **Use this script at your own risk!** 10 | 11 | When choosing to delete Windows services, note that the services are **permanently deleted**. 12 | 13 | We have not personally tested every `HOSTS` entry. Some of them may cause applications and services to stop working. Feel free to modify the file containing the entries. 14 | 15 | # What the scripts do 16 | 17 | * Sets the `HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry` value 18 | * Manipulates the `DiagTrack` and `dmwappushservice` Windows services 19 | * Clears the `DiagTrack` service's log stored at `$env:SystemDrive\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl` 20 | * Manages `HOSTS` file entries for numerous Microsoft tracking servers 21 | * Manages OneDrive 22 | 23 | # How to use the scripts 24 | 25 | The `windows-10-tracking.ps1` script dot-sources and calls individual cmdlet scripts, each of which perform a distinct duty with regards to Windows 10 tracking. All scripts support the `-Verbose` flag. 26 | 27 | * Enable tracking: `.\windows-10-tracking.ps1 EnableTracking` 28 | * Disable tracking: `.\windows-10-tracking.ps1 DisableTracking` 29 | * Disable tracking and deletes offending Windows services: `.\windows-10-tracking.ps1 DisableTrackingAndDeleteServices` 30 | 31 | The list of blocked hosts is managed in a file separate from the scripts. 32 | 33 | # Disclaimer 34 | 35 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Source/Scripts/hosts: -------------------------------------------------------------------------------- 1 | a-0001.a-msedge.net 2 | a-0002.a-msedge.net 3 | a-0003.a-msedge.net 4 | a-0004.a-msedge.net 5 | a-0005.a-msedge.net 6 | a-0006.a-msedge.net 7 | a-0007.a-msedge.net 8 | a-0008.a-msedge.net 9 | a-0009.a-msedge.net 10 | a-msedge.net 11 | a.ads1.msn.com 12 | a.ads2.msads.net 13 | a.ads2.msn.com 14 | a.rad.msn.com 15 | a1621.g.akamai.net 16 | a1856.g2.akamai.net 17 | a1961.g.akamai.net 18 | a248.e.akamai.net 19 | a978.i6g1.akamai.net 20 | ac3.msn.com 21 | ad.doubleclick.net 22 | adnexus.net 23 | adnxs.com 24 | ads.msn.com 25 | ads1.msads.net 26 | ads1.msn.com 27 | aidps.atdmt.com 28 | aka-cdn-ns.adtech.de 29 | any.edge.bing.com 30 | apps.skype.com 31 | az361816.vo.msecnd.net 32 | az512334.vo.msecnd.net 33 | b.ads1.msn.com 34 | b.ads2.msads.net 35 | b.rad.msn.com 36 | bingads.microsoft.com 37 | bs.serving-sys.com 38 | c.atdmt.com 39 | c.msn.com 40 | cdn.atdmt.com 41 | cds26.ams9.msecn.net 42 | choice.microsoft.com 43 | choice.microsoft.com.nsatc.net 44 | compatexchange.cloudapp.net 45 | corp.sts.microsoft.com 46 | corpext.msitadfs.glbdns2.microsoft.com 47 | cs1.wpc.v0cdn.net 48 | db3aqu.atdmt.com 49 | df.telemetry.microsoft.com 50 | diagnostics.support.microsoft.com 51 | e2835.dspb.akamaiedge.net 52 | e7341.g.akamaiedge.net 53 | e7502.ce.akamaiedge.net 54 | e8218.ce.akamaiedge.net 55 | ec.atdmt.com 56 | feedback.microsoft-hohm.com 57 | feedback.search.microsoft.com 58 | feedback.windows.com 59 | flex.msn.com 60 | g.msn.com 61 | h1.msn.com 62 | h2.msn.com 63 | hostedocsp.globalsign.com 64 | i1.services.social.microsoft.com 65 | i1.services.social.microsoft.com.nsatc.net 66 | ipv6.msftncsi.com 67 | ipv6.msftncsi.com.edgesuite.net 68 | lb1.www.ms.akadns.net 69 | live.rads.msn.com 70 | m.adnxs.com 71 | m.hotmail.com 72 | msedge.net 73 | msftncsi.com 74 | msnbot-65-55-108-23.search.msn.com 75 | msntest.serving-sys.com 76 | oca.telemetry.microsoft.com 77 | oca.telemetry.microsoft.com.nsatc.net 78 | onesettings-db5.metron.live.nsatc.net 79 | pre.footprintpredict.com 80 | preview.msn.com 81 | pricelist.skype.com 82 | rad.live.com 83 | rad.msn.com 84 | redir.metaservices.microsoft.com 85 | reports.wes.df.telemetry.microsoft.com 86 | s.gateway.messenger.live.com 87 | secure.adnxs.com 88 | secure.flashtalking.com 89 | services.wes.df.telemetry.microsoft.com 90 | settings-sandbox.data.microsoft.com 91 | settings-win.data.microsoft.com 92 | sls.update.microsoft.com.akadns.net 93 | sO.2mdn.net 94 | sqm.df.telemetry.microsoft.com 95 | sqm.telemetry.microsoft.com 96 | sqm.telemetry.microsoft.com.nsatc.net 97 | static.2mdn.net 98 | statsfe1.ws.microsoft.com 99 | statsfe2.ws.microsoft.com 100 | survey.watson.microsoft.com 101 | telecommand.telemetry.microsoft.com 102 | telecommand.telemetry.microsoft.com.nsatc.net 103 | telemetry.appex.bing.net 104 | telemetry.microsoft.com 105 | telemetry.urs.microsoft.com 106 | ui.skype.com 107 | view.atdmt.com 108 | vortex-bn2.metron.live.com.nsatc.net 109 | vortex-cy2.metron.live.com.nsatc.net 110 | vortex-sandbox.data.microsoft.com 111 | vortex-win.data.microsoft.com 112 | vortex.data.microsoft.com 113 | watson.live.com 114 | watson.microsoft.com 115 | watson.ppe.telemetry.microsoft.com 116 | watson.telemetry.microsoft.com 117 | watson.telemetry.microsoft.com.nsatc.net 118 | wes.df.telemetry.microsoft.com 119 | win10.ipv6.microsoft.com 120 | www.bingads.microsoft.com 121 | www.go.microsoft.akadns.net 122 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 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 | --------------------------------------------------------------------------------