Hi
I want to know how can we get the list of URLs/IPs the website is getting connected, i have made following small script but it is not able to collect all the links which are mentioned in the javascripts etc
$path = Get-Content -Path ‘C:\URL Internal Links Scanner\URLlist.txt’
$path2 = “C:\URL Internal Links Scanner\output.csv”
[int]$i = 0
Foreach ($URL in $path)
{
$a = Invoke-WebRequest -Uri $URL
$links=$a.Links | Where-Object {$_.href -notlike “$url”} |select href
$csp=$a.Headers.‘Content-Security-Policy’
write-host “`n”
$output = $URL +“`t”+ $links.href +“`t”+ $csp
$output | Out-File $path2 -Append
}
Basic expectations is
- Example URL - www.ndtv.com
- When opened - it connects to various third party tracker URLs - example Google Analytics, Google Fonts etc
- With above script i am not able to catch such URLs