pybinaryedge

PyPI PyPI - Downloads GitHub

Python 3 Wrapper for the BinaryEdge API https://www.binaryedge.io/. See the APIv2 documentation for more information, or the documentation for this library on Read the Docs.

Installation

To install this tool, it is recommended to use virtual environments.

You can install it directly from pypi with pip install pybinaryedge.

You can Then you can install it directly from sources :

If you use pipenv, you can run instead :

You need to have an account on the Binary Edge platform, create an API key, and configure the CLI tool to use it with binaryedge config --key KEY

API

See the documentation on Read the Docs.

Example :

from pybinaryedge import BinaryEdge

be = BinaryEdge(API_KEY)
# Iterate over the first page of IPs having specific ssh configuration
search = 'ssh.algorithms.encryption.keyword:"aes256-cbc" ssh.banner.keyword:"SSH-2.0-OpenSSH_LeadSec"'
results = be.host_search(search)
for ip in results['events']:
    print("%s" %(ip['target']['ip']))

List of functions implemented :

: stats(QUERY, TYPE, PAGE): [Statistics of recent events for the given query.](https://docs.binaryedge.io/api-v2/#v2querysearchstats)

CLI

This library also implements a CLI binaryedge tool :

Example :

Changelog

  • 0.5 : fix bugs in the doc and code. Add support for host_vulnerabilities
  • 0.4: Add support for BinaryEdge sensors

License

This code is published under MIT license