Python 3 Wrapper for the BinaryEdge API https://www.binaryedge.io/
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs add domain API entries - v0.2 Dec 12, 2018
pybinaryedge minor fixes to be pushed in v0.3 Dec 12, 2018
.gitignore First version! Nov 22, 2018
LICENSE
Pipfile
README.md
requirements.txt
setup.py

README.md

pybinaryedge

Python 3 Wrapper for the BinaryEdge API https://www.binaryedge.io/. See the APIv2 documentation for more information.

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 :

git clone https://github.com/Te-k/pybinaryedge.git
cd pybinaryedge
pip install .

If you use pipenv, you can run instead :

git clone https://github.com/Te-k/pybinaryedge.git
cd pybinaryedge
pipenv install

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

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"'
for ip in be.host_search(search):
    print('%s': % ip['origin']['ip'])

List of functions implemented :

CLI

This library also implements a CLI binaryedge tool :

usage: binaryedge [-h] {config,ip,search,dataleaks} ...

Request BinaryEdge API

positional arguments:
  {config,ip,search,dataleaks}
                        Commands
    config              Configure pybinary edge
    ip                  Query an IP address
    search              Search in the database
    dataleaks           Search in the leaks database
    domains             Search information on a domain

optional arguments:
  -h, --help            show this help message and exit

Example :

$ binaryedge config --key KEY
$ binaryedge ip -i 149.202.178[.]130
{
    "events": [
        {
            "port": 27017,
            "results": [
                {
                    "origin": {
                        "country": "sg",
                        "ip": "172.104.173.35",
                        "module": "grabber",
                        "ts": 1536782325059,
                        "type": "service-simple"
[SNIP]

License

This code is published under MIT license