Skip to main content

Unofficial python 3 library to manage data from https://hole.cert.pl/

Project description

Pycerthole

License: MIT

Unofficial python 3 library to manage data from https://hole.cert.pl/

Official documentation for hole.cert.pl can be found here.

Install

You can install directly from PyPi

pip install pycerthole

You can also install from this repository:

git clone http://github.com/TheArqsz/pycerthole.git
cd pycerthole
pip install .

Usage

from pycerthole import CertHole
ch = CertHole()
all_domains = ch.get_data()

In return you get a list of Domain objects

Domain

Domain always contains following fields:

  • domain_address - Domain address of Domain
  • insert_date - Date when record was loaded to hole.cert.pl database
  • is_blocked - Defines whether given domain is blocked

Blocked domain - domain that is currently down (not malicious) due to actions from third parties (eg. ISP, authorities etc. )

Optional field:

  • delete_date - Defines when given domain was blocked and removed from list

Data types

Data from hole.cert.pl is divided in 4 file types:

  • csv
  • json (default)
  • xml
  • txt

By default, json is used. Only json and csv records return domains that are currently blocked and down. Those records contain exact date of deletion: delete_date.

You can define type by passing argument to get_data or get_raw_data methods.

ch.get_data(default_type='csv')

[
...
Domain({'domain_address': 'example.com', 'insert_date': datetime.datetime(2020, 1, 1, 12, 00, 00), 'delete_date': datetime.datetime(2020, 2, 2, 2, 22, 39), 'is_blocked': True}),
...
]
ch.get_raw_data(default_type='xml')

[
...
<pozycjarejestru lp="1">
<adresdomeny>example.com</adresdomeny>
<datawpisu>2020-01-01T23:00:00</datawpisu>
</pozycjarejestru>,
...
]

Others

Get list of blocked domains (domains that are blocked)

ch.get_data_blocked(default_type='json')

Supported types:

  • json (default)
  • csv

Credits

All credits for hole.cert.pl go to people from cert.pl.

This project is an unofficial wrapper for an amazing service that cert.pl provides at hole.cert.pl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycerthole-1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycerthole-1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pycerthole-1.0.tar.gz.

File metadata

  • Download URL: pycerthole-1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pycerthole-1.0.tar.gz
Algorithm Hash digest
SHA256 bbd88e61024356b78a4e94fd4f65b7266aef08c6ef1c038a5020fb5e84f63fcb
MD5 25f764f4614ae28b85518a0a734a600e
BLAKE2b-256 a97e4b9c783368087a0dc2e31c576db8b6a5b8f39a276016b39ede521fca6c7e

See more details on using hashes here.

File details

Details for the file pycerthole-1.0-py3-none-any.whl.

File metadata

  • Download URL: pycerthole-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pycerthole-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd12f59ee26194667d6e91dfaedff9f28ec803282e785a990560ffde80e3c8e2
MD5 8e3409fdb124a9b2646bed1504ea58dc
BLAKE2b-256 146ca651d40cc51da3b60efbf0f7c829ed67fae1652b0f4007830e7e86483cf7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page