-
-
Save pry0cc/28decdc3feefadf7cfc6a457f57b4552 to your computer and use it in GitHub Desktop.
A quick script to generate an on-the-fly CSV of resolved assets. Useful for generating asset discovery lists.
This file contains hidden or 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
#!/bin/bash | |
(echo "Subdomain,IP,Region,Country,Organization,Netblock,Link Type" && while read line; do ip=$(echo $line| cut -d " " -f 2); name=$(echo $line | cut -d " " -f 1); echo -n "$name,"; echo $ip | ipi '[.ip,.city,.region,.country,.company.name,.asn.name,.asn.route,.asn.type] | @csv'; done) | tee -a assets.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment