Exploit databaseDownload repository ZIP
GH-88d8bc551618926a04536090300b4292
dungnm24/cve-2020-0796
Sources for CVE-2020-0796
81 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files9
dungnm24/cve-2020-0796Revision fe7aebbe1789
- ↑..Parent directory
- DisableClusterNode.ps1
- EnableClusterNode.ps1
- FlushDNS.ps1
- Get-WMIObject.ps1
- GetClusterNodeStatus.ps1
- GetClusterResourceOwner.ps1
- MoveClusterResourceOwner.ps1
- MoveSmbWitnessClient.ps1
- RefreshNetAdapter.ps1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
WindowsProtocolTestSuites/TestSuites/FileServer/src/ServerFailover/Adapter/WindowsSutControlAdapter/RefreshNetAdapter.ps1
PowerShell · 1,115 bytes# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
[string]$IPAddress
[string]$nodeName
[string]$domain = $PtfProp_Common_DomainName
[string]$userName = $PtfProp_Common_AdminUserName
[string]$password = $PtfProp_Common_PasswordForAllUsers
if($nodeName -notmatch "\.")
{
$nodeName = "$nodeName.$domain"
}
try
{
Get-PSSession|Remove-PSSession
$psSession=New-PSSession -HostName $nodeName -UserName "$domain\$userName"
}
catch
{
Get-Error
}
$command = {
Param
(
[String]$ip
)
$IPConfig = Get-NetIPAddress -IPAddress $ip
$adapter = Get-NetAdapter -InterfaceIndex $IPConfig.InterfaceIndex
Disable-NetAdapter -Name $adapter.Name -Confirm:$false
Start-Sleep -s 10
Enable-NetAdapter -Name $adapter.Name -Confirm:$false
}
$ret = $FALSE
try
{
$result = Invoke-Command -Session $psSession -ScriptBlock $command -ArgumentList $IPAddress
$ret = $TRUE
}
catch
{
Get-Error
throw "Failed to refresh NetAdapter."
}
finally
{
Get-PSSession|Remove-PSSession
}
return $ret