Python 3 Wrapper for the binary edge API https://www.binaryedge.io/
Project description
pybinaryedge
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 :
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
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 :
host(IP)
: Details about an Hosthost_historical(IP)
: Details about an Host, with data up to 6 monthshost_search(QUERY, PAGE)
: List of recent events for the given queryhost_score(IP)
: IP Scoring of an host.host_vulnerabilities(IP)
: list of CVE vulnerabilities that may affect a hostimage_ip(IP)
: Details about Remote Desktops found on an Hostimage_search(QUERY, PAGE)
: Remote Desktops based on a Queryimage_tags()
: Get the list of possible tags for the imagestorrent_ip(IP)
: Details about torrents transferred by an Hosttorrent_historical_ip(IP)
: Details about torrents transferred by an Host, with data up to 6 monthsdataleaks_email(EMAIL)
: Verify which dataleaks affect the target emaildataleaks_organization(DOMAIN)
: Verify how many emails are affected by dataleaks for a specific domaindataleaks_info()
: Get the list of dataleaks our platform keeps track.domain_subdomains(DOMAIN, PAGE)
: Return list of subdomains known from the target domaindomain_dns(DOMAIN, PAGE)
: Return list of dns results known from the target domain.domain_ip(IP, PAGE)
: Return records that have the specified IP in their A or AAAA records.sensor_ip(TARGET)
: Details about an Scanner. List of recent events form the specified host, including details of scanned ports, payloads and tags.sensor_search(QUERY, PAGE)
: Events based on a Query.sensor_search_status(QUERY, TYPE, DAYS)
: Statistics of events for the given query. :stats(QUERY, TYPE, PAGE)
: Statistics of recent events for the given query.
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]
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
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
File details
Details for the file pybinaryedge-0.5.tar.gz
.
File metadata
- Download URL: pybinaryedge-0.5.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.2rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00cf2f253aa44c7d6589a56d70c5b820a5060c3a0a2aee018f0b4ed732fe7632 |
|
MD5 | eafabdfc8683859894f49bc15779692e |
|
BLAKE2b-256 | f0fea6720295e366f1571d521cd8a2745e74a0ca058611d54ca7e1a3634bd4a1 |