nitefood / asn

ASN / RPKI validity / BGP stats / IPv4v6 / Prefix / URL / ASPath / Organization / IP reputation / IP geolocation / IP fingerprinting / Network recon / lookup API server / Web traceroute server
MIT License
1.31k stars 159 forks source link

Feature question - Bulk name/ip lookup #47

Open mlinton opened 11 months ago

mlinton commented 11 months ago

Is there currently a function implemented to use a text file of names / ips as the source for the data to lookup?

Thank you.

nitefood commented 11 months ago

hey @mlinton,

no, currently bulk lookup is only supported for geolocation and shodan scanning.

This feature is already in my todo list, just haven't gotten around to implement it yet. Generally, whenever I need it, I use a simple oneliner. For example:

> cat list
1.1.1.1
8.8.8.8
https://test.com

> for target in $(cat list); do asn -n $target; done

╭────────────────────────╮
│ ASN lookup for 1.1.1.1 │
╰────────────────────────╯

 1.1.1.1 ┌PTR one.one.one.one
         ├ASN 13335 (CLOUDFLARENET, US)
         ├ORG APNIC and Cloudflare DNS Resolver project
         ├NET 1.1.1.0/24 (APNIC-LABS)
         ├ABU helpdesk@apnic.net
         ├ROA ✓ VALID (1 ROA found)
         ├TYP  Anycast IP   Hosting/DC
         ├GEO Sao Paulo, São Paulo (BR)
         ├POR Open ports: 53, 443, 2086, 2087, 8443, 8880
         └REP ✓  KNOWN GOOD as "Cloudflare Public DNS"

╭────────────────────────╮
│ ASN lookup for 8.8.8.8 │
╰────────────────────────╯

 8.8.8.8 ┌PTR dns.google
         ├ASN 15169 (GOOGLE, US)
         ├ORG Google LLC
         ├NET 8.8.8.0/24 (LVLT-GOGL-8-8-8)
         ├ABU abuse@level3.com / network-abuse@google.com
         ├ROA ✓ VALID (1 ROA found)
         ├TYP  Anycast IP   DC  Google
         ├GEO London, Westminster (GB)
         ├POR Open ports: 53, 443
         └REP ✓  KNOWN GOOD as "Google Public DNS"

╭─────────────────────────────────╮
│ ASN lookup for https://test.com │
╰─────────────────────────────────╯

- Resolving "test.com"... 1 IP address found:

 67.225.146.248 ┌PTR dedicatedserver.host1.test.com
                ├ASN 32244 (LIQUIDWEB, US)
                ├ORG Liquid Web, L.L.C
                ├NET 67.225.128.0/17 (LIQUIDWEB)
                ├ABU abuse@liquidweb.com
                ├ROA ✓ UNKNOWN (no ROAs found)
                ├TYP  DC  Liquid Web
                ├GEO Lansing, Michigan (US)
                ├POR Open ports: 53
                └REP ! SUSPICIOUS (Threat Score 75%)  PROXY

I'll leave this issue open as a reminder, will close when implemented.

Thanks for the feedback!