File: org.py

package info (click to toggle)
python-geoip 1.3.2-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 264 kB
  • sloc: ansic: 753; python: 248; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 262 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/python

from __future__ import print_function

import GeoIP

gi = GeoIP.open("/usr/local/share/GeoIP/GeoIPOrg.dat", GeoIP.GEOIP_STANDARD)

print(gi.org_by_name("yahoo.com"))
print(gi.org_by_name("www.google.com"))
print(gi.org_by_addr("24.24.24.24"))