-
Notifications
You must be signed in to change notification settings - Fork 123
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
Cannot do bulk_whois on '177.104.124.235' #290
Comments
bulk_lookup_rdap returns a named tuple. Try this: |
bulk_lookup_rdap returns a named tuple.
Try this:
`
results, stats = bulk_lookup_rdap(['177.104.124.235'])
pprint(results)`
Well... I kind of did (see att.)
Still get an error...
I've got a big list of IPnumbers and it just bails out without telling me
why. I had some trouble in finding the problem...
BTW
Tis is what I am it using for:
http://vandervlies.xs4all.nl/~andre/BAN/
I power my machine down at 00:00 CET and restart is around 09:00 CET
--
Andre van der Vlies <[email protected]>
Certifiable Linux/UNIX engineer (CLUE)
Homepage: http://vandervlies.xs4all.nl/~andre
--
'Reality is that which, when you stop believing in it, doesn't go away.'
- Philip K. Dick
# vim: ts=4 sw=4 ff=unix sm ai ic:
^[^#]
--
|
Can you include the output from logging? Put this above your code:
|
Can you include the output from logging? Put this above your code:
```
import logging
LOG_FORMAT = ('[%(asctime)s] [%(levelname)s] [%(filename)s:%(lineno)s] '
'[%(funcName)s()] %(message)s')
logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
```
Sure.
…--
Andre van der Vlies <[email protected]>
Certifiable Linux/UNIX engineer (CLUE)
Homepage: http://vandervlies.xs4all.nl/~andre
--
'Reality is that which, when you stop believing in it, doesn't go away.'
- Philip K. Dick
# vim: ts=4 sw=4 ff=unix sm ai ic:
^[^#]
--
|
Can you include the output from logging? Put this above your code:
```
import logging
LOG_FORMAT = ('[%(asctime)s] [%(levelname)s] [%(filename)s:%(lineno)s] '
'[%(funcName)s()] %(message)s')
logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
```
Sorry, I tried to catch the output with:
python trywhois.py 2>&1 >Barf
But didn't succeed??? (need to to dive in the logging module...)
This what I see on screen:
.
.
.
[2020-09-29 11:17:50,391] [DEBUG] [experimental.py:72]
[get_bulk_asn_whois()] ASN bulk query initiated.
Traceback (most recent call last):
File "trywhois.py", line 32, in <module>
BULK, stats = get_bulk_asn_whois(addresses=IPlist, retry_count=5)
File "/usr/local/lib/python2.7/dist-packages/ipwhois/experimental.py",
line 110, in get_bulk_asn_whois
raise ASNLookupError('ASN bulk lookup failed.')
ipwhois.exceptions.ASNLookupError: ASN bulk lookup failed.
…--
Andre van der Vlies <[email protected]>
Certifiable Linux/UNIX engineer (CLUE)
Homepage: http://vandervlies.xs4all.nl/~andre
--
'Reality is that which, when you stop believing in it, doesn't go away.'
- Philip K. Dick
# vim: ts=4 sw=4 ff=unix sm ai ic:
^[^#]
--
|
Can you include the output from logging? Put this above your code:
```
import logging
LOG_FORMAT = ('[%(asctime)s] [%(levelname)s] [%(filename)s:%(lineno)s] '
'[%(funcName)s()] %(message)s')
logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
```
Ah! script will do it.... (Not fully awake yet...)
…--
Andre van der Vlies <[email protected]>
Certifiable Linux/UNIX engineer (CLUE)
Homepage: http://vandervlies.xs4all.nl/~andre
--
'Reality is that which, when you stop believing in it, doesn't go away.'
- Philip K. Dick
# vim: ts=4 sw=4 ff=unix sm ai ic:
^[^#]
--
|
I'm going to use this issue to provide the original error message on line 110 in get_bulk_asn_whois. Is outbound port 43/TCP enabled for you? Can you hit whois.cymru.com:43? |
I'm going to use this issue to provide the original error message on line
110 in get_bulk_asn_whois.
Is outbound port 43/TCP enabled for you? Can you hit whois.cymru.com:43?
telnet whois.cymru.com 43
Trying 38.229.36.132...
Connected to v4.whois.cymru.com.
Escape character is '^]'.
Is this wgat you want? Or should I use http?
…--
Andre van der Vlies <[email protected]>
Certifiable Linux/UNIX engineer (CLUE)
Homepage: http://vandervlies.xs4all.nl/~andre
--
'Reality is that which, when you stop believing in it, doesn't go away.'
- Philip K. Dick
# vim: ts=4 sw=4 ff=unix sm ai ic:
^[^#]
--
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code:
from ipwhois import IPWhois
from ipwhois.experimental import get_bulk_asn_whois
from ipwhois.experimental import bulk_lookup_rdap
from pprint import pprint
#ipno = '23.129.64.151'
ipno = '177.104.124.235'
IPlist = [ipno]
print ipno
obj = IPWhois(ipno)
RDAP = obj.lookup_rdap(depth=1)
print "Rdap"
pprint(RDAP)
WHOIS = obj.lookup_whois()
print "WhoIs"
pprint(WHOIS)
"""
Weird, Bulk-mode does't work on '177.104.124.235'. Why? Are there more
IPno's it doen't work on?
"""
BULK = get_bulk_asn_whois(addresses=IPlist, retry_count=5)
print "Bulk"
pprint(BULK)
RDAP = bulk_lookup_rdap(addresses=IPlist)
print "RDAP"
pprint(RDAP)
print "%s ([%s], %s,%s)" % (ipno, WHOIS['asn_description'], WHOIS['asn_country_code'], WHOIS['asn_cidr'] )
The text was updated successfully, but these errors were encountered: