Skip to content

Instantly share code, notes, and snippets.

@normansolutions
Created January 7, 2014 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save normansolutions/8299854 to your computer and use it in GitHub Desktop.
Save normansolutions/8299854 to your computer and use it in GitHub Desktop.
Clear-Host
$hsg = Invoke-WebRequest -Uri http://www.stmarys.eu/sitemap.aspx
$links = $hsg.Links | Where class -eq 'rmLink' | select href
$linksWithDomain = $links | Foreach-Object{"http://www.stmarys.eu/" + $_.href}
$linksWithDomain | foreach{
$webClient = new-object System.Net.WebClient
$webClient.Headers.Add("user-agent", "PowerShell Script")
$output = ""
$output = $webClient.DownloadString($_.toString())
if ($output -like "*supportLists*") {
"Dodgy Code On Page " + ($_.tostring())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment