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

All and smallest CIDR, updated date of whois record #43

Closed
wallyw1 opened this issue Jul 31, 2014 · 7 comments
Closed

All and smallest CIDR, updated date of whois record #43

wallyw1 opened this issue Jul 31, 2014 · 7 comments
Assignees
Labels

Comments

@wallyw1
Copy link

wallyw1 commented Jul 31, 2014

(1) Can all CIDR in screenshot A be retrieved?

(2) I would like to confirm how CIDR in "nets" is retrieved, is it calculated from inetnum (1, screenshot B)?

(3) For "updated" in "nets", is it calculated from "changed"? But for multiple "changed" rows (2, screenshot B), the "updated" is calculated from the oldest row (20020923), not the latest one (20040211).

(4) Sometimes whois record includes possibly smallest CIDR (4, screenshot B), can it be retrieved as "CIDR" in "nets" (I wonder will this smallest CIDR more suitable for "CIDR" in "nets")?

screenshot a

screenshot b

@secynic secynic self-assigned this Jul 31, 2014
@secynic
Copy link
Owner

secynic commented Sep 26, 2014

  1. What do you mean retrieved? Each IP address in that range?

  2. Yes. Each inetnum/inet6num/NetRange starts a new section for parsing. Each one should be in the nets dict.

  3. Updated is calculated from changed/Updated/etc. You can see what it is looking for in the NIC_WHOIS dictionary. It seems from your report that there may be a bug. I will look in to this.

  4. This should be the case. I will check this.

I am working on the next update, and will include updates for any bugs i find from your input. Thanks.

@secynic secynic added the bug label Sep 26, 2014
@chorsley
Copy link

chorsley commented Oct 1, 2014

Regarding point 1), I think @wal1ybot is referring to the fact that there are 3 AS CIDRs announced for this IP, but ipwhois returns only one of those back. e.g.:

>>> ipwhois.IPWhois("202.173.92.56").lookup()
{'asn': '23695',
 'asn_cidr': '202.173.92.0/22',
 'asn_country_code': 'ID',
...

It would be very useful to get all three AS CIDRs back here, in much the same way as we do for net_cidr. If Cymru's whois service is being used, which only seems to return a single AS CIDR, perhaps a new source of this data would be required?

Additionally, it seems that the asn_cidr that gets returned may occasionally change from query to query, in my experience (not often, but just enough to make comparisons difficult).

@secynic
Copy link
Owner

secynic commented Oct 7, 2014

Understood. I do not know of a good/reliable Team Cymru alternative currently. Please tell me if you know of one.

If you can, please provide an example of the asn_cidr changing (screenshots preferably).

@wallyw1
Copy link
Author

wallyw1 commented Oct 8, 2014

Sorry for my late reply.

Thanks @chorsley a lot to explain for me. So, @secynic, I didn't know any good alternative at this moment. If it is impossible to 'fix' it without an alternative, maybe I move (1) to another issue for later exploration?

@secynic
Copy link
Owner

secynic commented Oct 10, 2014

I will fix whatever needs to be fixed per my above comments on questions 1-4. Since a more detailed alternative to Cymru may be a long term issue, please open a new issue for tracking that.

@secynic
Copy link
Owner

secynic commented Oct 15, 2014

Ok, 3 & 4 were both related to the same issue. I updated the CIDR regex parsing for the NICs (except ARIN). That was a bug, and will be pushing fix soon.

@secynic
Copy link
Owner

secynic commented Oct 15, 2014

Fixed in #52

@secynic secynic closed this as completed Oct 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants