Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- mode con cols=89 lines=34
- Title MS-DEFCON from askwoody.com
- Color 1F
- ::::::::::::::::::::::::::::
- :: pf100 @ MDL, rpo @ MDL, RetiredGeek at www.askwoody.com forum.
- :: Get MS-Defcon from askwoody.com
- (
- echo # Get MS-Defcon from askwoody.com
- echo $progressPreference = 'silentlyContinue'
- echo "`r`nSledgehammer is attempting to retrieve MS-DEFCON rating from askwoody.com...`r`n"
- echo Try {$WebResponse = Invoke-WebRequest "https://www.askwoody.com/" -UseBasicParsing -TimeoutSec 10} Catch {$WebResponse=""}
- echo clear-host
- echo if ^($WebResponse.Statuscode -ne 200^){write-host "";"Unable to retrieve MS-DEFCON rating from askwoody.com"; exit}
- echo ForEach ^($Image in $WebResponse.Images^) {
- echo $x = $Image.OuterHTML.ToString^(^)
- echo If ^($x -like "*MS-DEFCON-*"^) {
- echo "`r`n MS-DEFCON = " + $x.split^('/'^)[8].split^('.'^)[0].SubString^(10,1^)
- echo "`r`n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
- echo "`r`nMS-DEFCON 1: Current Microsoft patches are causing havoc. Don't patch.`r`n" + `
- echo "`r`nMS-DEFCON 2: Patch reliability is unclear. Unless you have an immediate, pressing need" + `
- echo "`r`n to install a specific patch, don't do it.`r`n" + `
- echo "`r`nMS-DEFCON 3: Patch reliability is unclear, but widespread attacks make patching prudent." + `
- echo "`r`n Go ahead and patch, but watch out for potential problems.`r`n" + `
- echo "`r`nMS-DEFCON 4: There are isolated problems with current patches, but they are well-known" + `
- echo "`r`n and documented here. Check this site to see if you're affected and if" + `
- echo "`r`n things look OK, go ahead and patch.`r`n" + `
- echo "`r`nMS-DEFCON 5: All's clear. Patch while it's safe.`r`n" + `
- echo "`r`n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::`r`n" + `
- echo "`r`nMore info at https://www.askwoody.com`r`n" + `
- echo "`r`n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
- echo exit
- echo }
- echo }
- )>"%temp%\awmsdc.ps1"
- PowerShell.exe -Nologo -NoProfile -ExecutionPolicy Bypass -command "%temp%\awmsdc.ps1"
- del "%temp%\awmsdc.ps1"
- ::::::::::::::::::::::::::::
- echo. & echo Press any key to exit...
- pause > nul
Advertisement
Add Comment
Please, Sign In to add comment