Skip to content

Instantly share code, notes, and snippets.

@obscuresec
Created April 15, 2015 15:38
Show Gist options
  • Save obscuresec/eb46bc1094cd6003a12d to your computer and use it in GitHub Desktop.
Save obscuresec/eb46bc1094cd6003a12d to your computer and use it in GitHub Desktop.
test-ms15034.ps1
function Test-MS15034($url) {
try {
$wr = [Net.WebRequest]::Create($url)
$wr.AddRange('bytes',18,18446744073709551615)
$res = $wr.GetResponse()
$status = $res.statuscode
Write-Output "$status means it is not vulnerable"
$res.Close()
}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