1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
1..255 | % { #Query the APNIC Whois Database [String]$ip='1.1.'+$_+'.1' $url='https://wq.apnic.net/apnic-bin/whois.pl?searchtext='+$ip $url $result = Invoke-WebRequest $url $whois=$result.AllElements | Where tagName -eq "pre" | %{$_.innerText} $fichero='F:\power\resumen\'+$ip.replace(".","")+'.txt' $whois | Out-File $fichero -Append $resumen='F:\power\resumen\dominios.txt' $contact=$whois | Select-String '% Abuse contact for' $contact | Out-File $resumen -Append $contact sleep -Seconds 10 } |