Exploit database

GH-88d8bc551618926a04536090300b4292

dungnm24/cve-2020-0796

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-0796

81 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files7

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

WindowsProtocolTestSuites/TestSuites/BranchCache/Scripts/ConfigHostedCacheServer.ps1

PowerShell · 1,685 bytes
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.

#----------------------------------------------------------------------------
# Global variables
#----------------------------------------------------------------------------
$scriptPath = Split-Path $MyInvocation.MyCommand.Definition -parent
$env:Path += ";$scriptPath;$scriptPath\Scripts"

#----------------------------------------------------------------------------
# Start loging using start-transcript cmdlet
#----------------------------------------------------------------------------
[string]$logFile = $MyInvocation.MyCommand.Path + ".log"
try { Stop-Transcript -ErrorAction SilentlyContinue } catch {} # Ignore Stop-Transcript error messages
Start-Transcript -Path "$logFile" -Append -Force

#-----------------------------------------------------
# Begin to install BranchCache feature
#-----------------------------------------------------
Import-Module ServerManager

Write-Info.ps1 "Install BranchCache Feature"
Add-Windowsfeature BranchCache -IncludeAllSubFeature -IncludeManagementTools

#-----------------------------------------------------
# Begin to config HostedCacheServer
#-----------------------------------------------------
Write-Info.ps1 "Enable BCHostedCacheServer"
Enable-BCHostedServer

Write-Info.ps1 "Restart service: peerdistsvc"
Restart-service peerdistsvc

#----------------------------------------------------------------------------
# Ending
#----------------------------------------------------------------------------
Write-Info.ps1 "Completed config hosted cache server."
Stop-Transcript
exit 0