All Projects → mirhmousavi → Pois

mirhmousavi / Pois

Licence: other
Whois lookup behind proxy using Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pois

asyncwhois
asyncio-compatible Python module for retrieving and parsing WHOIS information for any domain.
Stars: ✭ 26 (-36.59%)
Mutual labels:  whois, tld, whois-client
Malicious Domain Whois
🔰 非法域名挖掘与画像系统
Stars: ✭ 69 (+68.29%)
Mutual labels:  whois
Zonedb
Public Zone Database
Stars: ✭ 139 (+239.02%)
Mutual labels:  whois
cli-domain-hunt
🖥 🕵️‍♂️ A command line interface for domain-hunt
Stars: ✭ 29 (-29.27%)
Mutual labels:  whois
Whois
Go(Golang) module for domain and ip whois information query.
Stars: ✭ 153 (+273.17%)
Mutual labels:  whois
domnibus
Access domain information via python and command line.
Stars: ✭ 16 (-60.98%)
Mutual labels:  whois
Python Whois
Python module/library for retrieving WHOIS information of domains 💻❤
Stars: ✭ 128 (+212.2%)
Mutual labels:  whois
opencv TLD
TLD:tracking-learning-detection 跟踪算法
Stars: ✭ 41 (+0%)
Mutual labels:  tld
WhoEnum
Mass querying whois records
Stars: ✭ 24 (-41.46%)
Mutual labels:  whois
osint
Docker image for osint
Stars: ✭ 92 (+124.39%)
Mutual labels:  whois
Whois
Intelligent WHOIS client
Stars: ✭ 244 (+495.12%)
Mutual labels:  whois
Ip Attack
Auto IP or Domain Attack Tool ( #1 )
Stars: ✭ 162 (+295.12%)
Mutual labels:  whois
Nager.Country
Worldwide Country Informations (ISO-3166-1 Alpha2, ISO-3166-1 Alpha3, ISO 639-1)
Stars: ✭ 68 (+65.85%)
Mutual labels:  tld
Pyfunceble
The tool to check the availability or syntax of domain, IP or URL.
Stars: ✭ 143 (+248.78%)
Mutual labels:  whois
WHOis
Whois Online Domain Database for check domains are reserved or not as parallel
Stars: ✭ 18 (-56.1%)
Mutual labels:  whois
Graylog Plugin Threatintel
Graylog Processing Pipeline functions to enrich log messages with IoC information from threat intelligence databases
Stars: ✭ 132 (+221.95%)
Mutual labels:  whois
Mylg
Network Diagnostic Tool
Stars: ✭ 2,538 (+6090.24%)
Mutual labels:  whois
available
Domain availability checking for Golang
Stars: ✭ 30 (-26.83%)
Mutual labels:  whois
convey
CSV processing and web related data types mutual conversion
Stars: ✭ 16 (-60.98%)
Mutual labels:  whois
domainatrex
😈 A library for parsing TLDs from urls in Elixir
Stars: ✭ 29 (-29.27%)
Mutual labels:  tld

Pois

Whois lookup behind proxy using Python

Why use Pois over other libraries?

So why use Pois over robust libraries like pythonwhois, pywhois...

  1. It supports idn domains.

  2. It supports over 1449 tlds (thanks to dnpedia) and if it didn't find any whois server for a specific brand new tld it query whois.iana.org to get tld whois server (tlds.json file will be updated when new whois servers fetched).

  3. It accepts http and socks proxies, thank to pysocks.

  4. It accepts user defined whois server to query desired domain.

  5. It accepts a timeout for whois operation, some whois servers time out after user quota exceeded.

  6. It parses result and if it finds a Registrar whois server, re-whois that server to get complete whois (thick whois).

  7. Pois uses chardet library to detect encoding of whois and give you correctly utf-8 decoded result.

Getting started

Install dependencies

pip install -r requirements.txt

Copy pois folder anywhere you want then import it.

First create a Pois object

p = Pois()

You can set a timeout for whois operation by passing timeout argument, timeout must be an integer
to set proxy just pass proxy_info dict with these arguments

  • proxy_type: must be http,socks4 or socks5
  • addr: server ip or address
  • username: proxy username if specified
  • password: proxy password if specified
  • port: proxy port in integer

to fetch whois of domain just call fetch method, this method take two arguments, domain and whois_server

  • domain is the domain that you want to fetch whois of
  • whois_server is the whois server that you want to query the domain on that server, if set to None Pois will use the authentic whois server for that domain tld
    see tests for more examples
from pois import *

# without proxy
try:
    p = Pois(timeout=10)
    result = p.fetch(domain='github.com', whois_server='whois.verisign-grs.com')
    # or
    result = p.fetch(domain='github.com',)
except Exception as err:
    print(str(err))
    
    
# with proxy
try:
    proxy_info = {'proxy_type':'http','addr':'localhost', 'port':8118}
    p = Pois(timeout=10, proxy_info=proxy_info)
    result = p.fetch(domain='github.com', whois_server=None,)
except Exception as err:
    print(str(err))
    
    
  • In many cases, when we query registrar whois server, we get full information but sometimes the registry whois sever gives us full information like 'php.guru', so we return both results

Exceptions

TldsFileError, BadDomainError, NoWhoisServerFoundError, SocketTimeoutError, SocketError, SocketBadProxyError

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].