Skip to content

Instantly share code, notes, and snippets.

@johnjohnsp1
Forked from obscuresec/test-ms15034.ps1
Last active August 29, 2015 14:19
Show Gist options
  • Select an option

  • Save johnjohnsp1/9fae07a5c4499dc3fe9c to your computer and use it in GitHub Desktop.

Select an option

Save johnjohnsp1/9fae07a5c4499dc3fe9c to your computer and use it in GitHub Desktop.
function Test-MS15034($url) {
try {
$wr = [Net.WebRequest]::Create($url)
$wr.AddRange('bytes',234234,28768768)
$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