Skip to content

Instantly share code, notes, and snippets.

@tambry
Created October 4, 2019 15:16
Show Gist options
  • Save tambry/3866d803d3643f0493806b0934dc9ff7 to your computer and use it in GitHub Desktop.
Save tambry/3866d803d3643f0493806b0934dc9ff7 to your computer and use it in GitHub Desktop.
Script for scraping AAAA records of Steam content servers.
$end = 3000
$folder_name = Get-Date -UFormat %Y-%m-%d
$folder_name = 'Steam/' + $folder_name
New-Item -Path $folder_name -ItemType Directory -Force | Out-Null
For ($i=0; $i -lt $end; $i++)
{
$path = "valve$i.steamcontent.com"
Write-Progress -Activity "Scanning $path" -Status "$i/$end" -PercentComplete (($i * 100) / $end)
$output = Resolve-DnsName -Name $path -Type AAAA -ErrorAction SilentlyContinue
if ($output.IP6Address)
{
$output.IP6Address | Out-File -LiteralPath "$folder_name/$path.txt" -Force
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment