shodan – Shodan Reference Documentation

class WebAPI

An object to interact with Shodan through the web services API.

__init__(api_key)

Instantiate the object using an API key.

Parameters:api_key (string) – Shodan API key
host(ip)

Get all available information on an IP.

Parameters:ip (string) – IP of the computer
search(query)

Search the Shodan database.

Parameters:query (string) – search query; identical syntax to the website
exploits.search(query, sources=[], cve=None, osvdb=None, msb=None, bid=None)

Search the Shodan Exploits archive, which currently includes: Metasploit, Exploit DB, Packetstorm, CVE and OSVDB.

Parameters:
  • query (string) – search query; identical syntax to the website
  • sources – list of specific sources to search in, possible values: metasploit, exploitdb, cve, osvdb, packetstorm.
  • cve – CVE identifier
  • osvdb – OSVDB identifier
  • msb – Microsoft Security Bulletin ID
  • bid – Bugtraq ID
exploitdb.download(eid)

Download the exploit code for the given ExploitDB ID.

Parameters:eid (int) – ExploitDB identifier
exploitdb.search(query[, author=None, platform=None, port=None, type=None])

Search the ExploitDB archive.

Parameters:
  • query (string) – search terms to look for in the exploit description
  • author – name of author
  • code – text to search for in the exploit code itself
  • cve – CVE ID for
  • platform – target platform (e.g. windows, linux, hardware, etc.)
  • port – service port number
  • type – One of the following: any, dos, local, papers, remote, shellcode, webapps.
msf.download(fullname)

Download the module code for the given Metasploit module.

Parameters:fullname (str) – fullname (path) of the Metasploit module
msf.search(query, **kwargs)

Search the Metasploit module archive.

Parameters:
  • query (string) – search terms to look for in the module description
  • arch – architecture
  • author – name of author
  • bid – Bugtraq ID
  • cve – CVE ID
  • fullname – the fullname (path) of the module
  • msb – Microsoft Security Bulletin ID
  • name – module name
  • osvdb – OSVDB identifier
  • platform – target platform (e.g. windows, linux, etc.)
  • privileged – True/ False
  • rank – module rank
  • type – exploit, payload, auxiliary etc.
  • version – version of the module

shodan.wps – Wifi Positioning System

class GoogleLocation

Locate the physical address of a MAC/ BSSID using Google Locations.

__init__()

Instantiate the object.

locate(mac)

Get the physical location of the given MAC address.

Parameters:mac (string) – BSSID or MAC address of the device (ex. 00:1D:7E:F0:A2:B0)

Table Of Contents

Previous topic

Examples

Next topic

Ruby API Documentation

This Page