Skip to content

Instantly share code, notes, and snippets.

@ryumei
Last active January 23, 2020 06:27
Show Gist options
  • Save ryumei/10233b0d5c382be90bbd4a03f81f2296 to your computer and use it in GitHub Desktop.
Save ryumei/10233b0d5c382be90bbd4a03f81f2296 to your computer and use it in GitHub Desktop.
Look up RDAP information listed in a input file
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