Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install cymrudns

How to install cymrudns

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install cymrudns
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.1 Available View build log
1.0 Available View build log
Windows (64-bit)
1.1 Available View build log
1.0 Available View build log
Mac OS X (10.5+)
1.1 Available View build log
1.0 Available View build log
Linux (32-bit)
1.1 Available View build log
1.0 Available View build log
Linux (64-bit)
1.1 Available View build log
1.0 Available View build log
 
Author
License
MIT
Dependencies
Imports
Lastest release
version 1.1 on Jan 11th, 2011

Perform lookups by ip address and return ASN, Country Code, and Netblock Owner:: forked from the cymruwhois implementation by JustinAzoff http://github.com/JustinAzoff/python-cymruwhois

>>> import socket
>>> ip = socket.gethostbyname("www.google.com")
>>> from cymrudns import DNSClient
>>> c=DNSClient()
>>> r=c.lookup(ip)
>>> print r.asn, r.date
('15169', '2007-03-13')

Four query types ('IP','IP6','ASN','PEER') are available :

>>> c.lookup(ip,qType='IP')
<cymrudns.recordOrigin instance: ASN:15169|PREFIX:74.125.224.0/24|CC:US|LIR:arin|DATE:2007-03-13>
>>> c.lookup(r.asn,qType='ASN')
<cymrudns.recordASN instance: ASN:15169|CC:US|LIR:arin|OWNER:GOOGLE - Google Inc.|DATE:2000-03-30>
>>> ip6 = socket.getaddrinfo("www.nerim.net",80,socket.AF_INET6,0,0)[0][4][0]
>>> c.lookup(ip6,qType='IP6')
<cymrudns.recordOrigin6 instance: ASN:13193|PREFIX:2001:7a8::/32|CC:FR|LIR:ripencc|DATE:2002-03-13>
>>> c.lookupmany(['2001:4860:8010::68','2001:7a8:1:1::76'],qType='IP6')
[<cymrudns.recordOrigin6 instance: ASN:15169|PREFIX:2001:4860::/32|CC:US|LIR:arin|DATE:2005-03-14>,
<cymrudns.recordOrigin6 instance: ASN:13193|PREFIX:2001:7a8::/32|CC:FR|LIR:ripencc|DATE:2002-03-13>]
>>> c.lookupmany(['1515','5005'],qType='ASN')
[<cymrudns.recordASN instance: ASN:1515|CC:US|LIR:arin|OWNER:CTNOSC-ASNBLK-1513-1518 - Headquarters, USAISC|DATE:2004-05-12>,
<cymrudns.recordASN instance: ASN:5005|CC:VE|LIR:lacnic|OWNER:Asociados Espada C.A.|DATE:1995-03-15>]
>>> c.lookup('91.121.224.117',qType='PEER')
<cymrudns.recordPeer instance: ASN:1299,3320,3549,4565,5511,6762,10310|PREFIX:91.121.0.0/16|CC:FR|LIR:ripencc|DATE:2006-09-20>

One day, See http://packages.python.org/cymrudns/ for full documentation.

Subscribe to package updates

Last updated Jan 11th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.