knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
shodan is an R package interface to the Shodan API.
NOTE that the Shodan Streaming API function are not implemented.
Also, most of the functions return list
data structures given the nested structure of the Shodan query results. Functions like shodan_ports()
will sanely return simple vectors and others like shodan_protocols()
will return plain data.frames
. I am very open to collaboration to ensure the return types are as useful to callers. File an issue or e-mail/tweet me if interested.
The package expects SHODAN_API_KEY
to be in the environment and the easiest way to do that is to stick it in your .Renviron
file.
The following functions are implemented:
account_profile
: Account Profileapi_info
: API Plan Informationhoneyscore
: Honeyport or not?host_count
: Search Shodan without Resultshost_info
: Host Informationmy_ip
: My IP Addressquery_tags
: List the most popular tagsresolve
: DNS Lookupreverse
: Reverse DNS Lookupshodan_api_key
: Get or set SHODAN_API_KEY valueshodan_exploit_search
: Search for Exploitsshodan_exploit_search_count
: Search for Exploits without Resultsshodan_ports
: List all ports that Shodan is crawling on the Internet.shodan_protocols
: List all protocols that can be used when performing on-demand Internet scans via Shodan.shodan_query_list
: List the saved search queriesshodan_query_search
: Search the directory of saved search queries.shodan_scan
: Request Shodan to crawl an IP/ netblockshodan_scan_internet
: Crawl the Internet for a specific port and protocol using Shodanshodan_search
: Search Shodanshodan_search_tokens
: Break the search query into tokensshodan_services
: List all services that Shodan crawlsdevtools::install_github("hrbrmstr/shodan")
options(width=120)
library(shodan) library(tibble) # for printing # current verison packageVersion("shodan") shodan_ports() shodan_protocols() resolve("google.com") reverse("172.217.3.110") query_tags()$matches shodan_query_list()$matches
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.