How to Install Shodan in Linux Ubuntu 18.04

Posted on


This is an article where the process of shodan installation is the main focus. Before starting the installation, a brief explanation about shodan will be just perfect. According to Wikipedia, shodan is a search engine that lets the user find specific types of computers connected to the internet using a variety of filters. Some have also described it as a search engine of service banners, which are metadata that the server sends back to the client. It is quite a useful tool to have.

Installation Steps

The installation of shodan is important in order to use it in the system. In all of the steps following, try to use one user account. For an example, just use a normal user in the operating system. So, using the following steps, install it in on the system :

1. Using ‘pip’ command, execute it for the installation of shodan. Just type the following command :

pip install shodan

Therefore, using the command above, execute it in the command line. The following output of the above command execution will appear as follows :

user@hostname:~$ pip install shodan
Collecting shodan
  Downloading (44kB)
    100% |████████████████████████████████| 51kB 578kB/s 
Collecting XlsxWriter (from shodan)
  Downloading (142kB)
    100% |████████████████████████████████| 143kB 239kB/s 
Collecting click (from shodan)
  Downloading (81kB)
    100% |████████████████████████████████| 81kB 271kB/s 
Collecting click-plugins (from shodan)
Collecting colorama (from shodan)
Collecting requests>=2.2.1 (from shodan)
  Downloading (57kB)
    100% |████████████████████████████████| 61kB 172kB/s 
Collecting urllib3<1.25,>=1.21.1 (from requests>=2.2.1->shodan)
  Downloading (118kB)
    100% |████████████████████████████████| 122kB 261kB/s 
Collecting certifi>=2017.4.17 (from requests>=2.2.1->shodan)
  Downloading (154kB)
    100% |████████████████████████████████| 163kB 248kB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.2.1->shodan)
  Downloading (133kB)
    100% |████████████████████████████████| 143kB 158kB/s 
Collecting idna<2.9,>=2.5 (from requests>=2.2.1->shodan)
  Downloading (58kB)
    100% |████████████████████████████████| 61kB 71kB/s 
Building wheels for collected packages: shodan
  Running bdist_wheel for shodan ... done
  Stored in directory: /home/user/.cache/pip/wheels/b3/b9/7f/6a49be594c397f32c88f110e76eb0d0bd162a56998c1669037
Successfully built shodan
Installing collected packages: XlsxWriter, click, click-plugins, colorama, urllib3, certifi, chardet, idna, requests, shodan
Successfully installed XlsxWriter-1.1.4 certifi-2018.11.29 chardet-3.0.4 click-7.0 click-plugins-1.0.4 colorama-0.4.1 idna-2.8 requests-2.21.0 shodan-1.10.4 urllib3-1.24.1

2. Next step, test the installed ‘shodan’. Just execute the command to start using shodan by typing it in the command line :

user@hostname:~$ shodan
Usage: shodan [OPTIONS] COMMAND [ARGS]...

  -h, --help  Show this message and exit.

  alert       Manage the network alerts for your account
  convert     Convert the given input data file into a different format.
  count       Returns the number of results for a search
  data        Bulk data access to Shodan
  download    Download search results and save them in a compressed JSON...
  honeyscore  Check whether the IP is a honeypot or not.
  host        View all available information for an IP address
  info        Shows general information about your account
  init        Initialize the Shodan command-line
  myip        Print your external IP address
  org         Manage your organization's access to Shodan
  parse       Extract information out of compressed JSON files.
  radar       Real-Time Map of some results as Shodan finds them.
  scan        Scan an IP/ netblock using Shodan.
  search      Search the Shodan database
  stats       Provide summary information about a search query
  stream      Stream data in real-time.


Finally, just remember one thing for sure. In the end, the installation of the above program does not apply to other user. It is only the user whom install the program that can actually execute it. In order for another user to be able to use ‘shodan’, it is necessary for that user to install it first. So, the installation of shodan for this user is a success.

Leave a Reply