Spyse.Py - Python Api Wrapper In Addition To Command-Line Customer For The Tools Hosted On Spyse.Com
Python API wrapper as well as command-line customer for the tools hosted on spyse.com.
"Spyse is a developer of consummate DAAS (Data-As-A-Service) solutions for Internet safety professionals, corporate as well as remote arrangement administrators, SSL / TLS encryption certificate providers, information centers as well as concern analysts. All Spyse online solutions are represented past times thematic services that convey a unmarried platform for collecting, processing as well as aggregating information." - spyse.com
Supports the next APIs:
NOTE: This API is currently nether active development.
Installation
pip3 install spyse.py
Using the client
Required Arguments
- -target
- -param
Optional Arguments
- -page
- -apikey
- --raw
The bargain amongst parameters
Spyse allows you lot to search their database for IPs, IP ranges, domain names, URLs, etc. The parameter declaration is meant to specify the type of your input.
List of parameters
API_TARGET_PARAMS = [ 'cidr', 'domain', 'ip', 'page', 'url', 'hash', 'q' ]
Example usages
spyse -target xbox.com -param domain --subdomains spyse -target 127.0.0.1/24 -param cidr --domains-on-ip spyse -target hotmail.com -param domain --ssl-certificates spyse -target google.com -param domain --dns-all spyse -target xbox.com -param domain -apikey -page two --ssl-certificates --raw
Piping to jq
Using the library
Without API Key
from pprint import pprint from spyse import spyse s = spyse() pprint(s.subdomains_aggregate("xbox.com", param="domain"))
With API Key
from spyse import spyse s = spyse('API_TOKEN_GOES_HERE') pprint(s.subdomains_aggregate("xbox.com", param="domain"))
Search using CIDR
from spyse import spyse from pprint import pprint s = spyse() pprint(s.domains_on_ip("172.217.1.0/24", param="cidr"))
Fetch subdomains
from spyse import spyse TARGET = "TARGET_HOST_HERE" s = spyse() information = s.subdomains_aggregate(TARGET, param="domain")['cidr'] keys = data.keys() for telephone substitution inwards keys: domains = data[key]['results'] for d inwards domains: domain = d['data']['domains'] if len(domain) > 1: for i inwards domain: print(i) else: print(domain[0])
Available Methods
All of the methods listed on https://api-doc.spyse.com/
API_METHODS = { "DNS_PTR": "/dns-ptr", "DNS_SOA": "/dns-soa", "DNS_MX": "/dns-mx", "DNS_AAAA": "/dns-aaaa", "DNS_NS": "/dns-ns", "DNS_A": "/dns-a", "DNS_TXT": "/dns-txt", "domains_with_same_ns": "/domains-with-same-ns", "domains_using_as_mx": "/domains-using-as-mx", "domains_on_ip": "/domains-on-ip", "domains_with_same_mx": "/domains-with-same-mx", "domains_using_as_ns": "/domains-using-as-ns", "download_dns_aaaa": "/download-dns-aaaa", "download_dns_soa": "/download-dns-soa", "download_dns_ns": "/download-dns-ns", "download_dns_ptr": "/download-ns-ptr", "download_dns_mx": "/download-dns-mx", "download_dns_a": "/download-dns-a", "download_dns_txt": "/download-dns-txt", "download_domains_with_same_mx": "/download-domains-with-same-mx", "download_domains_on_ip": "/download-domains-on-ip", "download_domains_with_same_ns": "/download-domains -with-same-ns", "download_domains_using_as_ns": "/download-domains-using-as-ns", "download_domains_using_as_mx": "/download-domains-using-as-mx", "ip_port_lookup_aggregate": "/ip-port-lookup-aggregate", "ip_port_lookup": "/ip-port-lookup", "ssl_certificates": "/ssl-certificates", "ssl_certificate_raw": "/ssl-certificate-raw", "ssl_certificates_aggregate": "ssl-certificates-aggregate", "ssl_certificate": "/ssl-certificate", "ssl_certificate_public_key": "/ssl-certificate-public-key", "ssl_certificate_json": "/ssl-certificate-json", "subdomains": "/subdomains", "subdomains_aggregate": "/subdomains-aggregate", "domains_starts_with": "/domains-starts-with", "domains_starts_with_aggregate": "/domains-starts-with-aggregate" }