Last active
January 23, 2020 06:27
-
-
Save ryumei/10233b0d5c382be90bbd4a03f81f2296 to your computer and use it in GitHub Desktop.
Look up RDAP information listed in a input file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Content input.txt | Foreach-Object { | |
$item = invoke-webrequest https://www.rdap.net/ip/$_ | convertfrom-json; | |
$item | Add-Member -MemberType NoteProperty -Name "ipaddr" -Value "$_"; | |
$item.PSObject.Properties.Remove("entities"); | |
$item.PSObject.Properties.Remove("links"); | |
$item.PSObject.Properties.Remove("notices"); | |
$item | convertto-json; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment