Comments (3)
I think the problem is here
If ipify returns an IPv6 address for the host it's run from, then HAVE_IPV6 is set to true, but if a host passed to /asn_lookup& resolves to A records (and no AAAA records, thus populating $ip with a list of IPv4 addresses), then the grep on 2301 fails and $ip_to_trace doesn't get assigned anything.
Not sure why it works on the command line mode yet, it's possibly due to the fact that this bit gets skipped.
from asn.
Great catch! Again good analysis, this check gets indeed skipped when running from command line since its only purpose is to grab the first relevant IP when running web lookups, in order to speed up execution. The use case you describe (IPv6 on the server, IPv4-only target) is one that I missed while testing.
Can you please try changing line 2300 from:
if [ "$HAVE_IPV6" = true ]; then
to:
if [ "$HAVE_IPV6" = true ] && grep -q ':' <<<"$ip"; then
and confirm it fixes it?
Thanks again for your feedback!
from asn.
That'll do it. Thanks.
from asn.
Related Issues (20)
- Some IPv6 ranges not picked up HOT 1
- ipcalc bad argument HOT 4
- `jq: error (at <stdin>:1): Cannot iterate over null (null)` HOT 1
- zsh: killed bash (exec 3<>/dev/tcp/whois.ripe.net/43) HOT 6
- Last AS missing in AS path information HOT 6
- Feature request: add option to always query IPQualityScore and pass settings HOT 3
- IPv6 traceroute refusing to start on my host HOT 2
- Issue with obtaining v4 and v6 prefixes on MACOS HOT 11
- Suggestion: IP geolocation and proxy detection using IP2Location.io HOT 2
- Feature question - Bulk name/ip lookup HOT 1
- [Feature Request] Support IP2Location.io API to Query ASN HOT 1
- Add support for docker, automatically start in server mode. HOT 2
- Use HTTPS when it's available HOT 1
- Stuck on "retrieving information for ipv4 prefix..." HOT 2
- Exciting News: 'asn' Tool Soon to be Included in Debian! HOT 9
- upstream/transit HOT 1
- Bulk geolocation incorrect results HOT 1
- [Feature Request] IPInfo.io for core IP based operation HOT 3
- Consider adding IP2Location.io API for IP geolocation HOT 1
- Parse error in "Prefix informations" section HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asn.