GithubHelp home page GithubHelp logo

ip2location / ip2proxy-python-c Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 15 KB

Python library with C module for IP2Proxy database lookup. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.

Home Page: https://www.ip2location.com

License: MIT License

Python 100.00%
ip2proxy ip2proxy-python python-library python c c-module ip2location proxy-information proxy-database proxy-checker

ip2proxy-python-c's Introduction

IP2Proxy-Python-C

This library allows user to query an IP address if it was being used as VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges, residential proxies, consumer privacy networks, and enterprise private networks. It lookup the proxy IP address from IP2Proxy BIN Data file. This data file can be downloaded at

This library required the IP2Proxy C Library to work. You can install it from here.

Methods

Below are the methods supported in this library.

Method Name Description
open Open the IP2Proxy BIN data with the help of IP2Proxy C Library.
close Close and clean up the file pointer.
get_package_version Get the package version (1 to 8 for PX1 to PX8 respectively).
get_module_version Get the module version.
get_database_version Get the database version.
is_proxy Check whether if an IP address was a proxy. Returned value:
  • -1 : errors
  • 0 : not a proxy
  • 1 : a proxy
  • 2 : a data center IP address
get_all Return the proxy information in array.
get_proxy_type Return the proxy type. Please visit IP2Location for the list of proxy types supported
get_country_short Return the ISO3166-1 country code (2-digits) of the proxy.
get_country_long Return the ISO3166-1 country name of the proxy.
get_region Return the ISO3166-2 region name of the proxy. Please visit ISO3166-2 Subdivision Code for the information of ISO3166-2 supported
get_city Return the city name of the proxy.
get_isp Return the ISP name of the proxy.
get_domain Return the internet domain name associated with IP address range.
get_usage_type Return the usage type classification of ISP or company.
get_asn Return the autonomous system number (ASN).
get_as_name Return the autonomous system (AS) name.
get_last_seen Return the proxy last seen in days.
get_threat Return the threat types reported to proxy's IP address or domain name.
get_provider Returns the VPN service provider name if available.

Requirements

  1. Python 2.7 and above
  2. IP2Proxy C Library

Installation

  1. Unzip the package.
  2. Execute python setup.py build
  3. Executepython setup.py install

Testing

python sample.py

Reference

Usage Type

  • (COM) Commercial
  • (ORG) Organization
  • (GOV) Government
  • (MIL) Military
  • (EDU) University/College/School
  • (LIB) Library
  • (CDN) Content Delivery Network
  • (ISP) Fixed Line ISP
  • (MOB) Mobile ISP
  • (DCH) Data Center/Web Hosting/Transit
  • (SES) Search Engine Spider
  • (RSV) Reserved

Support

Email: [email protected]. URL: https://www.ip2location.com

ip2proxy-python-c's People

Contributors

ip2location avatar mailboxvalidator avatar

Watchers

 avatar  avatar  avatar

ip2proxy-python-c's Issues

Python3.9 compat

  1. the strings in the sample have to be passed as bytes
    such as
record = db.get_all(b"1.0.4.1")
  1. there is a problem in the CDLL module, which is not direclty influenced by this package, but basically you need to modify the init.py of CDLL in line 364 so that
if '/' in name or '\\' in name:

becomes

if name and ('/' in name or '\\' in name):

I know it is not your library, but maybe you can find a workaround meanwhile.

  1. I was turning crazy trying to figure out why everything is "-" in the results. I thought the IP2Proxy contained also the geolocation data in addition to the proxy info. I dont know if it is mentioned somewhere in the readme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.