Tracking third party URLs (In Javascripts)

Welcome Forums General PowerShell Q&A Tracking third party URLs (In Javascripts)

This topic contains 0 replies, has 1 voice, and was last updated by  fackeid67 1 week, 5 days ago.

  • Author
  • #175375

    Topics: 1
    Replies: 0
    Points: 13
    Rank: Member


    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
    write-host "`n"
    $output = $URL +"`t"+ $links.href +"`t"+ $csp
    $output | Out-File $path2 -Append



    Basic expectations is

    1. Example URL –
    2. When opened – it connects to various third party tracker URLs – example Google Analytics, Google Fonts etc
    3. With above script i am not able to catch such URLs

You must be logged in to reply to this topic.