Skip to content

Instantly share code, notes, and snippets.

@Sy3Omda
Created December 21, 2019 17:54
Show Gist options
  • Save Sy3Omda/8943aac5cd31d0659e4aefa5b316c611 to your computer and use it in GitHub Desktop.
Save Sy3Omda/8943aac5cd31d0659e4aefa5b316c611 to your computer and use it in GitHub Desktop.
recon list of IPs for ASN number & description in enumeration phase ( Usage : insert this script direct inside your .bash_profile )
ips2asn(){
while read ip ; do curl -s https://api.bgpview.io/ip/$ip | jq '.' | grep -E "asn|name" | sed ':a;N;$!ba;s/\n/ /g' | awk -F ' ' '{ print $4,$6 }' | tr -d "\,\"" | sed "$ s/$/ $ip/" ; done < $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment