Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function Test-MS15034($url) {
try {
$wr = [Net.WebRequest]::Create($url)
$res = $wr.GetResponse()
$status = $res.statuscode
Write-Output "$status means it is not vulnerable"
}catch {
if ($Error[0].Exception.InnerException.Response.StatusCode -eq '416') {Write-Output "Site is vulnerable"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.