Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple ASNs returned from Cymru #304

Open
monoidic opened this issue Feb 15, 2021 · 0 comments
Open

Support for multiple ASNs returned from Cymru #304

monoidic opened this issue Feb 15, 2021 · 0 comments

Comments

@monoidic
Copy link

I've noticed that occasionally, Cymru will respond to an IP-ASN lookup with multiple ASNs, which will cause get_asn_verbose_dns in ipwhois/net.py to fail, as it only expects a single ASN. An example of such a result:

; <<>> DiG 9.16.1-Ubuntu <<>> TXT 1.40.136.94.origin.asn.cymru.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9503
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;141.40.136.94.origin.asn.cymru.com. IN	TXT

;; ANSWER SECTION:
141.40.136.94.origin.asn.cymru.com. 3404 IN TXT	"20738 20773 | 94.136.40.0/24 | DE | ripencc | 2008-07-17"
141.40.136.94.origin.asn.cymru.com. 3404 IN TXT	"20738 | 94.136.32.0/19 | DE | ripencc | 2008-07-17"

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: E veebr 15 15:54:50 EET 2021
;; MSG SIZE  rcvd: 195

This can cause surprising errors problems with specific DNS configurations (search domain for a domain with default TXT records on subdomains), and fails silently in most other cases while setting the ASN value of the requested IP to i.e '20738 20773', which might be unexpected by any developers using IPWhois.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant