Skip to content

Instantly share code, notes, and snippets.

@phoenixthrush
Last active August 13, 2025 01:58
Show Gist options
  • Select an option

  • Save phoenixthrush/b383617da4a194e2ec7d6f5761b26acb to your computer and use it in GitHub Desktop.

Select an option

Save phoenixthrush/b383617da4a194e2ec7d6f5761b26acb to your computer and use it in GitHub Desktop.
Fetch latest Tor x86_64 portable #Tor
$baseUrl = "https://dist.torproject.org/torbrowser/"
$directoryListing = Invoke-WebRequest -Uri $baseUrl
$latestVersion = ($directoryListing.Links | Where-Object { $_.href -match "^\d+\.\d+\.\d+/$" } | Sort-Object -Property { [version]$_.href.TrimEnd('/') } -Descending | Select-Object -First 1).href.TrimEnd('/')
$latestVersionUrl = "$baseUrl$latestVersion/tor-browser-windows-x86_64-portable-$latestVersion.exe"
Write-Host $latestVersionUrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment