certstream + analytics
Project description
Certstream + Analytics
Installation
The package can be installed from PyPI
pip install certstream-analytics
Usage
import time
from certstream_analytics.analysers import Debugger
from certstream_analytics.transformers import CertstreamTransformer
from certstream_analytics.storages import ElasticsearchStorage
from certstream_analytics.stream import CertstreamAnalytics
done = False
# This will just print out the record for debugging purpose
debugger = Debugger()
# The following fields are filtered out and indexed:
# - String: domain
# - List: SAN
# - List: Trust chain
# - Timestamp: Not before
# - Timestamp: Not after
# - Timestamp: Seen
transformer = CertstreamTransformer()
# Indexed the data in Elasticsearch
storage = ElasticsearchStorage(hosts=['localhost:9200'])
consumer = CertstreamAnalytics(transformer=transformer,
storage=storage,
analyser=debugger)
# The consumer is run in another thread so this function is non-blocking
consumer.start()
while not done:
time.sleep(1)
consumer.stop()
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
Built Distribution
Close
Hashes for certstream_analytics-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de21ed2059eb1a6d4d9aaa878c31dfbb1031d657b0a2389ef299512aa3e57928 |
|
MD5 | 643e71a6ecfbc2fa9f97682b51f0b496 |
|
BLAKE2b-256 | 24af4002853585edba4541fd253deadc7cd6876ca2577a4a545f9ec332e80946 |